summaryrefslogtreecommitdiff
path: root/Build/source/configure.in
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-03-01 01:29:07 +0000
committerKarl Berry <karl@freefriends.org>2006-03-01 01:29:07 +0000
commitaa65371109d1ddff979d7f3bbe88a03094d536ad (patch)
tree7748762472ebb4d8057b1a381280447969554f65 /Build/source/configure.in
parentb91215c43a1b26b44e084d9ff283ce9ce6f9a033 (diff)
use (te)TeX build files
git-svn-id: svn://tug.org/texlive/trunk@1537 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/configure.in')
-rw-r--r--Build/source/configure.in228
1 files changed, 196 insertions, 32 deletions
diff --git a/Build/source/configure.in b/Build/source/configure.in
index e479b571236..97ff6747b2a 100644
--- a/Build/source/configure.in
+++ b/Build/source/configure.in
@@ -1,13 +1,52 @@
-dnl Written many years ago by Thomas Esser and others. Public domain.
+dnl Top-level configure for TeX Live build. Public domain.
-AC_INIT(TeX/texk/web2c/tex.web)
+AC_INIT(texk/make/common.mk)
-AC_CONFIG_AUX_DIR(TeX/config)
+AC_CONFIG_AUX_DIR(config)
AC_SET_MAKE
AC_PROG_CC
+AC_PROG_CXX
+
+AC_PROG_LEX
+case $LEX in
+ lex)
+ OLDIFS=$IFS; IFS=:
+ foundLEX=false
+ for p in $PATH; do
+ if test -f "$p/lex"; then
+ foundLEX=true
+ break
+ fi
+ done
+ IFS=$OLDIFS
+ ;;
+esac
+if $foundLEX; then :; else
+ AC_MSG_ERROR(no working lexical scanner (lex/flex) found)
+fi
+
+AC_PROG_YACC
+case $YACC in
+ yacc)
+ OLDIFS=$IFS; IFS=:
+ foundYACC=false
+ for p in $PATH; do
+ if test -f "$p/yacc"; then
+ foundYACC=true
+ break
+ fi
+ done
+ IFS=$OLDIFS
+ ;;
+esac
+if $foundYACC; then :; else
+ AC_MSG_ERROR(no working parser generator (yacc/bison) found)
+fi
+
AC_CANONICAL_SYSTEM
dnl Various compiler directives
+dnl Various compiler directives
AC_MSG_CHECKING(whether to define additional compiler specific flags)
case "$target" in
alpha*-dec*)
@@ -22,44 +61,169 @@ case "$target" in
AC_MSG_WARN(HP-UX's cc)
fi
;;
+ *-darwin*)
+ : ${INSTALL='/usr/bin/install -c -p'}; export INSTALL
+ : ${NCURSES_CPP_FIX=true}; export NCURSES_CPP_FIX
+ ;;
*)
AC_MSG_RESULT(no)
;;
esac
-#
-case $CC in
- egcs)
- # The egcs compiler (version 1.1) has a problem with force-mem, so:
- CFLAGS="$CFLAGS -fno-force-mem";;
-esac
+dnl We check this here, because otherwise some worse check (from ncurses?)
+dnl is used instead for the cached value.
+AC_HEADER_SYS_WAIT
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_PROG_LN_S
AC_FUNC_ALLOCA
AC_PROG_RANLIB
+AC_PATH_X
+
+dnl These are included for compilation with either teTeX or standalone xdvik
+dnl (tetex will only provide tetex.ac, xdvik only xdvik.ac)
+sinclude(tetex.ac)
+sinclude(texlive.ac)
+sinclude(xdvik.ac)
+sinclude(withenable.ac)
+sinclude(utils/dialog/withenable.ac)
+sinclude(texk/withenable.ac)
+sinclude(texk/kpathsea/xt.ac)
+sinclude(texk/kpathsea/withenable.ac)
+sinclude(texk/web2c/withenable.ac)
+sinclude(texk/xdvik/withenable.ac)
+sinclude(libs/ncurses/withenable.ac)
+sinclude(libs/libpng/withenable.ac)
+sinclude(libs/t1lib/withenable.ac)
+sinclude(libs/zlib/withenable.ac)
+sinclude(libs/gd/withenable.ac)
+sinclude(libs/freetype/withenable.ac)
+
+NCURSESDIR=libs/ncurses
+LIBT1DIR=libs/t1lib
+LIBTYPE1DIR=libs/type1
+LIBPNGDIR=libs/libpng
+ZLIBDIR=libs/zlib
+LIBXPDFDIR=libs/xpdf
+FREETYPEDIR=libs/freetype
+GDDIR=libs/gd
+
+test "$no_x" = yes && { with_xdvik=no; with_oxdvik=no; }
+export with_xdvik with_oxdvik
+
+# we need libt1 for dvipng, xdvik, oxdvik
+test ! -d $srcdir/$LIBT1DIR && : ${needs_libt1=no}
+test "$with_dvipng" != no && : ${needs_libt1=yes}
+test "$with_xdvik" != no && : ${needs_libt1=yes}
+test "$with_oxdvik" != no && : ${needs_libt1=yes}
+: ${needs_libt1=no}
+export needs_libt1
+
+# we need ncurses for dialog
+test ! -d $srcdir/$NCURSESDIR && : ${needs_ncurses=no}
+test "$with_dialog" != no && : ${needs_ncurses=yes}
+: ${needs_ncurses=no}
+export needs_ncurses
+
+# we need pnglib for dvipng, pdf[ex]tex
+test ! -d $srcdir/$LIBPNGDIR && : ${needs_pnglib=no}
+test "$with_dvipng" != no && : ${needs_pnglib=yes}
+test "$with_pdftex" != no && : ${needs_pnglib=yes}
+test "$with_pdfetex" != no && : ${needs_pnglib=yes}
+: ${needs_pnglib=no}
+export needs_pnglib
+
+# we need zlib for dvipng, texinfo, pdf[ex]tex
+test ! -d $srcdir/$ZLIBDIR && : ${needs_zlib=no}
+test "$with_dvipng" != no && : ${needs_zlib=yes}
+test "$with_pdftex" != no && : ${needs_zlib=yes}
+test "$with_pdfetex" != no && : ${needs_zlib=yes}
+test "$with_texinfo" != no && : ${needs_zlib=yes}
+: ${needs_zlib=no}
+export needs_zlib
+
+# we need libxpdf for pdf[ex]tex
+test ! -d $srcdir/$LIBXPDFDIR && : ${needs_libxpdf=no}
+test "$with_pdftex" != no && : ${needs_libxpdf=yes}
+test "$with_pdfetex" != no && : ${needs_libxpdf=yes}
+: ${needs_libxpdf=no}
+export needs_libxpdf
+
+# we need gd for dvipng
+test ! -d $srcdir/$GDDIR && : ${needs_gd=no}
+test "$with_dvipng" != no && : ${needs_gd=yes}
+: ${needs_gd=no}
+export needs_gd
+
+# we need freetype for ttf2pk
+test ! -d $srcdir/$FREETYPEDIR && : ${needs_freetype=no}
+test ! -d $srcdir/texk/ttf2pk && : ${needs_freetype=no}
+test "$with_ttf2pk" = no && : ${needs_freetype=no}
+: ${needs_freetype=yes}
+export needs_freetype
+
+dnl We cannot use variables (e.g. $LIBPNGDIR) for sinclude, so...
+sinclude(libs/libpng/libpng.ac)
+sinclude(libs/zlib/zlib.ac)
+sinclude(libs/ncurses/ncurses.ac)
+sinclude(libs/xpdf/libxpdf.ac)
+sinclude(libs/t1lib/t1lib.ac)
+sinclude(libs/gd/gd.ac)
+sinclude(libs/freetype/freetype.ac)
+
+LIBSDEP="$CURSESDEP $ZLIBDEP $LIBPNGDEP $LIBXPDFDEP $LIBT1DEP $GDDEP $FREETYPEDEP"
+
+LIBSDIRS=
+test "$needs_ncurses" = yes && test "$using_system_ncurses" != yes \
+ && LIBSDIRS="$NCURSESDIR $LIBSDIRS"
+test "$needs_pnglib" = yes && test "$using_system_pnglib" != yes \
+ && LIBSDIRS="$LIBPNGDIR $LIBSDIRS"
+test "$needs_zlib" = yes && test "$using_system_zlib" != yes \
+ && LIBSDIRS="$ZLIBDIR $LIBSDIRS"
+test "$needs_libxpdf" = yes \
+ && LIBSDIRS="$LIBXPDFDIR $LIBSDIRS"
+test "$needs_libt1" = yes && test "$using_system_t1lib" != yes \
+ && LIBSDIRS="$LIBT1DIR $LIBTYPE1DIR $LIBSDIRS"
+test "$needs_gd" = yes && test "$using_system_gd" != yes \
+ && LIBSDIRS="$GDDIR $LIBSDIRS"
+test "$needs_freetype" = yes && test "$using_system_freetype" != yes \
+ && LIBSDIRS="$FREETYPEDIR $LIBSDIRS"
+
+AC_CONFIG_SUBDIRS([libs])
+
+PKGS='dialog lcdf-typetools pdfopen psutils t1utils texi2html texinfo'
+ESUBDIRS=
+for pkg in $PKGS; do
+ if test -d $srcdir/utils/$pkg; then
+ if eval "test \"`echo '$with_'${pkg}`\" != no"; then
+ ESUBDIRS="$ESUBDIRS utils/$pkg"
+ AC_CONFIG_SUBDIRS([utils/$pkg])
+ test -d utils || mkdir utils
+ fi
+ fi
+done
+
+AC_SUBST(ESUBDIRS)
+AC_SUBST(LIBSDEP)
+AC_SUBST(LIBSDIRS)
+
+# initialize texmf tree with fmtutil only for teTeX and TeX Live
+if test ! -d $srcdir/texk/tetex || test -n "$xdvik_standalone" || test "x$cross_compiling" = xyes; then
+ FMU=
+else
+ FMU='# '
+fi
+AC_SUBST(FMU)
+
+# more customizations for standalone xdvik
+if test -z "$xdvik_standalone"; then
+ INSTDIRS='$(ESUBDIRS)'
+else
+ INSTDIRS=texk/xdvik
+fi
+AC_SUBST(INSTDIRS)
-sinclude(TeX/tetex.ac)
-sinclude(TeX/withenable.ac)
-sinclude(TeX/utils/dialog/withenable.ac)
-sinclude(TeX/texk/withenable.ac)
-sinclude(TeX/texk/kpathsea/withenable.ac)
-sinclude(TeX/texk/kpathsea/xt.ac)
-sinclude(TeX/texk/web2c/withenable.ac)
-sinclude(TeX/texk/xdvik/withenable.ac)
-sinclude(TeX/libs/ncurses/withenable.ac)
-sinclude(TeX/libs/libtiff/withenable.ac)
-sinclude(TeX/libs/libtiff/libtiff.ac)
-sinclude(TeX/libs/libpng/withenable.ac)
-sinclude(TeX/libs/libpng/libpng.ac)
-sinclude(TeX/libs/zlib/withenable.ac)
-sinclude(TeX/libs/zlib/zlib.ac)
-sinclude(TeX/libs/t1lib/withenable.ac)
-sinclude(TeX/libs/t1lib/t1lib.ac)
-sinclude(TeX/libs/gd/withenable.ac)
-sinclude(TeX/libs/gd/gd.ac)
-
-AC_CONFIG_SUBDIRS(TeX)
-AC_CONFIG_FILES(Makefile)
-AC_OUTPUT()
+AC_CONFIG_SUBDIRS([texk])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT