dnl Process this file with autoconf 2.13 to produce a configure script dnl for the EGNEO software installation. dnl autoconf-2.13 configure.in > configure #-------------------------------------------------------------------- # Disable caching since it seems to get in the way # more times than it helps us. #-------------------------------------------------------------------- define([AC_CACHE_LOAD], )dnl define([AC_CACHE_SAVE], )dnl # Make sure we're us. AC_INIT(include/eg-neo-ports/StringOutPort.hh.in) # $Header: /cvs/cca-spec/repository/cca-spec-neo/eg-neo/configure.in,v 1.7 2005/05/11 23:58:11 baallan Exp $ # created: Ben Allan 4/2003, Sandia national laboratories/California. # #------------------------------------------------------------------------------ # Directory where we keep the autoconf stuff and some HPC environment folklore. # # Some folklore is keyed to hostname, which is probably a very bad # idea in the long run, but provides examples for frustrated alpha users. # Most of it is keyed to the answers supplied by AC_CANONICAL_SYSTEM. # # We wish MPICH was adapted to use autoconf 2.x so we could steal # conveniently everything they deduce about fortran, mpi, threads, # etc in their configure scripts and extend it to our compilers. #------------------------------------------------------------------------------ AC_CONFIG_AUX_DIR(config) CCAFE_CONFIG_ARGS(CONFIG_ARGS) EGNEO_VERSION=0.9.0 EGNEO_MAJOR_VERSION=0 EGNEO_MINOR_VERSION=9 EGNEO_PATCH_LEVEL=0 VERSION=${EGNEO_VERSION} egneo_build_dir=`pwd` CCAFE_AC_PREFIX($egneo_build_dir) CCAFE_AC_EXEC_PREFIX($egneo_build_dir) CCAFE_PUSHD if test "${prefix}" = "NONE"; then prefix=/usr/local fi if test "${exec_prefix}" = "NONE"; then exec_prefix=$prefix fi # source tree vars EGNEO_ROOT=`pwd` # The next two lines entirely quoted to keep autoconf/m4 # from messing with the [] in the regex. [EGNEO_PARENT=`echo $EGNEO_ROOT | sed 's%[^/][^/]*$%%' | sed 's%\/$%%'`] [EGNEO_ANCESTOR=`echo $EGNEO_PARENT | sed 's%[^/][^/]*$%%' | sed 's%\/$%%'`] # install tree vars EGNEO_INSTALL_ROOT=$prefix PKG_SUBDIR=eg-neo-$VERSION PKG_NAME=eg-neo-$EGNEO_VERSION EGNEO_INC="-I$prefix/include/$PKG_SUBDIR" EGNEO_MAKEINCL=$EGNEO_INSTALL_ROOT/share/$PKG_NAME/MakeIncl_EG_Neo_Vars EGNEO_VER_SUFFIX=-$EGNEO_VERSION EGNEO_VARS_SH=$EGNEO_INSTALL_ROOT/share/$PKG_NAME/EG_Neo_Vars.sh EGNEO_CCA_DATA=$EGNEO_INSTALL_ROOT/share/$PKG_NAME/components EGNEO_INC_RELOCATABLE='-I$(EGNEO_INSTALL_ROOT)/include/'"$PKG_SUBDIR" EGNEO_INSTALLED_CONFIG=$EGNEO_INSTALL_ROOT/bin/eg-neo-config EGNEO_BUILD_ROOT=$EGNEO_ROOT dnl Checks for unix programs. AC_PROG_LN_S AC_PROG_MAKE_SET AC_PROG_RANLIB AC_PROG_INSTALL # FIND which cc AC_ARG_ENABLE(gcc, [ --enable-gcc allow use of gcc if available and -pipe], [tcl_ok=$enableval], [tcl_ok=no]) if test "$tcl_ok" = "yes"; then AC_PROG_CC else CC=${CC-cc} AC_SUBST(CC) fi # FIND if cc has a stupid limitation AC_PROG_CC_C_O # FIND c preprocessor AC_PROG_CPP # --------------------- # hunt up neo spec # --------------------- CSN=cca-spec-neo dnl a dummy value for some case handling if neoclassic is not found NEOCCASPEC_VERSION=NONE cca_neo_install_dirs="$prefix:$CCATUT_HOME:$TOP:$EGNEO_PARENT:$EGNEO_GRANDPARENT:$EGNEO_GREATGRANDPARENT:$EGNEO_ANCESTOR:$HOME:$HOME/cca:/home/alice/CCA:/usr/local" #------------------------------------------------------------------------------ # NEOCCA_ROOT/BOOST_ROOT: See if the user gave us the location of cca-spec-neo # We have to do this one first, because it tells us where boost is. #------------------------------------------------------------------------------ neocca_lastwarn="Neoclassic CCA spec location indeterminate. Use --with-cca-neo=/where/is/cca-spec-neo if wanted, or Use --with-cca-neo=no if not wanted." CCA_NEO_CONFIG_FORCE with_cca_neo_save=$with_cca_neo CCA_SPEC_NEO_CONFIG(NEO_CCA_ROOT_INSTALLED, $cca_neo_install_dirs:$cca_neo_dirs, bin/cca-spec-neo-config, $neocca_lastwarn, NEO_CCA_INSTALLED_CONFIG) if test "x$NEO_CCA_INSTALLED_CONFIG" = "xno" -o "x$NEO_CCA_ROOT_INSTALLED" = "xno" ; then AC_MSG_RESULT([ no. Neoclassic undected or user requested to omit neo.]) AC_MSG_ERROR([ Please specify it with --with-cca-neo. e.g: --with-cca-neo=/where/it/is. Or if multiple versions are installed, configure with --with-neo-config=/path/to/bin/cca-spec-neo-config-\$version ]) HAVE_NEO=0 else AC_MSG_RESULT([$NEO_CCA_ROOT_INSTALLED]) dnl suck in the variables from the spec . `$NEO_CCA_INSTALLED_CONFIG --var NEOCCA_VARS_SH` HAVE_NEO=1 NEO_CCA_CONFIG=`$NEO_CCA_INSTALLED_CONFIG --var NEOCCA_MAKEINCL` fi case "$with_cca_neo" in no) ;; yes) ;; *) if test "x$with_cca_neo" != "x$NEO_CCA_ROOT_INSTALLED" ; then AC_MSG_WARN([value specified to --with-cca-neo was insufficient. Found another ($NEO_CCA_ROOT_INSTALLED) ]) fi ;; esac # --------------------- # set vars from neo spec values # --------------------- CXX=$NEOCCA_CXX BOOST_INC="-INEOCCA_$BOOST_ROOT" if test "$NEOCCA_BOOST_ROOT" = "/usr/include" ; then BOOST_INC="" fi if test "$NEOCCA_BOOST_ROOT" = "/usr/local/include" ; then BOOST_INC="" fi #------------------------------------------------------------------------------ # see if the user gave us the location of clueful make #------------------------------------------------------------------------------ AC_ARG_WITH(gmake, [Location of gmake: --with-gmake=EXECUTABLE The location of gmake. Give the full path: --with-gmake='/share/bizarre/bin/gmake' ] , , [with_gmake=yes]) case "$with_gmake" in no) cca_have_gmake=no ;; yes) # User didn't give the option or didn't give useful # information, search for it ourselves with_gmake=_searching ;; *) # Only the library was specified GMAKE="$with_gmake" ;; esac if test "$with_gmake" = _searching ; then AC_CHECK_PROG(gmake_1, gmake, gmake, NONE) if test ! "$gmake_1" = NONE ; then GMAKE="$gmake_1" fi fi #---------------------------------------------------------------------------- # See if c++ namespaces cannot end with ; or if namespaces not supported at all. #---------------------------------------------------------------------------- NAMESPACE_NEEDS_ENDSEMI="broken" NAMESPACE_TEST_DONE="no" AC_MSG_CHECKING([C++ for namespaces]) $CXX -DNAMESPACE_NEEDS_ENDSEMI -o config.nsWithSemi.exe config/namespaceTest.cpp $CXX -o config.nsWithoutSemi.exe config/namespaceTest.cpp if test -x config.nsWithoutSemi.exe ; then AC_MSG_RESULT(yes) NAMESPACE_NEEDS_ENDSEMI="" NAMESPACE_TEST_DONE="yes" fi # if test "$NAMESPACE_NEEDS_ENDSEMI" = broken -a -x config.nsWithSemi.exe ; then # if compiler allows it, use it. if test "$NAMESPACE_TEST_DONE" = "no" ; then if test -x config.nsWithSemi.exe ; then AC_MSG_RESULT(yes) NAMESPACE_NEEDS_ENDSEMI=";" fi fi if test "NAMESPACE_NEEDS_ENDSEMI" = broken ; then AC_MSG_RESULT(no) AC_MSG_ERROR([C++ compiler {$CXX}cannot compile namespaces. Bye!.]) fi rm -f config.nsWithoutSemi.exe config.nsWithSemi.exe #------------------------------------------------------------------------------ # see if the user gave us the location of the doxygen #------------------------------------------------------------------------------ DOXYGEN="" AC_ARG_WITH(doxygen, [Location of doxygen: --with-doxygen=EXECUTABLE The location of the doxygen binary. Give the full path: --with-doxygen='/share/bizarre/bin/doxygen' ], , [with_doxygen=yes]) case "$with_doxygen" in no) # User specified --without-doxygen; AC_MSG_WARN([Option '--without-doxygen' Causes some c++ documentation generation to be skipped.]) cca_have_doxygen=no ;; yes) # User didn't give the option or didn't give useful # information, search for it ourselves with_doxygen=_searching ;; *) DOXYGEN="$with_doxygen" cca_have_doxygen=yes ;; esac if test "$with_doxygen" = _searching ; then AC_CHECK_PROG(doxygen_1, doxygen, doxygen, NONE) if test ! "$doxygen_1" = NONE ; then DOXYGEN=`which $doxygen_1` cca_have_doxygen=yes fi fi DOXYGENTARG="dox" if test -z "$DOXYGEN" ; then AC_MSG_RESULT([Building EGNEO without doxygen. Use --with-doygen=/doxygen/location/executableName.]) DOXYGENTARG="" DOXYGEN="@echo no-doxygen" fi dnl Checks for libraries. AC_CANONICAL_SYSTEM EGNEO_HEADER=AllEGPorts.hh #----------------------------- # make our substitutions #----------------------------- AC_SUBST(CFLAGS) AC_SUBST(CFLAGS_DEBUG) AC_SUBST(CFLAGS_OPTIMIZE) AC_SUBST(CFLAGS_WARNING) AC_SUBST(DL_OBJS) AC_SUBST(EXTRA_CFLAGS) AC_SUBST(LD_FLAGS) AC_SUBST(MAKE_LIB) AC_SUBST(MATH_LIBS) AC_SUBST(NEOCCA_MAKEINCL) AC_SUBST(NEOCCA_BOOST_ROOT) AC_SUBST(BOOST_INC) AC_SUBST(NEOCCA_DL_LIBS) AC_SUBST(NEOCCA_LD_FLAGS) AC_SUBST(NEOCCA_LD_SEARCH_FLAGS) AC_SUBST(NEOCCA_SHLIB_CFLAGS) AC_SUBST(NEOCCA_SHLIB_LD) AC_SUBST(NEOCCA_SHLIB_LD_LIBS) AC_SUBST(NEOCCA_SHLIB_SUFFIX) AC_SUBST(NEOCCA_STATIC_LIB) AC_SUBST(NEOCCA_SHARED_LIB) AC_SUBST(EGNEO_MAJOR_VERSION) AC_SUBST(EGNEO_MINOR_VERSION) AC_SUBST(EGNEO_PATCH_LEVEL) AC_SUBST(EGNEO_VERSION) AC_SUBST(VERSION) AC_SUBST(DOXYGEN) AC_SUBST(DOXYGENTARG) AC_SUBST(EGNEO_BUILD_ROOT) AC_SUBST(EGNEO_INSTALL_ROOT) AC_SUBST(EGNEO_HEADER) AC_SUBST(EGNEO_VARS_SH) AC_SUBST(EGNEO_MAKEINCL) AC_SUBST(EGNEO_VER_SUFFIX) AC_SUBST(EGNEO_CCA_DATA) AC_SUBST(NAMESPACE_NEEDS_ENDSEMI) AC_SUBST(CPP) AC_SUBST(CXX) AC_SUBST(CXXFLAGS) AC_SUBST(CXX_TEMPLATES) AC_SUBST(CXXCPP) AC_SUBST(LN_S) AC_SUBST(RANLIB) AC_SUBST(SET_MAKE) AC_SUBST(LIBS) AC_SUBST(GMAKE) AC_SUBST(EGNEO_INC) AC_SUBST(EGNEO_INC_RELOCATABLE) AC_SUBST(PKG_SUBDIR) AC_SUBST(PKG_NAME) AC_SUBST(CONFIG_ARGS) AC_SUBST(INSTALL) AC_SUBST(INSTALL_DATA) AC_SUBST(NEO_CCA_INSTALLED_CONFIG) AC_SUBST(EGNEO_INSTALLED_CONFIG) srcfiles="src/Makefile src/MakeIncl_EG_Neo_Vars src/EG_Neo_Vars.sh src/eg-neo-config src/eg_neo_SimpleStamper.cca" incfiles="include/SimpleStamper.hh" pd=include/eg-neo-ports portfiles="$pd/StringOutPort.hh $pd/TimeSourcePort.hh" genfiles="src/varlist Makefile Makefile.install reconfigure" #docgenfiles="doc/Makefile doc/DoxyConfig" GENERATED_FILES="$genfiles $docgenfiles $srcfiles $incfiles $portfiles" AC_SUBST(GENERATED_FILES) AC_OUTPUT($GENERATED_FILES,chmod a+x reconfigure) # $Header: /cvs/cca-spec/repository/cca-spec-neo/eg-neo/configure.in,v 1.7 2005/05/11 23:58:11 baallan Exp $