# Process this file with autoconf to produce a configure script. AC_INIT([libfs++], [0.1.7], [tjahn@users.sourceforge.net]) AC_CONFIG_AUX_DIR(config) # This is for the library in src/Makefile.am AC_SUBST(LT_VERSION) LT_VERSION=0:1:0 AM_INIT_AUTOMAKE([libfs++], [0.1.7]) AC_CONFIG_SRCDIR([src/general.cc]) AM_CONFIG_HEADER(include/config.h) # Checks for programs. AC_PROG_CXX AC_PROG_INSTALL AC_PROG_LIBTOOL # Use c++ compiler for all following tests. AC_LANG([C++]) AH_TEMPLATE([CXX_NAMESPACES_WORKAROUND], [Enabled workaround (see README).]) # This test handles a namespace problem with some older libstdc++ # If the test fails, a workaround is enabled, which might work or might not # work... ;-) (see also config.h) AC_MSG_CHECKING([c++ namespace compatibility]) AC_TRY_COMPILE([ #include class test_iterator : public std::iterator { } ; ],[], AC_MSG_RESULT([ok]), AC_MSG_RESULT([incompatible]) ; CXX_INCOMP=1 ; AC_DEFINE([CXX_NAMESPACES_WORKAROUND])) # Checks for libraries. # Checks for header files. AC_HEADER_DIRENT AC_CHECK_HEADERS([unistd.h]) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST # Checks for library functions. AC_FUNC_LSTAT AC_CHECK_FUNCS([getcwd]) # Conditionals # Output files AC_CONFIG_FILES([Makefile src/Makefile example/Makefile include/Makefile include/fs++/Makefile ]) AC_OUTPUT [[ "$CXX_INCOMP"x = "1x" ]] && AC_MSG_WARN([ There is a known incompatibility with your compiler and/or stdc++ library! A workaround is enabled, but it might probably fail. See also the README.]) echo " Thank you for your interest in libfs++! "