forked from rayarachelian/lisaem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.in
148 lines (113 loc) · 4.07 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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
#######################################################################################
# Shamelessly grabbed from FileZilla. Note that this file isn't actually used by the
# build.sh system. Rather, it is only provided here to assist with automated package
# creation by package maintainers for various distributions of *BSD and Linux OS's.
# This probably isn't correct as far as configure.in files go.
#######################################################################################
AC_INIT(LisaEm, 1.0.0-RC2, [email protected])
AC_CONFIG_HEADERS([src/include/config.h])
AC_CONFIG_AUX_DIR(config)
AM_INIT_AUTOMAKE([dist-bzip2])
AC_CANONICAL_HOST
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_LIBTOOL
AC_CACHE_SAVE
AC_ARG_ENABLE(locales, AC_HELP_STRING([--enable-locales], [Build message catalogs]), \
[locales="$enableval"], [locales="yes"])
AC_ARG_ENABLE(localesonly, AC_HELP_STRING([--enable-localesonly], [Just build locales]), \
[localesonly="$enableval"], [localesonly="no"])
if test "$locales" != "yes" -a "$localesonly" = "yes"; then
AC_MSG_ERROR([invalid flags: --disable-locales cannot be used together with --locales-only])
fi
if ! test "$localesonly" = "yes"; then
if test "X$GCC" = Xyes; then
CFLAGS="$CFLAGS -Wall -g -fexceptions"
CXXFLAGS="$CXXFLAGS -Wall -g -fexceptions"
fi
# Detect wxWidgets
# ----------------
AM_OPTIONS_WXCONFIG
MIN_WX_VERSION="2.8.0"
AM_PATH_WXCONFIG($MIN_WX_VERSION, wxWin=1, , [xrc,std])
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 $MIN_WX_VERSION or above.
])
fi
AC_SUBST(WX_CONFIG_WITH_ARGS)
AC_CACHE_SAVE
# Get OS type for PUTTY frontend
# ------------------------------
AC_MSG_CHECKING([system type for sftp stub])
sftpbuild="unix"
if echo $host_os | grep "mingw" > /dev/null 2>&1; then sftpbuild="mingw"; fi
AC_MSG_RESULT([$sftpbuild])
# Checks for PuTTY
# ----------------
AC_CHECK_HEADERS([utmpx.h sys/select.h],,,[
#include <sys/types.h>
#include <utmp.h>])
AC_SEARCH_LIBS([socket], [xnet])
AC_CHECK_FUNCS([getaddrinfo ptsname setresuid strsignal updwtmpx])
AC_CHECK_FUNCS([gettimeofday ftime])
AH_BOTTOM([
/* Convert autoconf definitions to ones that PuTTY wants. */
AC_SUBST(WINDRES)
AC_SUBST(WINDRESFLAGS)
# version.rc.in needs a major, minor and micro version number
vnumber=${PACKAGE_VERSION%-*}
PACKAGE_VERSION_MAJOR=${vnumber%%.*}
PACKAGE_VERSION_MICRO=${vnumber##*.}
PACKAGE_VERSION_MINOR=${vnumber#*.}
PACKAGE_VERSION_MINOR=${PACKAGE_VERSION_MINOR%.*}
PACKAGE_VERSION_NANO=0
AC_SUBST(PACKAGE_VERSION_MAJOR)
AC_SUBST(PACKAGE_VERSION_MINOR)
AC_SUBST(PACKAGE_VERSION_MICRO)
AC_SUBST(PACKAGE_VERSION_NANO)
AC_MSG_RESULT([$use_binreloc])
# Precompiled headers support
# ---------------------------
AC_MSG_CHECKING([whether to use precompiled headers])
use_precomp=""
AC_ARG_ENABLE(precomp, AC_HELP_STRING([--enable-precomp], [Use precompiled headers]), \
use_precomp="$enableval")
if test -z "$use_precomp"; then
if test "X$GCC" = Xyes; then
if gcc_version=`$CC -dumpversion` > /dev/null 2>&1; then
major=`echo $gcc_version | cut -d. -f1`
minor=`echo $gcc_version | sed "s/@<:@-,a-z,A-Z@:>@.*//" | cut -d. -f2`
if test -z "$major" || test -z "$minor"; then
use_precomp=no
elif test "$major" -ge 4; then
use_precomp=yes
else
use_precomp=no
fi
else
use_precomp=no
fi
else
use_precomp=no
fi
fi
if test "x$use_precomp" = "xyes"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
fi
AC_PATH_PROG([WXRC], [wxrc --version])
if test "x$WXRC" = "x"; then
AC_MSG_ERROR([
wxrc could not be found. This program gets build together with wxWidgets.
Please make sure wxrc is within your path.
])
fi
AC_OUTPUT