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

  1. dnl Process this file with autoconf to produce a configure script.
  2. AC_INIT(xdvi.c)
  3.  
  4. sinclude(../kpathsea/common.ac)
  5.  
  6. dnl Substitutes for X_CFLAGS, X_LIBS, and X_EXTRA_LIBS.
  7. AC_PATH_XTRA
  8.  
  9. AC_FUNC_VPRINTF
  10.  
  11. # We actually only need getwd if we're being compiled with -DSELFILE.
  12. # And we only need isinf and ieeefp.h to work around a Solaris bug in
  13. # -ldps; see psdps.c.
  14. # <sys/bsdtypes.h> is for ISC 4.0, to define fd_set in psgs.c.
  15. AC_CHECK_FUNCS(getwd isinf)
  16. AC_CHECK_HEADERS(ieeefp.h sys/bsdtypes.h)
  17.  
  18. # Do we have the SIGIO signal (and F_SETOWN and FASYNC)?
  19. AC_MSG_CHECKING(for SIGIO)
  20. AC_CACHE_VAL(kb_cv_sys_sigio,
  21. [AC_TRY_COMPILE([#include <signal.h>
  22. #include <fcntl.h>],
  23.   [int x = SIGIO + F_SETOWN + FASYNC;],
  24.   kb_cv_sys_sigio=yes, kb_cv_sys_sigio=no)])dnl
  25. AC_MSG_RESULT($kb_cv_sys_sigio)
  26. if test $kb_cv_sys_sigio = yes; then
  27.   AC_DEFINE(HAVE_SIGIO)
  28. fi
  29.  
  30. # Check if the user wants to use GhostScript, DPS or NeWS to
  31. # display PostScript.
  32. AC_ARG_WITH(ps,
  33. changequote(`,')
  34. `  --with-ps={no,yes,gs,dps,news} PostScript interpreter [gs]',
  35. changequote([,])
  36. [case $withval in
  37.   yes|gs) PS_DEF="$PS_DEF -DPS_GS";;
  38.       no) PS_DEF=no;;
  39.      dps) PS_DEF="$PS_DEF -DPS_DPS";;
  40.     news) PS_DEF="$PS_DEF -DPS_NEWS";;
  41.        *)] AC_MSG_WARN(Unknown --with-ps argument \`$withval'; using gs.);;
  42.  esac)
  43. test -z "$PS_DEF" && PS_DEF=-DPS_GS
  44. test "$PS_DEF" = no && PS_DEF=
  45. AC_SUBST(PS_DEF)dnl
  46. dnl
  47. # If we're on Solaris and we want DPS, then add the extra compilation stuff
  48. # to get it.
  49. if echo "$PS_DEF" | grep PS_DPS >/dev/null; then
  50.    if test "`(uname) 2>/dev/null`" = SunOS \
  51.       && uname -r | grep '^5' >/dev/null; then
  52.     AC_MSG_RESULT(adding DPS includes and libraries for Solaris)
  53.     X_CFLAGS="$X_CFLAGS -I/usr/openwin/include/X11"
  54.     # -lsunmath is for isinf.
  55.     X_LIBS="$X_LIBS -R/usr/openwin/lib /usr/openwin/lib/libdps.so -lsunmath"
  56.   else
  57.     # SunOS 4.x is simpler.
  58.     AC_MSG_RESULT(adding DPS includes and libraries for SunOS 4.x)
  59.     X_LIBS="$X_LIBS -ldps"
  60.   fi
  61. elif echo "$PS_DEF" | grep PS_NEWS >/dev/null; then
  62.     AC_MSG_RESULT(adding NeWS libraries)
  63.     X_LIBS="$X_LIBS -lxview -lcps -lolgx -lxvps"
  64. fi
  65.  
  66. AC_OUTPUT(Makefile)
  67.