AC_DEFUN(AC_ENABLE_DEBUG, [ AC_ARG_ENABLE(debug, [ --enable-debug enable debug symbols in library], [ if test "$enableval" = yes; then enable_debug=-g; AC_SUBST(enable_debug) fi]) ]) AC_DEFUN(AC_ENABLE_OPTIMIZATION, [ AC_ARG_ENABLE(optimization, [ --enable-optimization enable optimization], [ if test "$enableval" = yes; then enable_optimization='-O3 -funroll-loops -fomit-frame-pointer'; AC_SUBST(enable_optimization) fi]) ]) AC_DEFUN(AC_LEM_DATADIR, [dnl AC_ARG_WITH(datadir, [ --with-datadir[=path] set dictionary directories], lem_datadir="$withval", lem_datadir="") AC_SUBST(lem_datadir) ]) AC_DEFUN(AC_PCRE_INCLUDES, [dnl AC_ARG_WITH(pcre-includes, [ --with-pcre-includes[=path] use Perl Compatible Regular Expressions includes from path], pcre_includes="$withval", pcre_includes="") AC_MSG_CHECKING(for PCRE includes) if test x$pcre_includes = x ; then for p in /usr/include /usr/include/pcre /usr/local/include /opt/include /usr/local/pcre/include; do if test -f "$p/pcre.h" ; then pcre_includes="$p" fi done fi if test x$pcre_includes = x ; then AC_MSG_ERROR(PCRE headers not found) fi AC_SUBST(pcre_includes) AC_MSG_RESULT(found in $pcre_includes) ]) AC_DEFUN(AC_PCRE_LIBS, [dnl AC_ARG_WITH(pcre-libs, [ --with-pcre-libs[=path] use Perl Compatible Regular Expressions libraries from path], pcre_libs="$withval", pcre_libs="") AC_MSG_CHECKING(for PCRE libraries) if test x$pcre_libs = x ; then for p in /lib /usr/lib /usr/local/lib /opt/lib /usr/local/pcre/libexec; do if test -f "$p/libpcre.so" ; then pcre_libs="$p" fi done fi if test x$pcre_libs = x ; then AC_MSG_ERROR(PCRE libraries not found) fi AC_SUBST(pcre_libs) AC_MSG_RESULT(found in $pcre_libs) ])