dnl aclocal.m4 generated automatically by aclocal 1.4 dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A dnl PARTICULAR PURPOSE. dnl -*- shell-script -*- AC_DEFUN(AC_ITL_TRY_COMPILE, [cat > conftest.cpp <&AC_FD_CC cat conftest.cpp >&AC_FD_CC ifelse([$4], , , [ rm -rf conftest* $4 ])dnl fi rm -f conftest*]) dnl define([AC_ITL_NO_SSTREAM],[ AC_MSG_CHECKING([if compiler has standard sstream]) cat > conftest.cc < int main() { return 0; } EOF $CXX $CXXFLAGS -o conftest conftest.cc 1>&5 2>&1 if test -s conftest && (./conftest; exit) 2>/dev/null; then AC_MSG_RESULT([yes]) else AC_DEFINE(ITL_NO_SSTREAM) AC_MSG_RESULT([no]) fi /bin/rm -rf conftest* ti_files ])dns define([AC_GGCL_HAVE_STD_ALLOCATOR],[ AC_MSG_CHECKING([if compiler has standard allocator]) cat > conftest.cc < #include int main() { std::vector > a(10); } EOF $CXX $CXXFLAGS -o conftest conftest.cc 1>&5 2>&1 if test -s conftest && (./conftest; exit) 2>/dev/null; then AC_MSG_RESULT([yes]) else AC_DEFINE(__STL_USE_OLD_SGI_ALLOCATOR) AC_MSG_RESULT([no, use old sgi allocator]) fi /bin/rm -rf conftest* ti_files ])dns define([AC_GGCL_HAVE_LIMITS],[ AC_MSG_CHECKING([if there is standard limits header]) cat > conftest.cc < int main() { int a = std::numeric_limits::max(); } EOF $CXX $CXXFLAGS -o conftest conftest.cc 1>&5 2>&1 if test -s conftest && (./conftest; exit) 2>/dev/null; then AC_DEFINE(_GGCL_HAVE_LIMITS) AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi /bin/rm -rf conftest* ti_files ])dnl define([AC_GGCL_HAVE_FUNCTION_CONST_TEMPATE_PARAMS], [ AC_MSG_CHECKING([if compiler has constant template parameters]) cat > conftest.cc < struct A {}; template void print(const T& a) { } template void print(T& a) { } int main () { A b; const A a = b; print(a); print(b); } EOF $CXX $CXXFLAGS -o conftest conftest.cc 1>&5 2>&1 if test -s conftest && (./conftest; exit) 2>/dev/null; then AC_DEFINE(_GGCL_HAVE_CONST_TEMPLATE_PARAMS) AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi /bin/rm -rf conftest* ti_files ])dnl dnl define([LSC_CXX_TEMPLATE_REPOSITORY],[ # # See if the compiler makes template repository directories # Warning: this is a really screwy example! -JMS # AC_MSG_CHECKING([for template repository directory]) mkdir conf_tmp_$$ cd conf_tmp_$$ cat > foo.h < class foo { public: foo(T yow) : data(yow) { yow.member(3); }; void member(int i); private: T data; }; class bar { public: bar(int i) { data = i; }; void member(int j) { data = data * j; }; private: int data; }; EOF cat > other.cc < var1(6); foo< foo > var2(var1); } EOF cat > main.cc < void foo::member(int i) { i += 2; } int main(int argc, char *argv[]) { foo var1(6); foo< foo > var2(var1); some_other_function(); return 0; } EOF $CXX -c main.cc >/dev/null 2>/dev/null $CXX -c other.cc >/dev/null 2>/dev/null rm -rf *.h *.cc *.o for file in `ls` do if test "$file" != "." -a "$file" != ".."; then # Is it a directory? if test -d "$file"; then TEMPLATE_DIR="$file $TEMPLATE_DIR" # Or is it a file? else name="`echo $file | cut -d. -f1`" temp_mask= if test "$name" = "main" -o "$name" = "other"; then temp_mask="`echo $file | cut -d. -f2`" if test "$TEMPLATE_FILEMASK" = ""; then TEMPLATE_FILEMASK="$temp_mask"; elif test "`echo $TEMPLATE_FILEMASK | grep $temp_mask`" = ""; then TEMPLATE_FILEMASK="$TEMPLATE_FILEMASK $temp_mask" fi fi fi fi done if test "$TEMPLATE_FILEMASK" != ""; then temp_mask= for mask in $TEMPLATE_FILEMASK do temp_mask="*.$mask $temp_mask" done TEMPLATE_FILEMASK=$temp_mask fi TEMPLATE_REP="$TEMPLATE_DIR $TEMPLATE_FILEMASK" if test "$TEMPLATE_REP" != ""; then AC_MSG_RESULT([$TEMPLATE_REP]) else AC_MSG_RESULT([not used]) fi cd .. rm -rf conf_tmp_$$ AC_SUBST(TEMPLATE_REP)dnl ])dnl define([LSC_CHECK_CXX_EXCEPTIONS],[ # # Check to see if this compiler can handle exceptions # AC_MSG_CHECKING([for throw/catch]) AC_TRY_COMPILE(, int i=1; throw(i);, have_excep=yes, have_excep=no) if test "$have_excep" = "yes"; then LSC_CXX_HAS_EXCEPTIONS=1 AC_MSG_RESULT([yes]) else LSC_CXX_HAS_EXCEPTIONS=0 AC_MSG_RESULT([no]) fi])dnl define([LSC_CHECK_SIGNAL_TYPE],[ # # Do we have BSD or SYSV style signals? # (or something that we haven't thought of yet?) # SAVE_CXXFLAGS=$CXXFLAGS CXXFLAGS="$SIGNAL_FLAGS $CXXFLAGS" AC_MSG_CHECKING([for signal declaration]) AC_TRY_COMPILE(#include , void handler(int sig, int code, struct sigcontext *scp, char *addr); signal(1, handler);, bsd_signal="yes", bsd_signal="no") if test "$bsd_signal" = "yes"; then LSC_SIGNAL_TYPE="BSD" AC_MSG_RESULT([BSD]) else # # Sanity check. Make sure that it is SYSV # AC_TRY_COMPILE(#include , void handler(int sig); signal(1, handler);, sysv_signal="yes", sysv_signal="no") if test "$sysv_signal" = "yes"; then LSC_SIGNAL_TYPE="SYSV" AC_MSG_RESULT([SYSV]) else AC_MSG_RESULT([not found]) AC_MSG_ERROR([cannot determine if signals are BSD/SYSV]) exit fi fi CXXFLAGS=$SAVE_CXXFLAGS ])dnl # # Several macro for various compilers # AC_DEFUN(AC_PROG_CXX_MWERKS, [AC_CACHE_CHECK(whether we are using Metrowerks Codewarrior C++, MWERKS_CXX, [cat > conftest.c </dev/null 2>&1; then MWERKS_CXX=yes compiler=mwerks else MWERKS_CXX=no fi])]) AC_DEFUN(AC_PROG_CXX_MSVCPP, [AC_CACHE_CHECK(whether we are using Visual C++, MSVCPP_CXX, [cat > conftest.c </dev/null 2>&1; then MSVCPP_CXX=yes compiler=msvcpp else MSVCPP_CXX=no fi])]) AC_DEFUN(AC_PROG_CXX_SGICC, [AC_CACHE_CHECK(whether we are using SGI MIPSpro C++, SGI_CXX, [cat > conftest.c </dev/null 2>&1; then SGI_CXX=yes compiler=sgicc else SGI_CXX=no fi])]) AC_DEFUN(AC_PROG_CXX_SUNCC, [AC_CACHE_CHECK(whether we are using Sun C++, SUN_CXX, [cat > conftest.c </dev/null 2>&1; then SUN_CXX=yes compiler=suncc else SUN_CXX=no fi])]) AC_DEFUN(AC_PROG_CXX_INTELCC, [AC_CACHE_CHECK(whether we are using Intel C++, INTEL_CXX, [cat > conftest.c </dev/null 2>&1; then INTEL_CXX=yes compiler=intelcc else INTEL_CXX=no fi])]) AC_DEFUN(AC_PROG_CXX_KAICC, [AC_CACHE_CHECK(whether we are using KAI C++, KAI_CXX, [cat > conftest.c </dev/null 2>&1; then KAI_CXX=yes compiler=kaicc else KAI_CXX=no fi])]) # # Don't know if it is a good idea to overwrite CXXFLAGS # AC_DEFUN(AC_BZ_SET_COMPILER, [cxxwith=`echo $1 | sed -e 's/ /@/'` case "$cxxwith" in *:*@*) # Full initialization syntax CXX=`echo "$cxxwith" | sed -n -e 's/.*:\(.*\)@.*/\1/p'` CXXFLAGS=`echo "$cxxwith" | sed -n -e 's/.*:.*@\(.*\)/\1/p'` ;; *:*) # Simple initialization syntax CXX=`echo "$cxxwith" | sed -n -e 's/.*:\(.*\)/\1/p'` CXXFLAGS=$3 ;; *) # Default values CXX=$2 CXXFLAGS=$3 ;; esac]) # Do all the work for Automake. This macro actually does too much -- # some checks are only needed if your package does certain things. # But this isn't really a big deal. # serial 1 dnl Usage: dnl AM_INIT_AUTOMAKE(package,version, [no-define]) AC_DEFUN(AM_INIT_AUTOMAKE, [AC_REQUIRE([AC_PROG_INSTALL]) PACKAGE=[$1] AC_SUBST(PACKAGE) VERSION=[$2] AC_SUBST(VERSION) dnl test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi ifelse([$3],, AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) AC_REQUIRE([AM_SANITY_CHECK]) AC_REQUIRE([AC_ARG_PROGRAM]) dnl FIXME This is truly gross. missing_dir=`cd $ac_aux_dir && pwd` AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) AC_REQUIRE([AC_PROG_MAKE_SET])]) # # Check to make sure that the build environment is sane. # AC_DEFUN(AM_SANITY_CHECK, [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftestfile # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` if test "[$]*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftestfile` fi if test "[$]*" != "X $srcdir/configure conftestfile" \ && test "[$]*" != "X conftestfile $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "[$]2" = conftestfile ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi rm -f conftest* AC_MSG_RESULT(yes)]) dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) dnl The program must properly implement --version. AC_DEFUN(AM_MISSING_PROG, [AC_MSG_CHECKING(for working $2) # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. if ($2 --version) < /dev/null > /dev/null 2>&1; then $1=$2 AC_MSG_RESULT(found) else $1="$3/missing $2" AC_MSG_RESULT(missing) fi AC_SUBST($1)]) # Like AC_CONFIG_HEADER, but automatically create stamp file. AC_DEFUN(AM_CONFIG_HEADER, [AC_PREREQ([2.12]) AC_CONFIG_HEADER([$1]) dnl When config.status generates a header, we must update the stamp-h file. dnl This file resides in the same directory as the config header dnl that is generated. We must strip everything past the first ":", dnl and everything past the last "/". AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, <>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, <>; do case " <<$>>CONFIG_HEADERS " in *" <<$>>am_file "*<<)>> echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx ;; esac am_indx=`expr "<<$>>am_indx" + 1` done<<>>dnl>>) changequote([,]))])