Debian Codegraph @

configure.in

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