home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / unixtex-6.1b-src.tgz / tar.out / contrib / unixtex / web2c / configure.in < prev    next >
Text File  |  1996-09-28  |  3KB  |  104 lines

  1. dnl Process this file with Autoconf to produce a configure script for TeX.
  2. dnl
  3. dnl We don't use (for example) tex/tex.web because people who only want
  4. dnl to build part of the distribution may not have any given program.
  5. dnl Even web2c.c isn't guaranteed, but then nothing is ...
  6. AC_INIT(web2c/web2c.c)
  7.  
  8. AC_CONFIG_HEADER(lib/c-auto.h)
  9. dnl Don't complain when common.ac uses AC_CONFIG_HEADER.
  10. define(AC_CONFIG_HEADER,)
  11.  
  12. sinclude(../kpathsea/common.ac)
  13.  
  14. AC_PROG_YACC
  15. AC_PROG_LEX
  16. AC_PROG_LN_S
  17.  
  18. AC_TYPE_SIGNAL
  19.  
  20. dnl These tests prevent reliable cross-compilation.  Sigh.
  21. AC_C_CHAR_UNSIGNED
  22. AC_LONG_64_BITS
  23. AC_C_BIGENDIAN
  24.  
  25. dnl Must do this last, as the addition to DEFS in Autoconf 1.3 confuses
  26. dnl the compiler.
  27. AC_DECL_YYTEXT
  28.  
  29. dnl Check if lib/c-auto.h.in defines a preprocessor symbol.
  30. define(AC_KBSYM_CHECK, AC_EGREP_CPP(yes,
  31. [#include "$srcdir/lib/c-auto.h.in"
  32. #ifdef $1
  33.   yes
  34. #endif
  35. ], $1=yes, $1=no))
  36.  
  37. AC_MSG_CHECKING(for sunwindow libraries)
  38. AC_KBSYM_CHECK(SUNWIN)
  39. AC_MSG_RESULT($SUNWIN)
  40.  
  41. AC_MSG_CHECKING(for xview libraries)
  42. AC_KBSYM_CHECK(XVIEWWIN)
  43. AC_MSG_RESULT($XVIEWWIN)
  44.  
  45. AC_MSG_CHECKING(for X11 libraries)
  46. AC_KBSYM_CHECK(X11WIN)
  47. AC_MSG_RESULT($X11WIN)
  48.  
  49. AC_MSG_CHECKING(for X10 libraries)
  50. AC_KBSYM_CHECK(X10WIN)
  51. AC_MSG_RESULT($X10WIN)
  52.  
  53. if test $XVIEWWIN = yes; then
  54.   wlibs="-lxview -lolgx -lX11 $wlibs"
  55.   (cd $srcdir/mf/MFwindow; rm -f sun.c; $LN_S sun-xview.c sun.c)
  56. fi
  57. if test $X11WIN = yes; then
  58.   AC_PATH_X
  59.   AC_PATH_XTRA
  60.   wlibs="-lXt $X_PRE_LIBS -lX11 $wlibs"
  61.   (cd $srcdir/mf/MFwindow; rm -f x11.c; $LN_S x11-Xt.c x11.c)
  62. fi
  63. if test $X10WIN = yes; then
  64.   wlibs="-lX $wlibs"
  65. fi
  66. if test $SUNWIN = yes; then
  67.   wlibs="-lsuntool -lsunwindow -lpixrect $wlibs"
  68.   (cd $srcdir/mf/MFwindow; rm -f sun.c; $LN_S sun-sunview.c sun.c)
  69. fi
  70. AC_SUBST(wlibs)
  71.  
  72. dnl Do TeX first.
  73. dnl If `small' version is not wanted, do nothing -- make will copy the
  74. dnl default change file.
  75. AC_MSG_CHECKING(for small TeX)
  76. AC_KBSYM_CHECK(SMALLTeX)
  77. AC_MSG_RESULT($SMALLTeX)
  78. if test $SMALLTeX = yes; then
  79.   (cd $srcdir/tex && rm -f ctex.ch && sed -f small.sed <tex.ch >ctex.ch)
  80.   AC_DEFINE(GLUERATIO_TYPE, float)
  81. fi
  82.  
  83. dnl Metafont next.
  84. AC_MSG_CHECKING(for small MF)
  85. AC_KBSYM_CHECK(SMALLMF)
  86. AC_MSG_RESULT($SMALLMF)
  87. if test $SMALLMF = yes; then
  88.   (cd $srcdir/mf && rm -f cmf.ch && sed -f small.sed <mf.ch >cmf.ch)
  89. fi
  90.  
  91. dnl And finally BibTeX.
  92. AC_MSG_CHECKING(for small BibTeX)
  93. AC_KBSYM_CHECK(SMALLBibTeX)
  94. AC_MSG_RESULT($SMALLBibTeX)
  95. if test $SMALLBibTeX = yes; then
  96.   (cd $srcdir/bibtex \
  97.    && rm -f cbibtex.ch && sed -f small.sed <bibtex.ch >cbibtex.ch)
  98. fi
  99.  
  100. dnl Generate `Makefile's, `config.status', and our header file.
  101. AC_OUTPUT(Makefile bibtex/Makefile dviutil/Makefile fontutil/Makefile \
  102. lib/Makefile man/Makefile mf/Makefile mf/MFwindow/Makefile \
  103. tex/Makefile web/Makefile web2c/Makefile)
  104.