Skip to content

Commit

Permalink
build: Add autotools build files
Browse files Browse the repository at this point in the history
Bug: adoptware/pinball#4
Signed-off-by: Philippe Coval <rzr@users.sf.net>
  • Loading branch information
rzr committed Jun 1, 2020
1 parent d8c7fd2 commit b2480b5
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/automake
# SPDX-License-Identifier: GPL-2

tablename=gnu

AUTOMAKE_OPTIONS = gnu

SUBDIRS = data/gnu

pindatadir = $(datadir)/pinball
73 changes: 73 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# -*- Autoconf -*-
# SPDX-License-Identifier: GPL-2

# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.69])
AC_INIT(pinball-table-gnu, 0.0.0, [[pinball.sf.net]])
AC_CONFIG_SRCDIR([data/gnu/ModuleGnu.cpp])
AC_CONFIG_HEADERS([config.h])
LT_CONFIG_LTDL_DIR([libltdl])
AC_CONFIG_AUX_DIR([libltdl/config])
AC_CONFIG_MACRO_DIR([libltdl/m4])

AC_CANONICAL_HOST
AC_CANONICAL_TARGET

AM_INIT_AUTOMAKE


# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LIBTOOL
AC_PROG_LN_S
AC_PROG_MAKE_SET

AC_LIBTOOL_DLOPEN
LTDL_INIT

# Checks for libraries.
AM_PATH_SDL(1.2.0, : , AC_MSG_ERROR([*** SDL version 1.2.0 not found! Make sure you have the development package of SDL installed - (www.libsdl.org) - or try to use the --with-sdl-prefix option]))
CFLAGS="$CFLAGS $SDL_CFLAGS"
CPPFLAGS="$CPPFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS"

# Checks for header files.

# Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_HEADER_STDBOOL

# Checks for library functions.



dnl *******************************************
dnl PATHS AND DIRS ****************************
dnl data dirs, fuck I hate autoconf, spent 4 hours getting this right, had to
dnl steal it from xine and even that took a couple of hours
if test "x$prefix" = xNONE; then
prefix="${ac_default_prefix}"
fi

if test "x$exec_prefix" = xNONE; then
exec_prefix="$prefix"
fi


EM_DATADIR="$datadir/$PACKAGE_NAME"
AC_SUBST(EM_DATADIR)
eval EM_DATAPATH=`eval echo "$EM_DATADIR"`
AC_DEFINE_UNQUOTED(EM_DATADIR, "$EM_DATAPATH", [The data dir /usr/local/share/pinball])

EM_LIBDIR="$libdir/pinball"
AC_SUBST(EM_LIBDIR)
eval EM_LIBPATH=`eval echo "$EM_LIBDIR"`
AC_DEFINE_UNQUOTED(EM_LIBDIR, "$EM_LIBPATH", [The library or plugin dir /usr/local/lib/pinball])


AC_CONFIG_FILES([Makefile
data/gnu/Makefile
])
AC_OUTPUT

0 comments on commit b2480b5

Please sign in to comment.