root/library/bdm/base/libconfig/configure.ac @ 1165

Revision 689, 2.5 kB (checked in by mido, 15 years ago)

new version of libconfig added
an improvement of testsuite - calling of "testsuite print" prints all the currently prepared unit tests
a CMakeLists.txt modificiation to remowe CMake 2.8 warnings

Line 
1dnl Process this file with autoconf to produce a configure script.
2AC_INIT(libconfig, 1.4b4, hyperrealm@gmail.com)
3AC_CONFIG_AUX_DIR([aux-build])
4AC_CANONICAL_TARGET
5AM_INIT_AUTOMAKE
6AM_CONFIG_HEADER(ac_config.h)
7
8AC_DEFINE_UNQUOTED(TARGET, "${target}", [Configured target name.])
9
10# Enable GNU extensions.
11AC_GNU_SOURCE
12
13LT_INIT()
14
15dnl Checks for programs.
16AC_PROG_CC
17AC_LIBTOOL_WIN32_DLL
18AC_PROG_LIBTOOL
19
20AM_PROG_LEX
21if test Z"$LEX" != Zflex; then
22cat <<EOF
23*******************************************************************
24You do not seem to have flex. While flex is not required to build
25libconfig, you may need it to regenerate the lexer if you change
26the scanner.l file. Flex 2.5.33 or newer is recommended.
27*******************************************************************
28EOF
29fi
30
31AC_PROG_YACC
32if test Z"$YACC" != "Zbison -y"; then
33cat <<EOF
34*******************************************************************
35You do not seem to have bison. While bison is not required to build
36libconfig, you may need it to regenerate the parser if you change
37the grammar.y file.
38*******************************************************************
39EOF
40fi
41
42AC_MSG_CHECKING([for compiler switch to enable full C/C++ warnings]);
43
44dnl Checks for libraries
45
46dnl Enable warnings, if we can determine an appropriate switch...
47case "${CC}" in
48
49gcc)
50        warn_c_sw="-Wall -Wshadow -Wdeclaration-after-statement"
51        warn_cxx_sw="-Wall -Wshadow";;
52*)
53        warn_cxx_sw=""
54        warn_c_sw="";;
55esac
56
57if test -n "${warn_c_sw}";
58then
59        CFLAGS="${CFLAGS} ${warn_c_sw}";
60        CXXFLAGS="${CXXFLAGS} ${warn_cxx_sw}";
61        AC_MSG_RESULT([${warn_c_sw}, ${warn_cxx_sw}])
62else
63        AC_MSG_RESULT([(cannot determine)])
64fi;
65
66
67dnl Checks for header files.
68AC_HEADER_STDC
69AC_CHECK_HEADERS(unistd.h stdint.h xlocale.h)
70
71dnl Checks for typedefs, structures, and compiler characteristics.
72AC_C_CONST
73
74dnl Checks for functions
75
76AC_CHECK_FUNCS([newlocale uselocale freelocale])
77
78dnl Package options
79
80docxx=yes
81
82AC_ARG_ENABLE(cxx,
83AS_HELP_STRING([--disable-cxx], [Disable building of the C++ library]),
84[if test "$enableval" = "no"; then docxx="no"; fi],
85[
86AC_PROG_CXX
87docxx=yes
88]
89)
90
91AM_CONDITIONAL(BUILDCXX, test x$docxx = xyes)
92
93dnl Check for MinGW. Workaround for libtool's DLL_EXPORT stupidity.
94
95case "$target" in
96        *-*-cygwin* | *-*-mingw*)
97                gnuwin=yes;;
98esac
99
100AM_CONDITIONAL(GNU_WIN, test x$gnuwin = xyes)
101
102dnl Checks for library functions.
103
104AC_OUTPUT(
105        Makefile
106        lib/Makefile
107        lib/libconfig.pc
108        lib/libconfig++.pc
109        doc/Makefile
110        examples/Makefile
111        examples/c/Makefile
112        examples/c++/Makefile
113        libconfig.spec
114        )
Note: See TracBrowser for help on using the browser.