# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_INIT(p2open/p2open.c) AM_INIT_AUTOMAKE(ems, 0.1.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 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 )--" # # 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 "** WARNING **" echo " PKG_CONFIG_PATH environment variable not found." echo " If you installed jspell on /usr/local/ it will be not found, then, I'll define a suitable (I hope) pre-defined value for it." export PKG_CONFIG_PATH=":/usr/local/lib/pkgconfig" fi # PKG_CHECK_MODULES(JSPELL, jspell >= 1.1.1) AC_MSG_CHECKING(jspell Portuguese dictionary) if jspell-dict --installed=port; then FOO=bar # dummy else AC_MSG_ERROR(jspell Portuguese dictionary is required!) fi # ###### ###### # printbold "--( Writing files )--" AC_OUTPUT(Makefile p2open/Makefile p2open/samples/Makefile data/Makefile libems/Makefile tagger/Makefile learner/Makefile ems.pc)