1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
|
dnl Process this file with autoconf to produce a configure script.
AC_INIT
AC_CONFIG_SRCDIR([src/genparse.cc])
dnl set up for automake
AM_INIT_AUTOMAKE(genparse,0.9.3)
dnl set up automake header file
AC_CONFIG_HEADERS([config.h:config.in])
dnl get host name and system
dnl AC_CANONICAL_TARGET([])
AC_PROG_CC
gl_EARLY
gl_INIT
dnl check for lex and yacc
AC_PROG_YACC
AM_PROG_LEX
AC_CHECK_PROGS(HAVE_JAVA, [java])
AM_CONDITIONAL(HAVE_JAVA, test "$HAVE_JAVA")
AC_CHECK_PROGS(HAVE_JAVAC, [javac])
AM_CONDITIONAL(HAVE_JAVAC, test "$HAVE_JAVAC")
dnl check for C and C++ compilers and make
AC_PROG_CXXCPP
dnl check for installer
AC_PROG_INSTALL
AC_PROG_RANLIB
dnl check for header files.
AC_CHECK_HEADERS(time.h stdlib.h unistd.h sys/param.h sys/utsname.h sys/time.h sys/types.h pwd.h getopt.h)
dnl need this cuz AM_PROG_LEX is slightly braindead
AC_CHECK_LIB(l, main)
dnl Check for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_HEADER_TIME
AC_TYPE_PID_T
AC_STRUCT_TM
dnl check for library functions.
AC_FUNC_STRFTIME
AC_CHECK_FUNCS(mktime gethostname gettimeofday strdup strerror uname getdomainname getopt_long)
dnl check for java Getopt class
AC_CHECK_CLASS(gnu.getopt.Getopt)
if test "x$ac_cv_class_gnu_getopt_Getopt" = xyes ; then
AC_SUBST(HAVE_GETOPT_JAVA, "yes")
else
AC_MSG_WARN([Java class gnu.getopt.Getopt not found. You can build genparse anyway but not its test suite for the java output.])
fi
AM_CONDITIONAL(HAVE_GETOPT_JAVA, test "$HAVE_GETOPT_JAVA")
dnl check for cunit
AC_CHECK_LIB(cunit, CU_initialize_registry, HAVE_CUNIT="yes")
if test x$HAVE_CUNIT != xyes; then
AC_MSG_WARN([CUnit not found. You can build Genparse anyway but not its test suite for the C output.])
fi
AM_CONDITIONAL(HAVE_CUNIT, test "$HAVE_CUNIT")
dnl check for cppunit
ifdef([AM_PATH_CPPUNIT], [AM_PATH_CPPUNIT(1.10.0)])
if test "x$CPPUNIT_LIBS" = x ; then
AC_MSG_WARN([CPPUnit not found. You can build Genparse anyway but not its test suite for the C++ output.])
fi
AM_CONDITIONAL(HAVE_CPPUNIT, test "$CPPUNIT_LIBS")
dnl check for junit
ifdef([AC_CHECK_JUNIT], [AC_CHECK_JUNIT])
if test "x$JAVA_JUNIT" = x ; then
AC_MSG_WARN([JUnit not found. You can build Genparse anyway but not its test suite for the Java output.])
fi
AM_CONDITIONAL(HAVE_JUNIT, test "$JAVA_JUNIT")
dnl check for doxygen
AC_CHECK_PROGS(DOXYGEN, [doxygen], no)
if test x$DOXYGEN = xno; then
AC_MSG_WARN([Doxygen not found, Doxygen documentation will not be built])
else
dnl check if graphviz / dot is installed (used by doxygen)
AC_CHECK_PROGS(DOT, [dot], no)
if test x$DOT = xno; then
AC_MSG_WARN([graphviz / dot not found, Doxygen documentation will not be built])
fi
fi
AM_CONDITIONAL(HAVE_DOXYGEN, test "$DOXYGEN" != no -a "$DOT" != no)
dnl set directory in which doxygen searches for sources
dnl relative to doc because doxygen is executed from there
AC_SUBST(DOXYGEN_SRC_DIRECTORY)
DOXYGEN_SRC_DIRECTORY=$srcdir/../src
dnl check for texi2html
AC_CHECK_PROGS(TEXI2HTML, [texi2html], no)
if test x$TEXI2HTML = xno; then
AC_MSG_WARN([texi2html not found, html version of info pages will not be built])
fi
AM_CONDITIONAL(HAVE_TEXI2HTML, test "$TEXI2HTML" != no)
dnl check if texi2pdf is installed
AC_CHECK_PROGS(TEXI2PDF, [texi2pdf], no)
if test x$TEXI2PDF = xno; then
AC_MSG_WARN([texi2pdf not found, pdf version of info pages will not be built])
fi
AM_CONDITIONAL(HAVE_TEXI2PDF, test "$TEXI2PDF" != no)
dnl check if man2html is installed
AC_CHECK_PROGS(MAN2HTML, [man2html], no)
if test x$MAN2HTML = xno; then
AC_MSG_WARN([man2html not found, html version of man page will not be built])
fi
AM_CONDITIONAL(HAVE_MAN2HTML, test "$MAN2HTML" != no)
gl_XSTRTOL
AC_CONFIG_FILES([Makefile gnulib/Makefile gnulib/lib/Makefile src/Makefile doc/Makefile \
examples/Makefile tests/Makefile tests/ccheck/Makefile tests/cppcheck/Makefile
tests/javacheck/Makefile tests/misc/Makefile doc/Doxyfile])
AC_OUTPUT
|