"Fossies" - the Fresh Open Source Software Archive

Member "tcpflow-1.6.1/configure.ac" (19 Feb 2021, 17338 Bytes) of package /linux/misc/tcpflow-1.6.1.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "configure.ac": 1.5.0_vs_1.6.1.

    1 #                                               -*- Autoconf -*-
    2 # tcpflow configure.ac
    3 #
    4 # Process this file with autoconf to produce a configure script.
    5 # Order is largely irrevellant, although it must start with AC_INIT and end with AC_OUTPUT
    6 # See http://autotoolset.sourceforge.net/tutorial.html
    7 # and http://www.openismus.com/documents/linux/automake/automake.shtml
    8 
    9 AC_PREREQ(2.57)
   10 AC_INIT(TCPFLOW, 1.6.1, simsong@acm.org)
   11 AC_CONFIG_MACRO_DIR([m4])
   12 
   13 AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile doc/Makefile])
   14 AC_CONFIG_FILES([doc/tcpflow.1])
   15 AC_CONFIG_FILES([tcpflow.spec])
   16 AC_CONFIG_HEADER([config.h])
   17 
   18 # https://stackoverflow.com/questions/15013672/use-autotools-with-readme-md
   19 AM_INIT_AUTOMAKE([foreign])
   20 AM_MAINTAINER_MODE
   21 AC_PREFIX_PROGRAM(tcpflow) dnl build for same location
   22 
   23 # Endian check is required for MD5 implementation
   24 AC_C_BIGENDIAN
   25 
   26 # Programs we will be using
   27 AC_PROG_CC
   28 AC_PROG_CXX
   29 AM_PROG_CC_C_O                  dnl allow per-product flags
   30 AC_PROG_INSTALL
   31 
   32 m4_include([m4/slg_searchdirs.m4])
   33 m4_include([m4/slg_gcc_all_warnings.m4])
   34 
   35 # Must use C++17 mode. (mandatory)
   36 AC_LANG_PUSH(C++)
   37 AX_CXX_COMPILE_STDCXX([17], [noext], [mandatory])
   38 AC_LANG_POP()
   39 
   40 
   41 ################################################################
   42 ## See if we are running on mingw
   43 # http://osdir.com/ml/gnu.mingw.devel/2003-09/msg00040.html
   44 # Note: Windows 95 WINVER=0x400
   45 # Windows 98 WINVER=0x400  _WIN32_WINDOWS=0x0410
   46 # Windows Me WINVER=0x400  _WIN32_WINDOWS=0x0490
   47 # Windows NT 4.0 WINVER=0x0400  _WIN32_WINNT=0x0400
   48 # Windows NT 4.0 SP3 WINVER=0x0400 _WIN32_WINNT=0x0403
   49 # Windows 2000 WINVER=0x500 _WIN32_WINNT=0x0500
   50 # Windows XP WINVER=0x501 _WIN32_WINNT=0x0501
   51 # Windows Server 2003 WINVER=0x502 _WIN32_WINNT=0x0502
   52 #
   53 # mingw32 includes  i686-w64-mingw32 and  x86_64-w64-mingw32
   54 
   55 mingw="no"
   56 case $host in
   57   *-*-*linux*-*)
   58      AC_DEFINE([__LINUX__],1,[Linux operating system functions])
   59      ;;
   60 
   61   *-*-mingw32*)
   62      LIBS="-lpsapi -lws2_32 -lgdi32 $LIBS"
   63      CPPFLAGS="-DUNICODE -D_UNICODE -D__MSVCRT_VERSION__=0x0601 -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -g $CPPFLAGS"
   64      CPPFLAGS="$CPPFLAGS --static"
   65      CFLAGS="$CFLAGS --static -static-libgcc -static-libstdc++"
   66      CXXFLAGS="$CXXFLAGS -Wno-format "  # compiler mingw-4.3.0 is broken on I64u formats
   67      CXXFLAGS="$CXXFLAGS --static -static-libgcc -static-libstdc++"
   68      LDFLAGS="$LDFLAGS --static"
   69      mingw="yes"
   70      ;;
   71 
   72    *)
   73      CXXFLAGS="$CXXFLAGS -Wno-address-of-packed-member"
   74      ;;
   75 esac
   76 
   77 if test x"${mingw}" == "xno" ; then
   78   # Bring additional directories where things might be found into our
   79   # search path. I don't know why autoconf doesn't do this by default
   80   for spfx in /usr/local /opt/local /sw /usr/local/ssl /usr/boost/include ; do
   81     AC_MSG_NOTICE([checking ${spfx}/include])
   82     if test -d ${spfx}/include; then
   83         CPPFLAGS="-I${spfx}/include $CPPFLAGS"
   84         LDFLAGS="-L${spfx}/lib $LDFLAGS"
   85         AC_MSG_NOTICE([ *** ADDING ${spfx}/include to CPPFLAGS *** ])
   86         AC_MSG_NOTICE([ *** ADDING ${spfx}/lib to LDFLAGS *** ])
   87     fi
   88   done
   89   AC_MSG_NOTICE([ CPPFLAGS = ${CPPFLAGS} ])
   90   AC_MSG_NOTICE([ LDFLAGS = ${LDFLAGS} ])
   91 fi
   92 
   93 if test -r /bin/uname.exe ; then
   94   if test "`uname -o`" == "Msys" ; then
   95     AC_MSG_NOTICE([Compiling with Msys. Setting flags appropriately.])
   96     LIBS="$LIBS -lws2_32 -lgdi32"
   97     LDFLAGS="$LDFLAGS -Wl,--enable-auto-import"
   98   fi
   99 fi
  100 
  101 ################################################################
  102 #
  103 # Enable all the compiler debugging we can find
  104 #
  105 # This is originally from PhotoRec, but modified substantially by Simson
  106 # Figure out which flags we can use with the compiler.
  107 #
  108 # These I don't like:
  109 # -Wdeclaration-after-statement -Wconversion
  110 # doesn't work: -Wunreachable-code
  111 # causes configure to crash on gcc-4.2.1: -Wsign-compare-Winline
  112 # causes warnings with unistd.h:  -Wnested-externs
  113 # Just causes too much annoyance: -Wmissing-format-attribute
  114 # Check GCC
  115 WARNINGS_TO_TEST="-MD -D_FORTIFY_SOURCE=2 -Wpointer-arith -Wmissing-declarations -Wmissing-prototypes \
  116     -Wshadow -Wwrite-strings -Wcast-align -Waggregate-return \
  117     -Wbad-function-cast -Wcast-qual -Wundef -Wredundant-decls -Wdisabled-optimization \
  118     -Wfloat-equal -Wmultichar -Wc++-compat -Wmissing-noreturn "
  119 
  120 if test $mingw = "no" ; then
  121   # add the warnings we do not want to do on mingw
  122   WARNINGS_TO_TEST="$WARNINGS_TO_TEST -Wall -Wstrict-prototypes"
  123 fi
  124 
  125 echo "Warnings to test: $WARNINGS_TO_TEST"
  126 
  127 for option in $WARNINGS_TO_TEST
  128 do
  129   SAVE_CFLAGS="$CFLAGS"
  130   CFLAGS="$CFLAGS $option"
  131   AC_MSG_CHECKING([whether gcc understands $option])
  132   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
  133       [has_option=yes],
  134       [has_option=no; CFLAGS="$SAVE_CFLAGS"])
  135   AC_MSG_RESULT($has_option)
  136   unset has_option
  137   unset SAVE_CFLAGS
  138   if test $option = "-Wmissing-format-attribute" ; then
  139     AC_DEFINE(HAVE_MISSING_FORMAT_ATTRIBUTE_WARNING,1,
  140 		[Indicates that we have the -Wmissing-format-attribute G++ warning])
  141   fi
  142 done
  143 unset option
  144 
  145 
  146 # CUT1
  147 ################################################################
  148 ##
  149 
  150 
  151 #
  152 # ZLIB is required for decompressing
  153 #  Note you cannot put comments in the AC_MSG_ERROR for some reason
  154 AC_CHECK_LIB([z],[uncompress],,
  155   AC_MSG_ERROR([zlib libraries not installed; try installing zlib-dev zlib-devel zlib1g-dev or libz-dev]))
  156 AC_CHECK_HEADERS([zlib.h])
  157 
  158 ################################################################
  159 ## regex support
  160 ## there are several options
  161 ## tre is better than regex
  162 AC_CHECK_HEADER([lightgrep/api.h])
  163 AC_CHECK_LIB([lightgrep], [lg_create_pattern])
  164 AC_CHECK_HEADERS([regex.h tre/tre.h])
  165 AC_CHECK_LIB([regex],[regcomp])
  166 AC_CHECK_LIB([tre],[tre_regcomp])
  167 AC_CHECK_FUNCS([regcomp tre_regcomp tre_version])
  168 
  169 
  170 ################################################################
  171 ## OpenSSL Support (required for hash_t )
  172 AC_CHECK_HEADERS([openssl/aes.h openssl/bio.h openssl/evp.h openssl/hmac.h openssl/md5.h openssl/pem.h openssl/rand.h openssl/rsa.h openssl/sha.h openssl/pem.h openssl/x509.h])
  173 AC_CHECK_LIB([dl],[dlopen])                   dnl apparently OpenSSL now needs -ldl on some Linux
  174 AC_CHECK_LIB([crypto],[EVP_get_digestbyname])	# if crypto is available, get it
  175 AC_CHECK_LIB([md],[MD5])                        # if libmd is available, get it
  176 
  177 # Need either SSL_library_init or OPENSSL_init_ssl, depending on openssl version
  178 AC_CHECK_LIB([ssl],[SSL_library_init],,
  179      AC_CHECK_LIB([ssl],[OPENSSL_init_ssl],,
  180           AC_MSG_ERROR([OpenSSL developer library 'libssl-dev' or 'openssl-devel' not installed])))
  181 
  182 AC_CHECK_FUNCS([MD5_Init EVP_get_digestbyname])
  183 
  184 ################################################################
  185 ## Includes
  186 
  187 m4_include([src/be13_api/be13_configure.m4])
  188 m4_include([src/be13_api/dfxml/src/dfxml_configure.m4])
  189 
  190 ################################################################
  191 # Boost
  192 AC_CHECK_HEADERS([boost/version.hpp],,
  193   AC_MSG_WARN([tcpflow now requires boost interval_map and interval_set.])
  194   if test x"$mingw" = x"yes" ; then
  195     AC_MSG_ERROR([Please install mingw32-boost and mingw64-boost])
  196   else
  197     AC_MSG_ERROR([Please install boost-devel or libboost-dev.])
  198   fi
  199 )
  200 
  201 # Now make sure we have the correct boost version
  202 AC_LANG_PUSH(C++)
  203   have_interval=yes
  204   AC_CHECK_HEADERS([boost/icl/interval.hpp boost/icl/interval_map.hpp boost/icl/interval_set.hpp],,have_interval=no)
  205   if test "${have_interval}" != yes ; then
  206     AC_MSG_ERROR([
  207 tcpflow requires a version of Boost that has Boost interval_map and interval_set.
  208 Your version is too old! Please install a current version of Boost from http://www.boost.org/users/download/.
  209 
  210 Try these commands:
  211   wget http://downloads.sourceforge.net/project/boost/boost/1.53.0/boost_1_53_0.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fboost%2Ffiles%2Fboost%2F1.53.0%2F&ts=1362359340&use_mirror=hivelocity
  212   tar xfz boost_1_53_0.tar.gz
  213   cd boost_1_53_0
  214   sh bootstrap.sh
  215   ./b2
  216   sudo ./b2 install
  217 ... and then re-run configure!
  218 ])
  219   fi
  220 AC_LANG_POP()
  221 
  222 ################################################################
  223 # drawing support via cairo
  224 #
  225 cairo=test
  226 AC_ARG_ENABLE([cairo],[  --enable-cairo=false to disable libcairo even if present])
  227   if test "${enable_cairo}" = false ; then
  228     cairo=false
  229   fi
  230 
  231 if test $cairo = test ; then
  232   # Cairo requires these to be explicitly included on mingw (and perhaps others):
  233   AC_CHECK_LIB([expat],[XML_ParserCreate])
  234   AC_CHECK_LIB([pixman-1],[pixman_region_init])
  235   AC_CHECK_LIB([bz2],[BZ2_bzDecompress])
  236   AC_CHECK_LIB([freetype],[FT_Init_FreeType]) # requires bz2
  237   AC_CHECK_LIB([fontconfig],[FcBlanksCreate]) # requires freetype expat
  238 
  239   AC_CHECK_HEADERS([cairo/cairo.h cairo/cairo-pdf.h])
  240   AC_CHECK_HEADERS([cairo.h cairo-pdf.h])
  241   AC_CHECK_LIB([cairo],[cairo_create], , [
  242     AC_MSG_WARN([
  243   *** cairo libraries not detected.
  244   *** Please install cairo-devel to get 1-page PDF summary generation.
  245   ])
  246     Fmissing_library="$Fmissing_library cairo-devel "
  247     Umissing_library="$Umissing_library libcairo2-dev "
  248     Mmissing_library="$Mmissing_library cairo-devel "
  249   ])
  250 fi
  251 
  252 ################################################################
  253 # pcap support. A bit more involved than normal due to the error message
  254 #
  255 AC_CHECK_HEADERS(pcap.h pcap/pcap.h )
  256 if test x"$mingw" = x"yes" ; then
  257     AC_MSG_WARN([pcap not supported under mingw])
  258 else
  259     AC_CHECK_LIB(pcap, pcap_lookupdev, , [
  260         enable_pcap=no
  261 	AC_MSG_WARN([
  262 Can't find the pcap library (libpcap.a).
  263 tcpflow will not live capture or compile rules without pcap!
  264 
  265 If you need rules or live capture, you must install the pcap and/or
  266 pcap-dev library.  Please execute this command:
  267 
  268   UBUNTU: sudo apt-get install libpcap-dev
  269   DEBIAN: sudo apt-get install libpcap-dev
  270   FEDORA: sudo dnf install libpcap-devel
  271   MINGW:  Sorry!  libpcap is not currently
  272           available when cross-compiling.
  273 
  274 If your libpcap is installed in a non-standard location, you will need
  275 to use the --with-pcap=directory to specify where your pcap is
  276 located.])
  277         Fmissing_library="$Fmissing_library libpcap-dev "
  278         Umissing_library="$Umissing_library libpcap-dev "
  279         Mmissing_library="$Mmissing_library libpcap "
  280     ])
  281 fi
  282 AC_CHECK_FUNCS([pcap_findalldevs])
  283 
  284 dnl set with_wifi to 0 if you do not want it
  285 AC_ARG_ENABLE([wifi],
  286               AS_HELP_STRING([--disable-wifi], [Disable WIFI decoding]),
  287               [],
  288 	      [
  289                if test x"no" = x"$mingw"; then
  290                  AC_DEFINE(USE_WIFI, 1, [Use WIFI decompression])
  291                  wifi="yes"
  292                fi
  293               ])
  294 AM_CONDITIONAL([WIFI_ENABLED], [test "yes" = "$wifi"])
  295 
  296 
  297 ################################################################
  298 #
  299 # LIBCAP_NG
  300 # Check for libcap-ng
  301 AC_MSG_CHECKING(whether to use libcap-ng)
  302 # Specify location for both includes and libraries.
  303 want_libcap_ng=ifavailable
  304 AC_ARG_WITH(cap_ng,
  305     AS_HELP_STRING([--with-cap-ng],
  306 		   [use libcap-ng @<:@default=yes, if available@:>@]),
  307 [
  308 	if test $withval = no
  309 	then
  310 		want_libcap_ng=no
  311 		AC_MSG_RESULT(no)
  312 	elif test $withval = yes
  313 	then
  314 		want_libcap_ng=yes
  315 		AC_MSG_RESULT(yes)
  316 	fi
  317 ],[
  318 	#
  319 	# Use libcap-ng if it's present, otherwise don't.
  320 	#
  321 	want_libcap_ng=ifavailable
  322 	AC_MSG_RESULT([yes, if available])
  323 ])
  324 if test "$want_libcap_ng" != "no"; then
  325         #
  326         # note: it really is cap-ng.h, and not cap_ng.h
  327         #
  328 	AC_CHECK_LIB(cap-ng, capng_change_id)
  329 	AC_CHECK_HEADERS(cap-ng.h)
  330 fi
  331 
  332 
  333 
  334 ################################################################
  335 # Specify our other headers
  336 
  337 AC_HEADER_STDC
  338 AC_CHECK_HEADERS([\
  339 	arpa/inet.h \
  340 	ctype.h \
  341 	fcntl.h \
  342         grp.h \
  343 	inttypes.h \
  344 	linux/if_ether.h \
  345 	net/ethernet.h \
  346 	netinet/in.h \
  347 	netinet/in_systm.h \
  348 	netinet/tcp.h \
  349 	regex.h \
  350 	semaphore.h \
  351 	signal.h \
  352 	string.h \
  353 	strings.h \
  354 	stdio.h \
  355 	stdlib.h \
  356 	string.h \
  357 	syslog.h \
  358 	sys/cdefs.h \
  359 	sys/mman.h \
  360 	sys/param.h \
  361 	sys/resource.h \
  362 	sys/socket.h \
  363 	sys/types.h \
  364 	sys/bitypes.h \
  365 	sys/wait.h \
  366 	unistd.h \
  367 	])
  368 
  369 AC_CHECK_FUNCS([getdtablesize])
  370 
  371 #
  372 # These all require additional headers. See:
  373 # http://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Present-But-Cannot-Be-Compiled.html
  374 #
  375 AC_CHECK_HEADERS([net/if_var.h], [], [],
  376 [[
  377 #include <sys/types.h>
  378 #include <sys/socket.h>
  379 #include <net/if.h>
  380 ]])
  381 
  382 
  383 
  384 AC_CHECK_HEADERS([net/if.h], [], [],
  385 [[
  386 #ifdef HAVE_SYS_TYPES_H
  387 #include <sys/types.h>
  388 #endif
  389 
  390 #if HAVE_NET_IF_VAR_H
  391 #include <net/if_var.h>
  392 #endif
  393 
  394 #ifdef HAVE_SYS_SOCKET_H
  395 #include <sys/socket.h>
  396 #endif
  397 ]])
  398 
  399 AC_CHECK_HEADERS([netinet/ip_var.h], [], [],
  400 [[
  401 #ifdef HAVE_SYS_TYPES_H
  402 #include <sys/types.h>
  403 #endif
  404 
  405 #if HAVE_NETINET_IN_H
  406 #include <netinet/in.h>
  407 #endif
  408 ]])
  409 
  410 AC_CHECK_HEADERS([netinet/ip.h], [], [],
  411 [[
  412 #ifdef HAVE_SYS_TYPES_H
  413 #include <sys/types.h>
  414 #endif
  415 
  416 #if HAVE_NETINET_IN_H
  417 #include <netinet/in.h>
  418 #endif
  419 ]])
  420 
  421 AC_CHECK_HEADERS([netinet/ip_ether.h], [], [],
  422 [[
  423 #ifdef HAVE_SYS_TYPES_H
  424 #include <sys/types.h>
  425 #endif
  426 
  427 #if HAVE_NETINET_IN_H
  428 #include <netinet/in.h>
  429 #endif
  430 ]])
  431 
  432 
  433 AC_CHECK_HEADERS([netinet/tcpip.h], [], [],
  434 [[
  435 #ifdef HAVE_SYS_TYPES_H
  436 #include <sys/types.h>
  437 #endif
  438 
  439 #if HAVE_NETINET_IN_H
  440 #include <netinet/in.h>
  441 #endif
  442 
  443 #if HAVE_NETINET_IP_VAR_H
  444 #include <netinet/ip_var.h>
  445 #endif
  446 
  447 #if HAVE_NETINET_TCP_H
  448 #include <netinet/tcp.h>
  449 #endif
  450 ]])
  451 
  452 AC_CHECK_FUNCS([inet_ntop sigaction sigset strnstr setuid setgid mmap futimes futimens ])
  453 AC_CHECK_TYPES([socklen_t], [], [],
  454 [[
  455 #ifdef HAVE_SYS_TYPES_H
  456 #include <sys/types.h>
  457 #endif
  458 
  459 #ifdef HAVE_ARPA_INET_H
  460 #include <arpa/inet.h>
  461 #endif
  462 
  463 #ifdef HAVE_SYS_SOCKET_H
  464 #include <sys/socket.h>
  465 #endif
  466 
  467 #ifdef HAVE_NETINET_TCP_H
  468 #include <netinet/tcp.h>
  469 #endif
  470 ]]
  471 )
  472 
  473 AC_CHECK_TYPES([sa_family_t], [], [],
  474 [[
  475 #ifdef HAVE_SYS_TYPES_H
  476 #include <sys/types.h>
  477 #endif
  478 
  479 #ifdef HAVE_ARPA_INET_H
  480 #include <arpa/inet.h>
  481 #endif
  482 
  483 #ifdef HAVE_SYS_SOCKET_H
  484 #include <sys/socket.h>
  485 #endif
  486 
  487 #ifdef HAVE_NETINET_TCP_H
  488 #include <netinet/tcp.h>
  489 #endif
  490 ]]
  491 )
  492 
  493 ################################################################
  494 # Plugin scan_python.cpp requires header "Python.h"
  495 # If the header is not present => Disable the source code of the plugin
  496 #
  497 AC_CHECK_HEADERS(python2.7/Python.h)  # ==> #define HAVE_PYTHON2_7_PYTHON_H
  498 AC_CHECK_LIB(python2.7,Py_Initialize,,[
  499   AC_MSG_WARN([
  500 *** Cannot find python library.
  501 *** Please install python-devel to enable scanner python.
  502   ])
  503   Fmissing_library="$Fmissing_library python-devel "      # Validated on Fedora 25
  504   Umissing_library="$Umissing_library libpython2.7-dev"   # Should be OK: https://packages.ubuntu.com/yakkety/libpython2.7-dev
  505   Mmissing_library="$Mmissing_library python27"           # Not sure: https://github.com/macports/macports-ports/blob/master/lang/python27/Portfile
  506 ])
  507 
  508 ################################################################
  509 # Plugin scanner_python.cpp requires header "Python.h"
  510 # If the header is not present => Disable the source code of the plugin
  511 #
  512 AC_CHECK_HEADERS(python2.7/Python.h)  # ==> #define HAVE_PYTHON2_7_PYTHON_H
  513 AC_CHECK_LIB(python2.7,Py_Initialize,,[
  514   AC_MSG_WARN([
  515 *** Cannot find python library.
  516 *** Please install python-devel to enable scanner python.
  517   ])
  518   Fmissing_library="$Fmissing_library python-devel "      # Validated on Fedora 25
  519   Umissing_library="$Umissing_library libpython2.7-dev"   # Should be OK: https://packages.ubuntu.com/yakkety/libpython2.7-dev
  520   Mmissing_library="$Mmissing_library python27"           # Not sure: https://github.com/macports/macports-ports/blob/master/lang/python27/Portfile
  521 ])
  522 
  523 ############## drop optimization flags if requested ################
  524 
  525 # Should we disable optimization?
  526 AC_ARG_WITH([opt], AC_HELP_STRING([--without-opt], [Drop all -O C flags]))
  527 # Or maybe just tone it down a bit?
  528 AC_ARG_WITH([o3], AC_HELP_STRING([--without-o3], [Do not force O3 optimization; use default level]))
  529 
  530 if test x"${AFF_NOOPT}" != "x" ; then
  531   AC_MSG_NOTICE([Dropping optimization flags because AFF_NOOPT is set.])
  532    with_opt="no";
  533 fi
  534 
  535 if test "${with_opt}" = "no" ; then
  536   AC_MSG_NOTICE([Dropping optimization flags])
  537   CFLAGS=`echo "$CFLAGS" | sed s/-O[[0-9]]//`             # note the double quoting!
  538   CXXFLAGS=`echo "$CXXFLAGS" | sed s/-O[[0-9]]//`
  539 
  540   AC_MSG_NOTICE([Removing -D_FORTIFY_SOURCE=2])
  541   CPPFLAGS=`echo $CPPFLAGS | sed s/-D_FORTIFY_SOURCE=2//`
  542   CXXFLAGS=`echo $CXXFLAGS | sed s/-D_FORTIFY_SOURCE=2//`
  543   CFLAGS=`echo $CFLAGS | sed s/-D_FORTIFY_SOURCE=2//`
  544 else
  545   # and increase optimizer from -O2 to -O3 if not explicitly forbidden
  546   if test "${with_o3}" != "no" ; then
  547       CFLAGS=`echo   -g "$CFLAGS"   | sed s/-O2/-O3/`             # note the double quoting!
  548       CXXFLAGS=`echo -g "$CXXFLAGS" | sed s/-O2/-O3/`
  549   fi
  550 fi
  551 
  552 AC_OUTPUT
  553 
  554 ## Finally, record the values of CFLAGS, CPPFLAGS, and CXXFLAGS for DFXML
  555 echo "#define CPPFLAGS \"$CPPFLAGS\"" >> config.h
  556 echo "#define CFLAGS   \"$CFLAGS\""   >> config.h
  557 echo "#define CXXFLAGS \"$CXXFLAGS\"" >> config.h
  558 echo "#define LIBS     \"$LIBS\""     >> config.h
  559 echo "#define LDFLAGS  \"$LDFLAGS\""  >> config.h
  560 if test x"$GIT_COMMIT" != "x" ; then
  561   echo "#define GIT_COMMIT  \"$GIT_COMMIT\""  >> config.h
  562 fi
  563 
  564 if test "x${Fmissing_library}" != "x" ; then
  565   AC_MSG_NOTICE([*** You have missing libraries. To install them:])
  566   AC_MSG_NOTICE([*** Red Hat: sudo yum install $Fmissing_library])
  567   AC_MSG_NOTICE([*** Fedora:  sudo dnf install $Fmissing_library])
  568   AC_MSG_NOTICE([*** Ubuntu:  sudo apt-get install $Umissing_library])
  569   AC_MSG_NOTICE([*** MacOS:   sudo port install $Mmissing_library])
  570 fi