Debian Codegraph @

configure.in

raw ◀ ▶
Source reconstructed at patch state 4 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_COMPILE([#include <unistd.h>],[
67 #if defined(__GNUC__) && \
68 ! (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
69 # error gcc too old
70 return 1;
71 #endif
72 ],,
73 [echo "need at least gcc 2.95 to compile correctly"
74 exit 1])
75
76 dnl check for alloca
77 AC_FUNC_ALLOCA
78
79 dnl check for getopt_long in the C library
80 AC_CHECK_LIB(c, getopt_long, AC_DEFINE(HAVE_GETOPT_LONG))
81
82 dnl check for alarm in the C library
83 AC_CHECK_LIB(c, alarm, AC_DEFINE(HAVE_ALARM))
84
85 dnl check for netinet/in.h header
86 AC_CHECK_HEADERS(netinet/in.h)
87
88 dnl check for string.h header
89 AC_CHECK_HEADERS(string.h)
90
91 dnl check for libintl.h header
92 AC_CHECK_HEADERS(libintl.h)
93
94 dnl Checks for typedefs, structures, and compiler characteristics.
95 AC_C_CONST
96
97 dnl check for vsnprintf()
98 dnl AC_FUNC_VPRINTF
99 AC_EGREP_HEADER(vsnprintf, stdio.h, AC_DEFINE(HAVE_VSNPRINTF))
100
101 dnl checks for builtin data type sizes
102 AC_CHECK_SIZEOF(unsigned short int, 2)
103 AC_CHECK_SIZEOF(unsigned long int, 4)
104 AC_CHECK_SIZEOF(unsigned int, 4)
105
106 dnl Project-specific settings
107 GSM_VERSION="1:4:0"
108 AC_SUBST(GSM_VERSION)
109
110 dnl national language support (NLS)
111 LINGUAS="de"
112 ALL_LINGUAS=$LINGUAS
113 AM_GNU_GETTEXT([external])
114 dnl AM_GLIB_GNU_GETTEXT
115
116 dnl set locale dir (FIXME there must be a better way)
117 _localedir=`eval "echo $datadir/locale"`
118 if test "$_localedir" = "NONE/share/locale"; then
119 AC_DEFINE_UNQUOTED(LOCALEDIR, "/usr/local/share/locale")
120 else
121 _localedir=`echo \"$_localedir\"`
122 AC_DEFINE_UNQUOTED(LOCALEDIR, $_localedir)
123 fi
124
125 dnl whether to compile the intl directory
126 AM_CONDITIONAL(COMPILE_INTL, test x$USE_INCLUDED_LIBINTL = xyes)
127
128 AC_OUTPUT(Makefile gsmlib/Makefile tests/Makefile apps/Makefile win32/Makefile
129 doc/Makefile scripts/Makefile intl/Makefile po/Makefile.in
130 ext/Makefile,
131 echo timestamp > stamp-h)
132
133 dnl repair Makefile in po subdir
134 dnl sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile