-
Notifications
You must be signed in to change notification settings - Fork 7
/
configure.in
125 lines (108 loc) · 3.23 KB
/
configure.in
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
AC_INIT(JSBSimCommander, 0.1.2, [email protected])
AC_CONFIG_SRCDIR([src/Commander.cpp])
AM_INIT_AUTOMAKE()
AC_CONFIG_SRCDIR([src/config.h.in])
AC_CONFIG_HEADER([src/config.h])
AC_CANONICAL_HOST
# Checks for programs.
AC_PROG_CPP
AC_PROG_AWK
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_RANLIB
AC_PROG_MKDIR_P
AC_CANONICAL_HOST
AC_PROG_CXX
AC_CHECK_TOOL(RC, windres)
AC_LANG_CPLUSPLUS
ALL_LINGUAS="de fr it zh_CN"
AM_GNU_GETTEXT([external])
AC_DEFINE_UNQUOTED(LOCALEDIR, "${prefix}/${DATADIRNAME}/locale", [Name of gettext locale directory])
# Check for wx
AM_OPTIONS_WXCONFIG
AM_PATH_WXCONFIG(2.6.0, [wxWin=1], [wxWin=0], [xrc html adv core xml base], [])
if test "$wxWin" != 1; then
AC_MSG_ERROR([
wxWidgets must be installed on your system
but wx-config script couldn't be found.
Please check that wx-config is in path, the directory
where wxWidgets libraries are installed (returned by
'wx-config --libs' command) is in LD_LIBRARY_PATH or
equivalent variable and wxWidgets version is 2.6.0 or above.
])
fi
AC_MSG_CHECKING([for WX_INCLUDES])
if test "x$WX_INCLUDES" = x ; then
WX_INCLUDES="`echo ${WX_CXXFLAGS} | awk '{print $1 \" \" $2}'`"
fi
if test "x$WX_INCLUDES" = x ; then
AC_MSG_RESULT([not found])
else
AC_MSG_RESULT([$WX_INCLUDES])
fi
AC_SUBST(WX_INCLUDES)
AM_PATH_WXRC([HAVE_WXRC=1], [HAVE_WXRC=0])
if test "x$HAVE_WXRC" != x1; then
AC_MSG_NOTICE([
The wxrc program was not installed or not found.
Please check the wxWidgets installation.
])
fi
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([float.h memory.h stddef.h stdlib.h string.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
AC_STRUCT_TM
# Checks for library functions.
AC_FUNC_ERROR_AT_LINE
AC_FUNC_MALLOC
AC_FUNC_MEMCMP
AC_FUNC_STRTOD
AC_CHECK_FUNCS([floor memmove memset pow sqrt strdup strtol])
# Used for enabling the "-no-undefined" flag while generating DLLs
# Borrowed from the official gtk+-2 configure.in
AC_MSG_CHECKING([for some Win32 platform])
case "$host" in
*-*-mingw*|*-*-cygwin*)
platform_win32=yes
declare COMMANDER_RES="commander.res"
declare WIN32_LDADD="-lws2_32"
;;
*)
platform_win32=no
declare COMMANDER_RES=""
declare WIN32_LDADD=""
;;
esac
AC_MSG_RESULT([$platform_win32])
AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
AC_SEARCH_LIBS(libiconv, iconv)
AC_SUBST(COMMANDER_RES)
AC_SUBST(WIN32_LDADD)
AC_OUTPUT( po/Makefile.in\
Makefile \
src/Makefile \
src/simgear/Makefile \
src/simgear/props/Makefile \
src/simgear/xml/Makefile \
src/input_output/Makefile \
src/math/Makefile \
src/mattplot/Makefile \
src/wx/Makefile \
src/wx/plot/Makefile \
src/wx/deprecated/Makefile \
src/wx/ogl/Makefile \
src/gui/Makefile \
src/bitmaps/Makefile \
src/rc/Makefile
)