Debian Codegraph @

configure.in

raw ◀ ▶
Source reconstructed at patch state 3 of 6 — not the installed (fully patched) source.
6 Debian patches touch this file
1 dnl *************************************************************************
2 dnl * GSM TA/ME library
3 dnl *
4 dnl * File: configure.in
5 dnl *
6 dnl * Purpose: autoconf configure script template
7 dnl *
8 dnl * Author: Peter Hofmann ([email protected])
9 dnl *
10 dnl * Created: 11.11.1999
11 dnl *************************************************************************
12
13 dnl Process this file with autoconf to produce a configure script.
14 AC_INIT(gsmlib/gsm_error.h)
15
16 dnl Other
17 AC_CONFIG_AUX_DIR(scripts)
18 AC_CONFIG_MACRO_DIR([m4])
19 AC_PROG_INSTALL
20
21 dnl check for libintl
22 AC_CHECK_LIB(intl, textdomain)
23
24 dnl use config header
25 AM_CONFIG_HEADER(gsm_config.h)
26
27 dnl use automake
28 AM_INIT_AUTOMAKE(gsmlib, 1.10)
29
30 dnl change to no if you want no shared libraries for debugging purposes
31 AM_ENABLE_SHARED(yes)
32
33 dnl use -O2 optimization by default
34 if test "$CXXFLAGS" = ""; then
35 CXXFLAGS="-O2"
36 fi
37
38 AC_USE_SYSTEM_EXTENSIONS
39
40 dnl comment out this line to get extensive debugging output and asserts
41 dnl CXXFLAGS="-DNDEBUG $CXXFLAGS"
42
43 dnl uncomment to get translations without installing gsmlib
44 dnl CXXFLAGS="-DLOCAL_TRANSLATIONS $CXXFLAGS"
45
46 dnl check _REENTRANT in header files
47 if test x"`egrep _REENTRANT /usr/include/features.h`" != x; then
48 CXXFLAGS="-D_REENTRANT $CXXFLAGS"
49 CFLAGS="-D_REENTRANT $CFLAGS"
50 fi
51
52 dnl output all warnings
53 CXXFLAGS="-Wall $CXXFLAGS"
54
55 dnl Debian-specific: Enforce C++14 (not C++17)
56 AX_CHECK_COMPILE_FLAG([-std=c++14], [CXXFLAGS="$CXXFLAGS -std=c++14"])
57
58 dnl use libtool
59 AM_PROG_LIBTOOL
60
61 dnl Checks for programs.
62 AC_PROG_CPP
63 AC_PROG_CXX
64
65 dnl check for gcc 2.95.x
66 AC_TRY_RUN([
67 #include <unistd.h>
68 main()
69 {
70 #if defined(__GNUC__) && \
71 ! (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
72 return 1;
73 #endif
74 return 0;
75 }
76 ],,
77 [echo "need at least gcc 2.95 to compile correctly"
78 exit 1])
79
80 dnl check for alloca
81 AC_FUNC_ALLOCA
82
83 dnl check for getopt_long in the C library
84 AC_CHECK_LIB(c, getopt_long, AC_DEFINE(HAVE_GETOPT_LONG))
85
86 dnl check for alarm in the C library
87 AC_CHECK_LIB(c, alarm, AC_DEFINE(HAVE_ALARM))
88
89 dnl check for netinet/in.h header
90 AC_CHECK_HEADERS(netinet/in.h)
91
92 dnl check for string.h header
93 AC_CHECK_HEADERS(string.h)
94
95 dnl check for libintl.h header
96 AC_CHECK_HEADERS(libintl.h)
97
98 dnl Checks for typedefs, structures, and compiler characteristics.
99 AC_C_CONST
100
101 dnl check for vsnprintf()
102 dnl AC_FUNC_VPRINTF
103 AC_EGREP_HEADER(vsnprintf, stdio.h, AC_DEFINE(HAVE_VSNPRINTF))
104
105 dnl checks for builtin data type sizes
106 AC_CHECK_SIZEOF(unsigned short int, 2)
107 AC_CHECK_SIZEOF(unsigned long int, 4)
108 AC_CHECK_SIZEOF(unsigned int, 4)
109
110 dnl Project-specific settings
111 GSM_VERSION="1:4:0"
112 AC_SUBST(GSM_VERSION)
113
114 dnl national language support (NLS)
115 LINGUAS="de"
116 ALL_LINGUAS=$LINGUAS
117 AM_GNU_GETTEXT([external])
118 dnl AM_GLIB_GNU_GETTEXT
119
120 dnl set locale dir (FIXME there must be a better way)
121 _localedir=`eval "echo $datadir/locale"`
122 if test "$_localedir" = "NONE/share/locale"; then
123 AC_DEFINE_UNQUOTED(LOCALEDIR, "/usr/local/share/locale")
124 else
125 _localedir=`echo \"$_localedir\"`
126 AC_DEFINE_UNQUOTED(LOCALEDIR, $_localedir)
127 fi
128
129 dnl whether to compile the intl directory
130 AM_CONDITIONAL(COMPILE_INTL, test x$USE_INCLUDED_LIBINTL = xyes)
131
132 AC_OUTPUT(Makefile gsmlib/Makefile tests/Makefile apps/Makefile win32/Makefile
133 doc/Makefile scripts/Makefile intl/Makefile po/Makefile.in
134 ext/Makefile,
135 echo timestamp > stamp-h)
136
137 dnl repair Makefile in po subdir
138 dnl sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile