root/bdm/libconfig/configure.ac @ 359

Revision 248, 2.4 kB (checked in by smidl, 15 years ago)

doc

Line 
1dnl Process this file with autoconf to produce a configure script.
2AC_INIT(libconfig.c)
3
4AC_CANONICAL_TARGET
5AM_INIT_AUTOMAKE(libconfig, 1.3.1)
6
7AM_CONFIG_HEADER(ac_config.h)
8AC_DEFINE_UNQUOTED(TARGET, "${target}", [Configured target name.])
9
10AH_TEMPLATE(_GNU_SOURCE)
11AC_DEFINE(_GNU_SOURCE)
12
13dnl Checks for programs.
14dnl AC_PROG_INSTALL
15AC_PROG_CC
16AC_PROG_RANLIB
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
80AC_ARG_ENABLE(cxx,
81AS_HELP_STRING([--disable-cxx], [Disable building of the C++ library]),
82[docxx=no],
83[
84AC_PROG_CXX
85docxx=yes
86]
87)
88
89AM_CONDITIONAL(BUILDCXX, test x$docxx = xyes)
90
91dnl Check for MinGW. Workaround for libtool's DLL_EXPORT stupidity.
92
93case "$target" in
94        *-*-cygwin* | *-*-mingw*)
95                gnuwin=yes;;
96esac
97
98AM_CONDITIONAL(GNU_WIN, test x$gnuwin = xyes)
99
100dnl Checks for library functions.
101 
102AC_OUTPUT(
103        Makefile
104        doc/Makefile
105        samples/Makefile
106        samples/c/Makefile
107        samples/c++/Makefile
108        libconfig.pc
109        libconfig++.pc
110        libconfig.spec
111        )
Note: See TracBrowser for help on using the browser.