AC_INIT(src/parser/XPath2Parser.y) AC_CONFIG_AUX_DIR(autotools) AC_CONFIG_HEADER(src/config/pathan_config_unix.h:src/config/config.pre:src/config/config.h.in:src/config/config.post) dnl --- Check existence of $XERCESCROOT --- AC_MSG_CHECKING([\$XERCESCROOT]) if test $XERCESCROOT then AC_MSG_RESULT([$XERCESCROOT]) else AC_MSG_ERROR([Please set \$XERCESCROOT to (absolute) root of Xerces distribution]) fi xerces_include=${XERCESCROOT}/include xerces_src=${XERCESCROOT}/src xerces_lib=${XERCESCROOT}/lib AC_SUBST(xerces_include) AC_SUBST(xerces_src) AC_SUBST(xerces_lib) dnl --- Establish absolute srcdir path for Makefiles --- topsrcdir=`cd ${srcdir}; pwd;` AC_SUBST(topsrcdir) dnl --- Check system type --- AC_CANONICAL_SYSTEM dnl Currently we need no specific defines so the UNIX default is fine system_type="UNIX" dnl case "$target" in dnl i*86-*-linux-*) system_type="LINUX" ;; dnl sparc-sun-solaris*) system_type="UNIX" ;; dnl esac AC_SUBST(system_type) dnl --- Check compilers --- AC_PROG_CXX AC_PROG_CC dnl --- ieeefp.h --- AC_CHECK_HEADERS(ieeefp.h) dnl --- Check utility programmes --- AC_PROG_INSTALL AC_PROG_YACC AC_PROG_LEX AC_CHECK_PROG(sed, sed, sed, false) if test "$sed" != "sed" then AC_MSG_WARN([sed not found. Manually edit Makefile.defs to add -lxercesxxx to LIBS]) fi AC_SUBST(sed) AC_CHECK_PROG(perl, perl, perl, error) if test "$perl" != "perl" then AC_MSG_ERROR([perl not found. Required to build Pathan.]) fi AC_SUBST(perl) dnl --- Check for unicode support in flex --- AC_MSG_CHECKING([unicode support in flex]) flex --help | grep "\-U" > /dev/null if test "$?" -eq "0" then AC_MSG_RESULT([found]) else AC_MSG_WARN([not found. Pathan requires a version of flex supporting the -U (16-bit unicode) flag if you need to rebuild the lexer or parser.]) fi dnl --- GNU libtool --- AC_PROG_LIBTOOL top_builddir=topsrcdir dnl --- Check Xerces library name --- dnl This is a bit of a hack due to our nonstandard library names in cvs xerces1_4# dnl the line ${sed} -e '2,$d' is unnecessary when using a standard Xerces distribution AC_MSG_CHECKING([Xerces library name]) xerces_library=`ls ${XERCESCROOT}/lib | grep '.so' | ${sed} -e '2,$d' | ${sed} -e 's/.so//' | ${sed} -e 's/lib//'` AC_MSG_RESULT([lib${xerces_library}.so]) AC_SUBST(xerces_library) dnl --- Check for libpthread --- AC_CHECK_LIB(pthread,pthread_create) dnl --- Check for libsocket --- AC_CHECK_LIB(socket,connect) dnl --- Check for libnsl --- AC_CHECK_LIB(nsl,gethostbyname) dnl --- Checks for typedefs, structures, and compiler characteristics --- AC_C_CONST AC_C_BIGENDIAN dnl --- Set up compiler flags --- CXXFLAGS="$CXXFLAGS -Wall -ftemplate-depth-50 ${targetoptions}" CFLAGS="$CFLAGS -Wall ${targetoptions}" dnl --- Set up libtool flags --- LIBTOOL="\$(srcdir)/libtool ${libtoolflags}" dnl --- Set up linking flags --- dnl --- might want to move this into DSLconfig script: depends if configure.in can give us useful info --- AC_OUTPUT(Makefile.defs)