~ubuntu-branches/ubuntu/dapper/gsmlib/dapper

1 by Mikael Hedin
Import upstream version 1.8
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 (software@pxh.de)
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
1.1.1 by Mark Purcell
Import upstream version 1.10
16
dnl Other
17
AC_CONFIG_AUX_DIR(scripts)
18
AC_PROG_INSTALL
1 by Mikael Hedin
Import upstream version 1.8
19
20
dnl check for libintl
21
AC_CHECK_LIB(intl, textdomain)
22
23
dnl use config header
24
AM_CONFIG_HEADER(gsm_config.h)
25
26
dnl use automake
1.1.1 by Mark Purcell
Import upstream version 1.10
27
AM_INIT_AUTOMAKE(gsmlib, 1.10)
1 by Mikael Hedin
Import upstream version 1.8
28
29
dnl change to no if you want no shared libraries for debugging purposes
30
AM_ENABLE_SHARED(yes)
31
32
dnl use -O2 optimization by default
33
if test "$CXXFLAGS" = ""; then
34
   CXXFLAGS="-O2"
35
fi
36
37
dnl comment out this line to get extensive debugging output and asserts
38
dnl CXXFLAGS="-DNDEBUG $CXXFLAGS"
39
40
dnl uncomment to get translations without installing gsmlib
41
dnl CXXFLAGS="-DLOCAL_TRANSLATIONS $CXXFLAGS"
42
43
dnl check _REENTRANT in header files
44
if test x"`egrep _REENTRANT /usr/include/features.h`" != x; then
45
  CXXFLAGS="-D_REENTRANT $CXXFLAGS"
46
  CFLAGS="-D_REENTRANT $CFLAGS"
47
fi
48
49
dnl output all warnings
50
CXXFLAGS="-Wall $CXXFLAGS"
51
52
dnl use libtool
53
AM_PROG_LIBTOOL
54
55
dnl Checks for programs.
56
AC_PROG_CPP
57
AC_PROG_CXX
58
59
dnl check for gcc 2.95.x
60
AC_TRY_RUN([
61
#include <unistd.h>
62
main()
63
{
64
#if defined(__GNUC__) && \
65
    ! (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
66
    return 1;
67
#endif
68
  return 0;
69
}
70
],,
71
[echo "need at least gcc 2.95 to compile correctly"
72
exit 1])
73
74
dnl check for alloca
75
AC_FUNC_ALLOCA
76
77
dnl check for getopt_long in the C library
78
AC_CHECK_LIB(c, getopt_long, AC_DEFINE(HAVE_GETOPT_LONG))
79
80
dnl check for alarm in the C library
81
AC_CHECK_LIB(c, alarm, AC_DEFINE(HAVE_ALARM))
82
83
dnl check for netinet/in.h header
84
AC_CHECK_HEADERS(netinet/in.h)
85
86
dnl check for string.h header
87
AC_CHECK_HEADERS(string.h)
88
89
dnl check for libintl.h header
90
AC_CHECK_HEADERS(libintl.h)
91
92
dnl Checks for typedefs, structures, and compiler characteristics.
93
AC_C_CONST
94
95
dnl check for vsnprintf()
96
dnl AC_FUNC_VPRINTF
97
AC_EGREP_HEADER(vsnprintf, stdio.h, AC_DEFINE(HAVE_VSNPRINTF))
98
99
dnl checks for builtin data type sizes
100
AC_CHECK_SIZEOF(unsigned short int, 2)
101
AC_CHECK_SIZEOF(unsigned long int, 4)
102
AC_CHECK_SIZEOF(unsigned int, 4)
103
104
dnl Project-specific settings
1.1.1 by Mark Purcell
Import upstream version 1.10
105
GSM_VERSION="1:4:0"
1 by Mikael Hedin
Import upstream version 1.8
106
AC_SUBST(GSM_VERSION)
107
1.1.1 by Mark Purcell
Import upstream version 1.10
108
dnl national language support (NLS)
109
LINGUAS="de"
110
ALL_LINGUAS=$LINGUAS
111
AM_GNU_GETTEXT
112
1 by Mikael Hedin
Import upstream version 1.8
113
dnl set locale dir (FIXME there must be a better way)
114
_localedir=`eval "echo $datadir/locale"`
115
if test "$_localedir" = "NONE/share/locale"; then
116
   AC_DEFINE_UNQUOTED(LOCALEDIR, "/usr/local/share/locale")
117
else
118
   _localedir=`echo \"$_localedir\"`
119
   AC_DEFINE_UNQUOTED(LOCALEDIR, $_localedir)
120
fi
121
122
dnl whether to compile the intl directory
123
AM_CONDITIONAL(COMPILE_INTL, test x$USE_INCLUDED_LIBINTL = xyes)
124
125
AC_OUTPUT(Makefile gsmlib/Makefile tests/Makefile apps/Makefile win32/Makefile
126
          doc/Makefile scripts/Makefile intl/Makefile po/Makefile.in
127
          ext/Makefile,
128
          echo timestamp > stamp-h)
129
130
dnl repair Makefile in po subdir
1.1.1 by Mark Purcell
Import upstream version 1.10
131
dnl sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile