Warning, /online_distribution/eventlibraries/configure.ac is written in an unsupported language. File is not indexed.
0001 AC_INIT(Event,[1.00])
0002 AC_CONFIG_SRCDIR([configure.ac])
0003
0004
0005 AM_CONDITIONAL(VXWORKS, false)
0006 AM_CONDITIONAL(LINUX, false)
0007 AM_CONDITIONAL(NEWIO, false)
0008
0009 AC_CANONICAL_HOST
0010 AC_CONFIG_AUX_DIR([.])
0011
0012 #CXXFLAGS="-O0 -g"
0013
0014 dnl search for C++ compiler and set default flags
0015 AC_PROG_CXX(cxx CC g++)
0016
0017 case "$host" in
0018 *-*-linux*)
0019 CPPFLAGS="$CPPFLAGS -DLinux"
0020 LT_INIT([disable-static])
0021 AM_CONDITIONAL(LINUX, true)
0022 ;;
0023 *-*-osf*)
0024 CPPFLAGS="$CPPFLAGS -DOSF1 -D_BSD"
0025 LIBS="-lm"
0026 LT_INIT([disable-static])
0027 ;;
0028 *-*-solaris2.6)
0029 ;;
0030 *-*-solaris2.8)
0031 CPPFLAGS="$CPPFLAGS -DSunOS"
0032 dnl Chris: default flags with optimizer screw shared lib
0033 dnl CXXFLAGS="+p -mt -g -xildoff"
0034 CXXFLAGS="$CXXFLAGS +p -mt -fast -xO5"
0035 LIBS="-lm -lc -lsocket -lrt -lnsl -lresolv"
0036 LT_INIT([disable-shared])
0037 ;;
0038 powerpc-wrs-vxworks)
0039 AM_CONDITIONAL(VXWORKS, true)
0040 ;;
0041 *-*-irix5*)
0042 CPPFLAGS="-DIRIX"
0043 ;;
0044 *-*-irix6*)
0045 CPPFLAGS="-DIRIX64"
0046 ;;
0047 *-*-cyg*)
0048 CPPFLAGS=" -DNT"
0049 ;;
0050 *)
0051 AC_MSG_ERROR([default compiler unknown for this system!])
0052 ;;
0053 esac
0054
0055 AM_INIT_AUTOMAKE(Event,1.00)
0056
0057 AC_PROG_INSTALL
0058
0059 dnl no point in suppressing warnings people should
0060 dnl at least see them, so here we go for g++: -Wall
0061 if test $ac_cv_prog_gxx = yes; then
0062 CXXFLAGS="$CXXFLAGS -Wall -Werror -Wno-overloaded-virtual -Wno-class-memaccess -Wno-unused-parameter -Wno-type-limits -Wno-unused-but-set-parameter -Wno-unused-but-set-variable -Wno-deprecated-declarations"
0063 fi
0064
0065 case $CXX in
0066 clang++)
0067 CXXFLAGS="$CXXFLAGS -Wno-unknown-warning-option -Wno-nontrivial-memcall"
0068 ;;
0069 esac
0070
0071
0072 AC_HEADER_STDC
0073 AC_CHECK_HEADERS(getopt.h)
0074
0075 AC_CHECK_FUNCS(setenv)
0076
0077 ROOTGLIBS=`root-config --glibs`
0078 ROOTINC=`root-config --incdir`
0079 AC_SUBST(ROOTGLIBS)
0080 AC_SUBST(ROOTINC)
0081 dnl test for root 6
0082 if test `root-config --version | awk '{print $1=6.?"1":"0"}'` = 1; then
0083 CINTDEFS=" -noIncludePaths -inlineInputHeader "
0084 AC_SUBST(CINTDEFS)
0085 AC_DEFINE(HAVE_ROOT6)
0086 fi
0087 AM_CONDITIONAL([MAKEROOT6],[test `root-config --version | awk '{print $1=6.?"1":"0"}'` = 1])
0088
0089 LZOLIB="-llzo2"
0090 AC_SUBST(LZOLIB)
0091
0092
0093 dnl sorry - we want to find out if the prototype is in the header.
0094 dnl We cannot use AC_CHECK_FUNCS(strptime) because it always returns true
0095 dnl so we try to compile the two lines and see what we get.
0096 dnl With gcc-2.95++ we should get an error and can define the
0097 dnl prototypes ourselves.
0098
0099 AC_LANG_SAVE
0100 AC_LANG_CPLUSPLUS
0101 AC_MSG_CHECKING([for strptime])
0102 AC_TRY_COMPILE([#include <time.h>],[
0103 tm newTime;
0104 strptime("12-04-2000", "%A %h %d %H:%M:%S %Y", &newTime);],
0105 have_strptime_prototype=yes, have_strptime_prototype=no)
0106 AC_MSG_RESULT([$have_strptime_prototype])
0107 if test $have_strptime_prototype = yes; then
0108 AC_DEFINE(HAVE_STRPTIME_PROTOTYPE)
0109 fi
0110 AC_LANG_RESTORE
0111
0112 dnl for the message library, we must use a custom check.
0113 dnl there are two distict types of systems, one where
0114 dnl a new streambuf is given to cout as a parameter,
0115 dnl ( cout.rdbuf(x) ), the other by assignment (cout = x)
0116
0117 AC_LANG_SAVE
0118 AC_LANG_CPLUSPLUS
0119 AC_MSG_CHECKING([whether cout accepts a streambuf arg])
0120 AC_TRY_COMPILE([#include <iostream>],[
0121 std::streambuf *x = std::cout.rdbuf();
0122 std::cout.rdbuf(x);],
0123 rdbuf_accepts_streambuf=yes, rdbuf_accepts_streambuf=no)
0124 AC_MSG_RESULT([$rdbuf_accepts_streambuf])
0125 if test $rdbuf_accepts_streambuf = yes; then
0126 AC_DEFINE(RDBUF_ACCEPTS_STREAMBUF)
0127 fi
0128 AC_LANG_RESTORE
0129
0130 AC_LANG_SAVE
0131 AC_LANG_CPLUSPLUS
0132 AC_MSG_CHECKING([whether we have a new iostream])
0133 AC_TRY_COMPILE([#include <iostream>],[
0134 std::streambuf *x = std::cout.rdbuf();
0135 x->pubsync();],
0136 new_iostream=yes, new_iostream=no)
0137 AC_MSG_RESULT([$new_iostream])
0138 if test $new_iostream = yes; then
0139 AM_CONDITIONAL(NEWIO, true)
0140 fi
0141 AC_LANG_RESTORE
0142
0143 AC_ARG_ENABLE(demos,
0144 [ --enable-demos build demos [default=yes]],
0145 [case "${enableval}" in
0146 yes) demos=true ;;
0147 no) demos=false ;;
0148 *) AC_MSG_ERROR(bad value ${enableval} for --enable-demos) ;;
0149 esac],
0150 demos=true)
0151 AM_CONDITIONAL(DEMOS, test "$demos" = true)
0152
0153 AC_CONFIG_FILES([Makefile])
0154 AC_OUTPUT