-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
71 lines (58 loc) · 1.97 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
dnl Initialize autoconf
AC_INIT([smse], [1.0b], [[email protected]])
dnl require autoconf >= 2.69
AC_PREREQ([2.69])
dnl use the config.h header
AC_CONFIG_HEADERS([config.h])
dnl initialize automake and allow bzipped distributions
AM_INIT_AUTOMAKE([1.16.1 dist-bzip2])
dnl host system check
AC_CANONICAL_HOST
dnl AM_CONDITIONAL([WINDOWS], test x$host_os = xmingw32)
AM_CONDITIONAL([WINDOWS],
[case $host_os in
mingw32 | cygwin ) test x = x ;;
* ) test 0 = 1 ;;
esac])
dnl check for c++ compiler and BSD install
AC_PROG_CXX
AC_PROG_INSTALL
dnl tests for wxWidgets
AM_OPTIONS_WXCONFIG
AM_PATH_WXCONFIG([2.8.0], HAVE_WXWIDGETS=1, HAVE_WXWIDGETS=0)
if test $HAVE_WXWIDGETS -eq 1; then
CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS"
CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY"
LIBS="$LIBS $WX_LIBS"
else
AC_MSG_ERROR([wxWidgets 2.8 is required.
Please install wxWidgets from http://www.wxwidgets.org.
This error could also be the result of a non-standard install
path or a missing wx-config program.])
fi
dnl add compile options for older versions of OS X
AC_ARG_WITH([macosx-version-min],
AS_HELP_STRING(
[--with-macosx-version-min=VERSION],
[compile for this version of Mac OS X and later]))
if test "x$with_macosx_version_min" != "x"; then
MACOSX_VERSION_MIN_OPTS="-mmacosx-version-min=$with_macosx_version_min"
CPPFLAGS="$CPPFLAGS $MACOSX_VERSION_MIN_OPTS"
CFLAGS="$CFLAGS $MACOSX_VERSION_MIN_OPTS"
CXXFLAGS="$CXXFLAGS $MACOSX_VERSION_MIN_OPTS"
LDFLAGS="$LDFLAGS $MACOSX_VERSION_MIN_OPTS"
fi
dnl save CPP include paths to use with windows resource compiler in msys/cygwin
WX_INCLUDES=""
for opt in $WX_CPPFLAGS
do
case "$opt" in
-I*)
WX_INCLUDES="$WX_INCLUDES $opt"
;;
esac
done
AC_SUBST(WX_INCLUDES)
dnl configure files to produce
AC_CONFIG_FILES([Makefile source/Makefile])
AC_OUTPUT