dnl dnl Process this file with autoconf to produce a configure script. dnl Autoconf script for Amaya and Thot. dnl Daniel Veillard, 1997 dnl dnl *************************************************************** dnl dnl GENERIC AUTOCONF STUFF : GUESS INFORMATIONS ON SYSTEM SETUP dnl dnl *************************************************************** AC_PREREQ(2.2) AC_INIT(thotlib/internals/h/constpiv.h) AC_REVISION dnl dnl Checks for platform information dnl AC_CANONICAL_SYSTEM AC_CONFIG_HEADER(config.h) dnl dnl Initializing Automake dnl AC_PROG_MAKE_SET AC_ARG_PROGRAM dnl dnl Checks for programs. dnl AC_PROG_YACC AC_PROG_CC AC_PROG_CPP AC_PROG_LEX AC_PROG_AWK AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET AC_PROG_RANLIB AC_PATH_PROG(CP, cp, /bin/cp, $PATH:/bin:/usr/bin:/usr/ucb/bin) AC_PATH_PROG(MV, mv, /bin/mv, $PATH:/bin:/usr/bin:/usr/ucb/bin) AC_PATH_PROG(RM, rm, /bin/rm, $PATH:/bin:/usr/bin:/usr/ucb/bin) AC_PATH_PROG(MKDIR, mkdir, /bin/mkdir, $PATH:/bin:/usr/bin:/usr/ucb/bin) AC_PATH_PROG(ECHO, echo, /bin/echo, $PATH:/bin:/usr/bin:/usr/ucb/bin) AC_PATH_PROG(CAT, cat, /bin/cat, $PATH:/bin:/usr/bin:/usr/ucb/bin) AC_PATH_PROG(CHMOD, chmod, /bin/chmod, $PATH:/bin:/usr/bin:/usr/ucb/bin) AC_PATH_PROG(SED, sed, /bin/sed, $PATH:/bin:/usr/bin:/usr/ucb/bin) AC_PATH_PROG(AR, ar, /usr/bin/ar, $PATH:/bin:/usr/bin:/usr/ucb/bin) dnl dnl Checks for libraries. dnl AC_CHECK_LIB(socket, socket, ) AC_CHECK_LIB(inet, connect) AC_CHECK_LIB(nsl, t_accept) AC_CHECK_LIB(dl, dlopen) AC_PATH_X AC_PATH_XTRA dnl dnl Checks for header files. dnl AC_HEADER_DIRENT AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(stdio.h) AC_CHECK_HEADERS(sys/types.h types.h) AC_CHECK_HEADERS(sys/unistd.h unistd.h) AC_CHECK_HEADERS(sys/fcntl.h fcntl.h) AC_CHECK_HEADERS(sys/limits.h limits.h) AC_CHECK_HEADERS(sys/stat.h stat.h) AC_CHECK_HEADERS(sys/file.h) AC_CHECK_HEADERS(sys/ioctl.h) AC_CHECK_HEADERS(sys/time.h time.h) AC_CHECK_HEADERS(sys/systeminfo.h) AC_CHECK_HEADERS(string.h strings.h) AC_CHECK_HEADERS(syslog.h) AC_CHECK_HEADERS(sys/socket.h socket.h) AC_CHECK_HEADERS(appkit/appkit.h appkit.h) AC_CHECK_HEADERS(netinet/in.h in.h) AC_CHECK_HEADERS(dn.h) AC_CHECK_HEADERS(sys/ipc.h) AC_CHECK_HEADERS(net/errno.h sys/errno.h errno.h) AC_CHECK_HEADERS(pwd.h) AC_CHECK_HEADERS(grp.h) AC_CHECK_HEADERS(arpa/inet.h inet.h) AC_CHECK_HEADERS(netdb.h) AC_CHECK_HEADERS(manifest.h) AC_CHECK_HEADERS(bsdtypes.h) AC_CHECK_HEADERS(stdefs.h) AC_CHECK_HEADERS(bsdtime.h) AC_CHECK_HEADERS(sys/select.h select.h) AC_CHECK_HEADERS(dnetdb.h) AC_CHECK_HEADERS(libc.h) AC_CHECK_HEADERS(stdlib.h) AC_CHECK_HEADERS(malloc.h) AC_CHECK_HEADERS(memory.h) AC_CHECK_HEADERS(unixlib.h) AC_CHECK_HEADERS(ctype.h) AC_CHECK_HEADERS(cursesX.h curses.h) AC_CHECK_HEADERS(sys/resource.h resource.h) AC_HEADER_DIRENT AC_CHECK_HEADERS(dir.h direct.h) dnl AC_HEADER_DIRENT only checks for some.. AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_HEADER_TIME AC_HEADER_STAT dnl dnl Checks for typedefs, structures, and compiler characteristics. dnl AC_C_CONST AC_C_INLINE AC_TYPE_MODE_T AC_TYPE_OFF_T AC_TYPE_SIZE_T AC_HEADER_TIME AC_STRUCT_TM AC_STRUCT_TIMEZONE AC_TYPE_UID_T dnl dnl Checks for library functions. dnl AC_FUNC_ALLOCA AC_TYPE_GETGROUPS AC_PROG_GCC_TRADITIONAL AC_FUNC_MEMCMP AC_FUNC_MMAP AC_TYPE_SIGNAL AC_FUNC_VPRINTF AC_CHECK_FUNCS(getcwd gethostname gettimeofday getwd mkdir mktime putenv select socket strdup strerror strftime strstr strtod strtol uname) dnl *************************************************************** dnl dnl SPECIFIC STUFF : CONFIGURATION OPTIONS FOR THOT AND AMAYA dnl dnl *************************************************************** THOT_VER="2.1a" AMAYA_VER="1.0a" KAFFE_VER="0.8.4" LIBWWW_VER="5.0a" dnl dnl Check for availability of amaya and thot editor sources dnl AC_ARG_WITH(thot, --{with|without}-thot : Build the Thot editor or not) AC_ARG_WITH(amaya, --{with |without}-amaya : Build the Amaya HTML browser/editor or not) build_thot="yes" build_amaya="yes" if test "$with_thot" = "no" ; then build_thot="no" fi if test "$with_amaya" = "no" ; then build_amaya="no" fi if test ! -f $srcdir/thot/Makefile.in ; then AC_MSG_WARN(Thot editor sources not found, disabling Thot build !) build_thot="no" fi if test ! -f $srcdir/amaya/Makefile.in ; then AC_MSG_WARN(Amaya browser/editor sources not found, disabling Amaya build !) build_amaya="no" fi dnl dnl Check for additionnal packages kaffe-xxx or libwww dnl use AC_CONFIG_SUBDIRS to launch configure in the subdir dnl AC_ARG_ENABLE(java, --{enable|disable}-java : With or without Kaffe Java virtual machine) AC_ARG_ENABLE(plugin, --{enable|disable}-plugin : With or without support for Netscape Plug-Ins) if test "$enable_java" = "no" ; then with_java="no" else with_java="yes" fi if test "$enable_plugin" = "yes" ; then with_plugin="yes" else with_plugin="no" fi if test "$build_amaya" = "yes" ; then if test ! -f $srcdir/kaffe-$KAFFE_VER/Makefile.in ; then if test "$with_java" = "yes" ; then AC_MSG_WARN(kaffe-$KAFFE_VER sources not found, disabling Java !) with_java="no" fi fi if test ! -f $srcdir/classes/thotlib.zip ; then if test "$with_java" = "yes" ; then AC_MSG_WARN(Java classes not found, disabling Java !) with_java="no" fi fi if test ! -f $srcdir/w3c-libwww-$LIBWWW_VER/Makefile.in ; then if test "$with_java" = "no" ; then AC_MSG_WARN(w3c-libwww-$LIBWWW_VER sources not found !!) AC_MSG_WARN(Disabling Amaya build !) build_amaya="no" fi fi if test "$with_java" = "yes" -a "$with_plugin" = "yes" ; then AC_MSG_WARN(Amaya configured with both Java and Plugins support) AC_MSG_WARN(Beware this combination doesn't work well) fi fi dnl dnl The options for each library or binary dnl THOT_OPTIONS= AMAYA_OPTIONS="-DCOUGAR" PLUGIN_OPTIONS="-DPLUGIN_TRACE -DXP_UNIX" dnl JAVA_OPTIONS="-DDEBUG_KAFFE -DDEBUG_LOCK -DDEBUG_SELECT -DDEBUG_SELECT_CHANNELS -DDEBUG_TIMING -DSYNC_DNS" JAVA_OPTIONS= ANNOTATIONS_OPTIONS= IMGLIBS="-ljpeg -lpng -lz" dnl dnl Set up the PATHs needed dnl API="\$(THOTDIR)/thotlib/include" VAR="\$(THOTDIR)/thotlib/internals/var" INCL="\$(THOTDIR)/thotlib/internals/h" FUNC="\$(THOTDIR)/thotlib/internals/f" SCHEMAS="\$(THOTDIR)/schemas" SCHEMASOPERA="\$(THOTDIR)/schemasOPERA" JPEGINCL="-I\$(THOTDIR)/libjpeg" PNGINCL="-I\$(THOTDIR)/libpng -I\$(THOTDIR)/libpng/zlib" dnl dnl Set up the include variables. dnl THOTINCLUDES="-I$API -I$VAR -I$INCL -I$FUNC -I$SCHEMAS -I$SCHEMASOPERA $JPEGINCL $PNGINCL" APIINCLUDES=-I$API if test "$VPATHOPT" = "" ; then VPATHOPT="VPATH" fi dnl dnl Exports the current values of the variables. dnl AC_SUBST(THOT_VER) AC_SUBST(AMAYA_VER) AC_SUBST(LIBWWW_VER) AC_SUBST(KAFFE_VER) AC_SUBST(THOTINCLUDES) AC_SUBST(APIINCLUDES) AC_SUBST(VPATHOPT) AC_SUBST(THOT_OPTIONS) AC_SUBST(AMAYA_OPTIONS) AC_SUBST(PLUGIN_OPTIONS) AC_SUBST(JAVA_OPTIONS) AC_SUBST(ANNOTATIONS_OPTIONS) AC_SUBST(IMGLIBS) dnl dnl Include the option Makefile.xxx fragment for plugin and or Java options dnl if test "$with_plugin" = "yes" ; then AC_SUBST_FILE(plugin_frag)dnl plugin_frag=$srcdir/pluginlib/Makefile.plugin else AC_SUBST_FILE(plugin_frag) plugin_frag=/dev/null fi if test "$with_java" = "yes" ; then AC_SUBST_FILE(java_frag)dnl java_frag=$srcdir/javalib/Makefile.java AC_SUBST_FILE(www_frag) www_frag=/dev/null else AC_SUBST_FILE(java_frag) java_frag=/dev/null AC_SUBST_FILE(www_frag)dnl www_frag=$srcdir/amaya/Makefile.libwww fi dnl *************************************************************** dnl dnl FINAL STEP : PRODUCE ALL THE MAKEFILES AND CONFIG FILES dnl dnl *************************************************************** EXTRA_MAKEFILE_IN= make_output="Makefile tools/Makefile tools/dns_daemon/Makefile \ libjpeg/Makefile libpng/Makefile libpng/zlib/Makefile \ tools/mkdep/Makefile tools/javastub/Makefile \ tools/cextract-1.7/Makefile thotlib/Makefile \ thotlib/include/Makefile batch/Makefile tablelib/Makefile \ drawlib/Makefile indexlib/Makefile \ javalib/Makefile pluginlib/Makefile" if test "$build_amaya" = "yes" ; then make_output="$make_output amaya/Makefile" EXTRA_MAKEFILE_IN="$srcdir/amaya/Makefile.in $srcdir/amaya/Makefile.libwww" fi if test "$build_thot" = "yes" ; then make_output="$make_output thot/Makefile" EXTRA_MAKEFILE_IN="$EXTRA_MAKEFILE_IN $srcdir/thot/Makefile.in" fi AC_SUBST(EXTRA_MAKEFILE_IN) AC_OUTPUT($make_output , echo timestamp > stamp-h) if test "$build_thot" = "yes" ; then if test "$build_amaya" = "yes" ; then echo Amaya and Thot packages are now configured else echo Thot package is now configured fi else if test "$build_amaya" = "yes" ; then echo Amaya package is now configured else echo Nor Amaya nor Thot package found, get the corresponding archive fi fi if test "$build_amaya" = "yes" ; then if test "$with_java" = "yes" ; then echo Amaya configured with Java support else echo Amaya configured with libWWW fi if test "$with_plugin" = "yes" ; then echo Amaya configured with Plugins support fi fi echo "Now start \"make all\" (GNU make preferably) to build the binaries"