AC_INIT(lucene4c, 0.04) MAKE_CONFIG_NICE([config.nice]) AC_CONFIG_SRCDIR([src/document/document.cxx]) AC_CONFIG_AUX_DIR(config) AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) AC_PROG_CC AM_PROG_CC_C_O AC_PROG_CXX AM_PROG_GCJ AC_CHECK_PROGS(JCCH, gcjh) AC_CHECK_PROGS(JAR, fastjar) AC_CHECK_PROGS(MKDIR, mkdir) AC_CHECK_PROGS(FIND, find) AC_CHECK_PROGS(SED, sed) AC_CHECK_PROGS(XARGS, xargs) AC_CHECK_PROGS(RM, rm) AC_CHECK_LIB([gcj], [JNI_CreateJavaVM]) AC_MSG_NOTICE([Apache Portable Runtime (APR) library configuration]) APR_FIND_APR("", "", 1, 1 0) if test $apr_found = "no"; then AC_MSG_ERROR([APR not found]) fi # just use APR's defaults for this stuff... CPPFLAGS="$CPPFLAGS `$apr_config --cppflags`" CFLAGS="$CFLAGS `$apr_config --cflags`" LDFLAGS="$LDLAGS `$apr_config --ldflags`" GCJ_RPATH=`echo ${GCJ} | ${SED} 's|bin/.*|lib|'` LCN_LIBS="-R${GCJ_RPATH} $LIBS `$apr_config --link-libtool --libs`" LCN_APR_INCLUDES="`$apr_config --includes`" LIBTOOL="`$apr_config --apr-libtool` --silent" AC_SUBST(LIBTOOL) AC_ARG_ENABLE(static, AC_HELP_STRING([--enable-static], [Build a static library and binaries.]), [ if test "$enableval" = "yes" ; then AM_CFLAGS="-static $AM_CFLAGS" fi ]) AC_SUBST(AM_CFLAGS) AC_ARG_ENABLE(maintainer-mode, AC_HELP_STRING([--enable-maintainer-mode], [Turn on debugging and extra compile time warnings]), [ if test "$enableval" = "yes" ; then if test "$GCC" = "yes"; then CFLAGS="$CFLAGS -Wall -Werror -Wpointer-arith -Wwrite-strings" fi CFLAGS="$CFLAGS -g" fi ]) AC_SUBST(ac_aux_dir) AC_SUBST(LCN_APR_INCLUDES) AC_SUBST(LCN_LIBS) AC_OUTPUT([Makefile])