# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_INIT(nllex.l) AM_INIT_AUTOMAKE(nllex, 0.0.1) AC_PREREQ(2.57) # some terminal codes ... boldface="`tput bold 2>/dev/null`" normal="`tput sgr0 2>/dev/null`" printbold() { echo "" echo -n "$boldface" echo "$@" echo -n "$normal" } # printbold "--( Configuring libtool )--" # AM_PROG_LIBTOOL # printbold "--( Checking for a compiler, install and make )--" AC_PROG_CC AC_PROG_INSTALL AC_PROG_MAKE_SET # printbold "--( Checking for headers )--" AC_HEADER_STDC #AC_CHECK_HEADERS([unistd.h string.h malloc.h errno.h]) # Checks for typedefs, structures, and compiler characteristics. printbold "--( Checking for types, structures and compiler characteristics )--" AC_C_CONST AC_TYPE_PID_T AC_TYPE_SIZE_T printbold "--( Checking for yacc/bison and lex/flex )--" AC_PROG_YACC AM_PROG_LEX # Check for flex library AC_CHECK_LIB(fl, yywrap, NUMEXP_DEPS_LIBS="$NUMEXP_DEPS_LIBS -lfl", [AC_MSG_ERROR([Sorry, libfl (flex library) is required])]) # printbold "--( Checking for specific functions )--" # AC_FUNC_FORK # AC_FUNC_MALLOC # AC_FUNC_REALLOC # These for p2open # for a in pipe perror setlinebuf fflush fdopen execl strdup strcmp asprintf; do # AC_CHECK_FUNC($a) # done printbold "--( Checking for Perl )--" AC_CHECK_PROGS(PERL, perl perl5, [AC_MSG_ERROR([Perl is needed])]) # AC_CHECK_PROGS(POD2MAN, pod2man, [AC_MSG_ERROR([pod2man is needed])]) printbold "--( Checking for Jspell )--" # PKGCONFIG STUFF # # it is normal that PKG_CONFIG_PATH is not defined at all. # if it is not defined, define with a reasonable path if test "x$PKG_CONFIG_PATH" = "x"; then echo "foo" export PKG_CONFIG_PATH=":/usr/local/lib/pkgconfig" fi # PKG_CHECK_MODULES(JSPELL, jspell >= 1.1.0) # printbold "--( Writing files )--" AC_OUTPUT(Makefile nllex.pc)