1*2e9d4914SAndroid Build Coastguard Workerdnl Process this file with autoconf to produce a configure script. 2*2e9d4914SAndroid Build Coastguard Worker 3*2e9d4914SAndroid Build Coastguard WorkerAC_INIT(libconfig, 1.7.3, [email protected], libconfig, 4*2e9d4914SAndroid Build Coastguard Worker [https://hyperrealm.github.io/libconfig/]) 5*2e9d4914SAndroid Build Coastguard WorkerAC_CONFIG_AUX_DIR([aux-build]) 6*2e9d4914SAndroid Build Coastguard WorkerAC_CONFIG_MACRO_DIR([m4]) 7*2e9d4914SAndroid Build Coastguard WorkerAC_CANONICAL_TARGET 8*2e9d4914SAndroid Build Coastguard WorkerAM_INIT_AUTOMAKE 9*2e9d4914SAndroid Build Coastguard WorkerAC_CONFIG_HEADERS(ac_config.h) 10*2e9d4914SAndroid Build Coastguard Worker 11*2e9d4914SAndroid Build Coastguard Workerm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) 12*2e9d4914SAndroid Build Coastguard Worker 13*2e9d4914SAndroid Build Coastguard WorkerAC_MSG_NOTICE([libconfig - made with pride in Colorado]) 14*2e9d4914SAndroid Build Coastguard Workersleep 3 15*2e9d4914SAndroid Build Coastguard Worker 16*2e9d4914SAndroid Build Coastguard WorkerAC_DEFINE_UNQUOTED(TARGET, "${target}", [Configured target name.]) 17*2e9d4914SAndroid Build Coastguard Worker 18*2e9d4914SAndroid Build Coastguard Worker# Enable GNU extensions. 19*2e9d4914SAndroid Build Coastguard WorkerAC_GNU_SOURCE 20*2e9d4914SAndroid Build Coastguard Worker 21*2e9d4914SAndroid Build Coastguard WorkerLT_INIT() 22*2e9d4914SAndroid Build Coastguard Worker 23*2e9d4914SAndroid Build Coastguard Workerdnl Checks for programs. 24*2e9d4914SAndroid Build Coastguard WorkerAC_PROG_CC 25*2e9d4914SAndroid Build Coastguard WorkerAM_PROG_CC_C_O 26*2e9d4914SAndroid Build Coastguard WorkerAC_PROG_CXX 27*2e9d4914SAndroid Build Coastguard WorkerAC_LIBTOOL_WIN32_DLL 28*2e9d4914SAndroid Build Coastguard WorkerAC_PROG_LIBTOOL 29*2e9d4914SAndroid Build Coastguard Worker 30*2e9d4914SAndroid Build Coastguard WorkerAM_PROG_LEX 31*2e9d4914SAndroid Build Coastguard Workerif test Z"$LEX" != Zflex; then 32*2e9d4914SAndroid Build Coastguard Workercat <<EOF 33*2e9d4914SAndroid Build Coastguard Worker******************************************************************* 34*2e9d4914SAndroid Build Coastguard WorkerYou do not seem to have flex. While flex is not required to build 35*2e9d4914SAndroid Build Coastguard Workerlibconfig, you may need it to regenerate the lexer if you change 36*2e9d4914SAndroid Build Coastguard Workerthe scanner.l file. 37*2e9d4914SAndroid Build Coastguard Worker******************************************************************* 38*2e9d4914SAndroid Build Coastguard WorkerEOF 39*2e9d4914SAndroid Build Coastguard Workerfi 40*2e9d4914SAndroid Build Coastguard Worker 41*2e9d4914SAndroid Build Coastguard WorkerAC_PROG_YACC 42*2e9d4914SAndroid Build Coastguard Workerif test Z"$YACC" != "Zbison -y"; then 43*2e9d4914SAndroid Build Coastguard Workercat <<EOF 44*2e9d4914SAndroid Build Coastguard Worker******************************************************************* 45*2e9d4914SAndroid Build Coastguard WorkerYou do not seem to have bison. While bison is not required to build 46*2e9d4914SAndroid Build Coastguard Workerlibconfig, you may need it to regenerate the parser if you change 47*2e9d4914SAndroid Build Coastguard Workerthe grammar.y file. 48*2e9d4914SAndroid Build Coastguard Worker******************************************************************* 49*2e9d4914SAndroid Build Coastguard WorkerEOF 50*2e9d4914SAndroid Build Coastguard Workerfi 51*2e9d4914SAndroid Build Coastguard Worker 52*2e9d4914SAndroid Build Coastguard WorkerAC_MSG_CHECKING([for compiler switch to enable full C/C++ warnings]); 53*2e9d4914SAndroid Build Coastguard Worker 54*2e9d4914SAndroid Build Coastguard Workerdnl Checks for libraries 55*2e9d4914SAndroid Build Coastguard Worker 56*2e9d4914SAndroid Build Coastguard Workerdnl Enable warnings, if we can determine an appropriate switch... 57*2e9d4914SAndroid Build Coastguard Workercase "${CC}" in 58*2e9d4914SAndroid Build Coastguard Worker 59*2e9d4914SAndroid Build Coastguard Workergcc) 60*2e9d4914SAndroid Build Coastguard Worker warn_c_sw="-Wall -Wshadow -Wextra -Wdeclaration-after-statement -Wno-unused-parameter" 61*2e9d4914SAndroid Build Coastguard Worker warn_cxx_sw="-Wall -Wshadow -Wextra -Wno-unused-parameter";; 62*2e9d4914SAndroid Build Coastguard Worker*) 63*2e9d4914SAndroid Build Coastguard Worker warn_cxx_sw="" 64*2e9d4914SAndroid Build Coastguard Worker warn_c_sw="";; 65*2e9d4914SAndroid Build Coastguard Workeresac 66*2e9d4914SAndroid Build Coastguard Worker 67*2e9d4914SAndroid Build Coastguard Workerif test -n "${warn_c_sw}"; 68*2e9d4914SAndroid Build Coastguard Workerthen 69*2e9d4914SAndroid Build Coastguard Worker CFLAGS="${CFLAGS} ${warn_c_sw}"; 70*2e9d4914SAndroid Build Coastguard Worker CXXFLAGS="${CXXFLAGS} ${warn_cxx_sw}"; 71*2e9d4914SAndroid Build Coastguard Worker AC_MSG_RESULT([${warn_c_sw}, ${warn_cxx_sw}]) 72*2e9d4914SAndroid Build Coastguard Workerelse 73*2e9d4914SAndroid Build Coastguard Worker AC_MSG_RESULT([(cannot determine)]) 74*2e9d4914SAndroid Build Coastguard Workerfi; 75*2e9d4914SAndroid Build Coastguard Worker 76*2e9d4914SAndroid Build Coastguard Worker 77*2e9d4914SAndroid Build Coastguard Workerdnl Checks for header files. 78*2e9d4914SAndroid Build Coastguard WorkerAC_HEADER_STDC 79*2e9d4914SAndroid Build Coastguard WorkerAC_CHECK_HEADERS(unistd.h stdint.h xlocale.h) 80*2e9d4914SAndroid Build Coastguard Worker 81*2e9d4914SAndroid Build Coastguard Workerdnl Checks for typedefs, structures, and compiler characteristics. 82*2e9d4914SAndroid Build Coastguard WorkerAC_C_CONST 83*2e9d4914SAndroid Build Coastguard Worker 84*2e9d4914SAndroid Build Coastguard Workerdnl Checks for functions 85*2e9d4914SAndroid Build Coastguard Worker 86*2e9d4914SAndroid Build Coastguard WorkerAC_CHECK_FUNCS([newlocale uselocale freelocale]) 87*2e9d4914SAndroid Build Coastguard Worker 88*2e9d4914SAndroid Build Coastguard Workerdnl Package options 89*2e9d4914SAndroid Build Coastguard Worker 90*2e9d4914SAndroid Build Coastguard Workerdocxx=yes 91*2e9d4914SAndroid Build Coastguard Worker 92*2e9d4914SAndroid Build Coastguard WorkerAC_ARG_ENABLE(cxx, 93*2e9d4914SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-cxx], [Disable building of the C++ library]), 94*2e9d4914SAndroid Build Coastguard Worker[if test "$enableval" = "no"; then docxx="no"; fi], 95*2e9d4914SAndroid Build Coastguard Worker[ 96*2e9d4914SAndroid Build Coastguard Workerdocxx=yes 97*2e9d4914SAndroid Build Coastguard Worker] 98*2e9d4914SAndroid Build Coastguard Worker) 99*2e9d4914SAndroid Build Coastguard Worker 100*2e9d4914SAndroid Build Coastguard WorkerAM_CONDITIONAL(BUILDCXX, test x$docxx = xyes) 101*2e9d4914SAndroid Build Coastguard Worker 102*2e9d4914SAndroid Build Coastguard Workerdodoc=yes 103*2e9d4914SAndroid Build Coastguard Worker 104*2e9d4914SAndroid Build Coastguard WorkerAC_ARG_ENABLE(doc, 105*2e9d4914SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-doc], [Disable building of the documentation]), 106*2e9d4914SAndroid Build Coastguard Worker[if test "$enableval" = "no"; then dodoc="no"; fi], 107*2e9d4914SAndroid Build Coastguard Worker[ 108*2e9d4914SAndroid Build Coastguard Workerdodoc=yes 109*2e9d4914SAndroid Build Coastguard Worker] 110*2e9d4914SAndroid Build Coastguard Worker) 111*2e9d4914SAndroid Build Coastguard Worker 112*2e9d4914SAndroid Build Coastguard WorkerAM_CONDITIONAL(BUILDDOC, test x$dodoc = xyes) 113*2e9d4914SAndroid Build Coastguard Worker 114*2e9d4914SAndroid Build Coastguard Workerdoexamples=yes 115*2e9d4914SAndroid Build Coastguard Worker 116*2e9d4914SAndroid Build Coastguard WorkerAC_ARG_ENABLE(examples, 117*2e9d4914SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-examples], [Disable building of the example programs]), 118*2e9d4914SAndroid Build Coastguard Worker[if test "$enableval" = "no"; then doexamples="no"; fi], 119*2e9d4914SAndroid Build Coastguard Worker[ 120*2e9d4914SAndroid Build Coastguard Workerdoexamples=yes 121*2e9d4914SAndroid Build Coastguard Worker] 122*2e9d4914SAndroid Build Coastguard Worker) 123*2e9d4914SAndroid Build Coastguard Worker 124*2e9d4914SAndroid Build Coastguard WorkerAM_CONDITIONAL(BUILDEXAMPLES, test x$doexamples = xyes) 125*2e9d4914SAndroid Build Coastguard Worker 126*2e9d4914SAndroid Build Coastguard Workerdotests=yes 127*2e9d4914SAndroid Build Coastguard Worker 128*2e9d4914SAndroid Build Coastguard WorkerAC_ARG_ENABLE(tests, 129*2e9d4914SAndroid Build Coastguard WorkerAS_HELP_STRING([--disable-tests], [Disable building of the tests]), 130*2e9d4914SAndroid Build Coastguard Worker[if test "$enableval" = "no"; then dotests="no"; fi], 131*2e9d4914SAndroid Build Coastguard Worker[ 132*2e9d4914SAndroid Build Coastguard Workerdotests=yes 133*2e9d4914SAndroid Build Coastguard Worker] 134*2e9d4914SAndroid Build Coastguard Worker) 135*2e9d4914SAndroid Build Coastguard Worker 136*2e9d4914SAndroid Build Coastguard WorkerAM_CONDITIONAL(BUILDTESTS, test x$dotests = xyes) 137*2e9d4914SAndroid Build Coastguard Worker 138*2e9d4914SAndroid Build Coastguard Workerdnl Check for MinGW. Workaround for libtool's DLL_EXPORT stupidity. 139*2e9d4914SAndroid Build Coastguard Worker 140*2e9d4914SAndroid Build Coastguard Workercase "$target" in 141*2e9d4914SAndroid Build Coastguard Worker *-*-cygwin* | *-*-mingw*) 142*2e9d4914SAndroid Build Coastguard Worker gnuwin=yes;; 143*2e9d4914SAndroid Build Coastguard Workeresac 144*2e9d4914SAndroid Build Coastguard Worker 145*2e9d4914SAndroid Build Coastguard WorkerAM_CONDITIONAL(GNU_WIN, test x$gnuwin = xyes) 146*2e9d4914SAndroid Build Coastguard Worker 147*2e9d4914SAndroid Build Coastguard Workerdnl Checks for library functions. 148*2e9d4914SAndroid Build Coastguard Worker 149*2e9d4914SAndroid Build Coastguard WorkerAC_OUTPUT( 150*2e9d4914SAndroid Build Coastguard Worker Makefile 151*2e9d4914SAndroid Build Coastguard Worker lib/Makefile 152*2e9d4914SAndroid Build Coastguard Worker lib/libconfig.pc 153*2e9d4914SAndroid Build Coastguard Worker lib/libconfig++.pc 154*2e9d4914SAndroid Build Coastguard Worker lib/libconfigConfig.cmake 155*2e9d4914SAndroid Build Coastguard Worker lib/libconfig++Config.cmake 156*2e9d4914SAndroid Build Coastguard Worker doc/Makefile 157*2e9d4914SAndroid Build Coastguard Worker examples/Makefile 158*2e9d4914SAndroid Build Coastguard Worker examples/c/Makefile 159*2e9d4914SAndroid Build Coastguard Worker examples/c++/Makefile 160*2e9d4914SAndroid Build Coastguard Worker tinytest/Makefile 161*2e9d4914SAndroid Build Coastguard Worker tests/Makefile 162*2e9d4914SAndroid Build Coastguard Worker libconfig.spec 163*2e9d4914SAndroid Build Coastguard Worker ) 164