-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathconfigure.ac
96 lines (74 loc) · 2.14 KB
/
configure.ac
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
93
94
95
# Process this file with autoconf to produce a configure script.
AC_INIT([lxrad],[0.5],[[email protected]])
AC_PREREQ([2.71])
AC_CONFIG_SRCDIR([lib/capplication.cc])
AC_CONFIG_HEADERS([config.h])
EXTERNAL_CFLAGS="$CFLAGS"
# Checks for programs.
AC_PROG_CPP
AC_PROG_CC
AC_PROG_CXX
AX_CXX_COMPILE_STDCXX_11
# Checks for libraries.
AC_CHECK_LIB([openal], [alGenSources],
cat >>confdefs.h <<_ACEOF
#define HAVE_OPENAL 1
_ACEOF
LIBS="-lopenal $LIBS",
AC_MSG_WARN([libopenal Not Found!]))
#check for wxwidget
WXCONFIG=wx-config
AC_ARG_WITH(wx-config,
[[ --with-wx-config=FILE Use the given path to wx-config when determining
wxWidgets configuration; defaults to "wx-config"]],
[
if test "$withval" != "yes" -a "$withval" != ""; then
WXCONFIG=$withval
fi
])
AC_MSG_CHECKING([wxWidgets version])
if wxversion=`$WXCONFIG --version`; then
AC_MSG_RESULT([$wxversion])
else
AC_MSG_RESULT([not found])
AC_MSG_ERROR([wxWidgets is required. Try --with-wx-config.])
fi
WX_CXXFLAGS="`$WXCONFIG --cxxflags`"
WX_LIBS="`$WXCONFIG --libs std`"
WX_LIBS_ADV="`$WXCONFIG --libs stc`"
AC_SUBST(WX_LIBS)
AC_SUBST(WX_LIBS_ADV)
CFLAGS="$WX_CXXFLAGS $EXTERNAL_CFLAGS -D_LX_WX"
LIBS="$LIBS $WX_LIBS"
LIBSADV="$WX_LIBS_ADV"
# Checks for header files.
AC_CHECK_HEADERS([stdlib.h string.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_STAT
AC_CHECK_FUNCS([getcwd mkdir strerror strrchr strstr strtol])
AC_SUBST(PACKAGE,`sed -ne 's/PACKAGE=//p' VERSION`)
AC_SUBST(VERSION,`sed -ne 's/VERSION=//p' VERSION`)
AC_SUBST(MAINVER,`sed -ne 's/MAINVER=//p' VERSION`)
AC_SUBST(MINORVER,`sed -ne 's/MINORVER=//p' VERSION`)
AC_SUBST(HOSTOS,`uname -sr || echo unknown`)
AC_SUBST(HOSTCPU,`uname -m || echo unknown`)
AC_SUBST(LIBS)
AC_SUBST(LIBSADV)
AC_SUBST(PREFIX)
AC_SUBST(BINDIR)
AC_SUBST(LIBDIR)
AC_CONFIG_FILES([Makefile
Makefile.Conf
docs/Makefile
include/Makefile
layout/Makefile
lib/Makefile
share/Makefile
utils/Makefile
utils/lxrad-config])
AC_OUTPUT