1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
|
dnl Process this file with autoconf to produce a configure script.
AC_INIT(xpdf/xpdf.cc)
dnl ##### Optional features.
OPTIONS=""
AC_ARG_ENABLE(a4-paper,
[ --enable-a4-paper use A4 paper size instead of Letter for
PostScript output],
OPTIONS="$OPTIONS -DA4_PAPER")
AC_ARG_ENABLE(no-text-select,
[ --enable-no-text-select do not allow text selection],
OPTIONS="$OPTIONS -DNO_TEXT_SELECT")
AC_ARG_WITH(gzip,
[ --with-gzip use gzip instead of uncompress],
OPTIONS="$OPTIONS -USE_GZIP")
AC_SUBST(OPTIONS)
dnl ##### Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_RANLIB
AC_CHECK_PROG(STRIP, strip, strip, :)
dnl ##### Check for OS/2.
AC_CACHE_CHECK([for OS/2 (with EMX)],
xpdf_cv_sys_os2,
[AC_TRY_COMPILE([],
[__EMX__],
xpdf_cv_sys_os2=yes, xpdf_cv_sys_os2=no)])
if test "$xpdf_cv_sys_os2" = yes; then
EXE=".exe"
LIBPREFIX=""
AR="ar -rc"
else
EXE=""
LIBPREFIX="lib"
AR="ar rc"
fi
AC_SUBST(EXE)
AC_SUBST(LIBPREFIX)
AC_SUBST(AR)
dnl ##### Checks for header files.
AC_PATH_XTRA
AC_HEADER_DIRENT
AC_CHECK_HEADERS(sys/select.h)
AC_CHECK_HEADERS(strings.h)
AC_CHECK_HEADERS(bstring.h)
dnl ##### Checks for typedefs, structures, and compiler characteristics.
AC_C_INLINE
dnl ##### Checks for library functions.
AC_CHECK_FUNCS(popen)
dnl ##### Check select argument type: on HP-UX before version 10, select
dnl ##### takes (int *) instead of (fd_set *).
AC_CACHE_CHECK([whether select takes fd_set arguments],
xpdf_cv_func_select_arg,
[AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/time.h>
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif],
[fd_set fds;
select(1, &fds, &fds, &fds, NULL);],
xpdf_cv_func_select_arg=yes, xpdf_cv_func_select_arg=no)])
if test "$xpdf_cv_func_select_arg" != yes; then
AC_DEFINE(SELECT_TAKES_INT)
fi
dnl ##### Check for libXpm.
AC_CHECK_LIB(Xpm, XpmCreatePixmapFromData, , ,
$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS)
if test "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = yes; then
XPM_LIB="-lXpm"
else
XPM_LIB=""
fi
AC_SUBST(XPM_LIB)
dnl ##### Write the makefiles.
AC_OUTPUT(Makefile xpdf/Makefile ltk/Makefile goo/Makefile)
|