# autoreconf --force --install AC_INIT([FACT++],[1.0],[thomas.bretz@epfl.ch],[FACTpp],[http://hello.example.com/]) AC_PREREQ([2.65]) AC_CONFIG_FILES([Makefile]) # causes x/Makefile.in to be created if x/Makefile.am exists #AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([.macro_dir]) AC_CONFIG_AUX_DIR([.aux_dir]) AC_PROG_CC([colorgcc gcc]) #If output variable CXXFLAGS was not already set, set it to -g -O2 AC_PROG_CXX([colorgcc g++]) LT_INIT([disable-static]) AC_LANG(C++) #AC_PATH_XTRA AM_INIT_AUTOMAKE([1.11 -Wall subdir-objects std-options no-define color-tests parallel-tests silent-rules]) AM_SILENT_RULES([yes]) AM_PROG_CC_C_O ###################################################################### # DOXYGEN SUPPORT ###################################################################### ### FIXME: Need a configure commandline switch DX_ENV_APPEND(EXTRACT_ALL, YES) DX_ENV_APPEND(RECURSIVE, YES) DX_ENV_APPEND(ALL_GRAPHS, NO) # change to yet to switch on call(er) graphs #DX_DOXYGEN_FEATURE(ON) #DX_DOT_FEATURE(ON) # sets HAVE_DOT #DX_HTML_FEATURE(ON) # sets GENERATE_HTML (default) #DX_CHM_FEATURE(ON|OFF) # sets GENERATE_HTMLHELP #DX_CHI_FEATURE(ON|OFF) # sets GENERATE_CHI #DX_MAN_FEATURE(ON) # sets GENERATE_MAN (segfaults) #DX_RTF_FEATURE(ON|OFF) # sets GENERATE_RTF #DX_XML_FEATURE(ON|OFF) # sets GENERATE_XML #DX_PDF_FEATURE(ON|OFF) # sets GENERATE_PDF (default) DX_PS_FEATURE(OFF) # sets GENERATE_PS (default) DX_INIT_DOXYGEN($PACKAGE_NAME)#, DOXYFILE-PATH, [OUTPUT-DIR]) #USE_HTAGS = $(USE_HTAGS) ###################################################################### # pthread/Readline/NCurses (pthread needed by dim and boost) ###################################################################### AC_LANG_PUSH(C) ACX_PTHREAD CPPFLAGS+=" "$PTHREAD_CFLAGS" " LDFLAGS+=" "$PTHREAD_CFLAGS" " AC_CHECK_READLINE CPPFLAGS+=" "$READLINE_INCLUDES" " LDFLAGS+=" "$READLINE_LIBS" " #AC_CHECK_LIB(readline, readline, [], # [ # echo "Error! libreadline not found in default libarary paths." # exit -1 # ] #) #AC_CHECK_HEADERS(readline/readline.h, [], # [ # echo "Error! readline/readline.h not properly installed in default include path (maybe readline-dev missing)." # exit -1 # ] #) # AC_CHECK_HEADERS(panel.h, [], [ echo "Error! Ncurses panel.h not properly installed in default include paths." exit -1 ] ) AC_CHECK_LIB(panel, update_panels, [], [ echo "Error! Ncurses libpanel not properly installed in the default libarary paths." exit -1 ] ) AC_LANG_POP ###################################################################### # Xm.h (lesstif/motif, needed by did) ###################################################################### AC_FIND_MOTIF CPPFLAGS+=" "$MOTIF_INCL" " LDFLAGS+=" "$MOTIF_LDFLAGS" " #AC_CHECK_HEADERS([Mrm/MrmAppl.h], [], # [ # echo "Error! Mrm/MrmAppl.h not properly installed, needed to compile did (you need most probably lesstif2-dev)." # exit -1 # ] #) ###################################################################### # MySQL(++) SUPPORT ###################################################################### MYSQL_DEVEL MYSQLPP_DEVEL LDFLAGS+=" -lmysqlpp " ###################################################################### # BOOST SUPPORT ###################################################################### AX_BOOST_BASE([1.40], [], [ echo "Error! The boost C++ libraries are not properly installed." exit -1 ] ) AX_BOOST_ASIO AX_BOOST_DATE_TIME AX_BOOST_FILESYSTEM AX_BOOST_PROGRAM_OPTIONS AX_BOOST_REGEX AX_BOOST_SYSTEM AX_BOOST_THREAD #ax_boost_iostreams #ax_boost_python #ax_boost_serialization #ax_boost_signals #ax_boost_test_exec_monitor #ax_boost_unit_test_framework #ax_boost_wave #ax_boost_wserialization LDFLAGS+=" -lboost_date_time" LDFLAGS+=" -lboost_filesystem" LDFLAGS+=" -lboost_program_options" LDFLAGS+=" -lboost_regex" LDFLAGS+=" -lboost_system" LDFLAGS+=" -lboost_thread " #AC_CHECK_HEADERS( # [\ # boost/bind.hpp \ # boost/lexical_cast.hpp \ # boost/filesystem.hpp \ # boost/thread.hpp \ # boost/function.hpp \ # boost/regex.hpp \ # boost/asio.hpp \ # boost/enable_shared_from_this.hpp \ # boost/asio/deadline_timer.hpp \ # boost/date_time/posix_time/posix_time.hpp \ # boost/date_time/local_time/local_time.hpp \ # boost/date_time/gregorian/gregorian.hpp # ], [], # [ # echo "Error! At least one needed header of the boost C++ libararies is missing." # exit -1 # ] #) ###################################################################### # ROOT SUPPORT ###################################################################### # ROOT_PATH([5.12/00, [ACTION-IF-FOUND, [ACTION-IF-NOT-FOUND]]]) # ROOT_PATH([5.12/00]) # ROOT_PATH(3.03/05, , AC_MSG_ERROR(Your ROOT version is too old)) # ROOT_PATH(, AC_DEFINE([HAVE_ROOT])) # ROOTCONF full path to root-config # ROOTEXEC full path to root # ROOTCINT full path to rootcint # ROOTLIBDIR Where the ROOT libraries are # ROOTINCDIR Where the ROOT headers are # ROOTETCDIR Where the ROOT configuration is # ROOTCFLAGS Extra compiler flags # ROOTLIBS ROOT basic libraries # ROOTGLIBS ROOT basic + GUI libraries # ROOTAUXLIBS Auxilary libraries and linker flags for ROOT # ROOTAUXCFLAGS Auxilary compiler flags # ROOTRPATH Same as ROOTLIBDIR ###################################################################### # Check if we have colordiff to colorize 'svn diff' ###################################################################### AC_CHECK_PROG(COLORDIFF, colordiff, colordiff, cat) ########################################################################### #AC_C_CONST #AC_TYPE_PID_T #AC_HEADER_STDC ########################################################################## # debug compilation support ########################################################################## # #AC_MSG_CHECKING([whether to build with debug information]) #AC_ARG_ENABLE([debug], # [AS_HELP_STRING([--enable-debug], # [enable debug data generation (def=no)])], # [debugit="$enableval"], # [debugit=no]) #AC_MSG_RESULT([$debugit]) # #if test x"$debugit" = x"yes"; then # AC_DEFINE([DEBUG],[],[Debug Mode]) # AM_CXXFLAGS="$AM_CXXFLAGS -g -Wall -Werror -Wno-uninitialized -O0" #else # AC_DEFINE([NDEBUG],[],[No-debug Mode]) # AM_CXXFLAGS="$AM_CXXFLAGS -O3" #fi # ########################################################################### #To get the changed compiler flags distributed among your final Makefiles you have to add the following line somewhere afterwards: # #AC_SUBST([AM_CXXFLAGS]) AC_OUTPUT