Skip to content

Commit

Permalink
hurd: 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 <[email protected]>
  • Loading branch information
rzr committed Jan 8, 2020
1 parent bf944d6 commit 92f2f04
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/automake
# SPDX-License-Identifier: GPL-2

AUTOMAKE_OPTIONS = gnu

SUBDIRS = data/hurd

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

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

AC_PREREQ([2.69])
AC_INIT(pinball-table-hurd, 0.0.0, [[pinball.sf.net]])
AC_CONFIG_SRCDIR([data/hurd/ModuleHurd.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/hurd/Makefile
])
AC_OUTPUT

0 comments on commit 92f2f04

Please sign in to comment.