File: configure.ac

package info (click to toggle)
pinball-table-gnu 0.0.20200601-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 9,716 kB
  • sloc: cpp: 918; makefile: 118; sh: 26
file content (92 lines) | stat: -rw-r--r-- 2,398 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#                                               -*- 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.20200601, [[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.
PKG_CHECK_MODULES([SDL],
	[sdl >= 1.2.0],
	[],
	[SDL_VERSION=1.2.0
	 AM_PATH_SDL($SDL_VERSION, :,
		AC_MSG_ERROR([SDL version $SDL_VERSION not found! http://www.libsdl.org]))])

CFLAGS="$CFLAGS $SDL_CFLAGS" 
CPPFLAGS="$CPPFLAGS $SDL_CFLAGS" 
#LIBS="$LIBS $SDL_LIBS"
DEP_PKGS="$DEP_PKGS sdl >= 1.2.0"

# 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_ARG_WITH(highscore-prefix, [  --with-highscore-prefix=PFX    Install highscore files in PFX (/var/games/pinball)], highscore_prefix="$withval", highscore_prefix="")

if test x"$highscore_prefix" != "x"; then
	EM_HIGHSCORE_DIR=$highscore_prefix
else
	EM_HIGHSCORE_DIR="/var/games/pinball"
fi

dnl EM_HIGHSCORE_DIR="/var/games/pinball"
AC_SUBST(EM_HIGHSCORE_DIR)
eval EM_HIGHSCORE_PATH=`eval echo "$EM_HIGHSCORE_DIR"`
AC_DEFINE_UNQUOTED(EM_HIGHSCORE_DIR, "$EM_HIGHSCORE_PATH", [Highscore directory])

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