Fixes for compiling on 64bit and outside the source dir
[AROS.git] / tools / cxref / configure.in
blobb8c497e9635feaa754bc5b1226ce1cab3abe663f
1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(cxref.c)
4 dnl Specify the autoconf file.
5 AC_CONFIG_HEADER(autoconfig.h)
7 dnl Check the page size
8 PAGE=A4
9 AC_ARG_ENABLE(us-paper,
10 [  --enable-us-paper      use US paper instead of A4],
11 [if test "$enableval" = "yes"; then PAGE=US; fi])
12 AC_SUBST(PAGE)
14 dnl Check if we are forced to use the cxref-cpp
15 WITH_CXREF_CPP=test
16 AC_ARG_WITH(cxref-cpp,
17 [  --with-cxref-cpp       use the supplied cpp instead of trying to use gcc],
18 [if test "$withval" = "yes"; then WITH_CXREF_CPP=yes; fi])
20 dnl Checks for programs.
21 AC_PROG_CC
22 AC_PROG_AWK
23 AC_PROG_YACC
24 AC_PROG_CPP
25 AC_PROG_LEX
26 AC_PROG_INSTALL
27 AC_PROG_LN_S
28 AC_PROG_MAKE_SET
29 AC_CHECK_PROG(PERL, perl, perl, )
30 AC_CHECK_PROG(LATEX, latex, latex, )
31 AC_CHECK_PROG(DVIPS, dvips, dvips, )
33 dnl Checks for libraries.
35 dnl Checks for header files.
36 AC_HEADER_STDC
37 AC_HEADER_SYS_WAIT
38 AC_CHECK_HEADERS(malloc.h unistd.h)
40 dnl Checks for typedefs, structures, and compiler characteristics.
41 AC_C_CONST
42 AC_TYPE_PID_T
44 dnl Checks for library functions.
45 AC_FUNC_ALLOCA
46 AC_CHECK_FUNCS(getcwd mkdir strerror strstr)
48 AC_TRY_COMPILE([
49 #include <varargs.h>
50 ],[
51 int foo(void *s, ...)
53  va_list ap;
54  va_start(ap);
57 USE_STD_ARG=0,
58 USE_STD_ARG=1)
60 AC_DEFINE_UNQUOTED(USE_STD_ARG,$USE_STD_ARG)
62 objdir=`pwd`
63 AC_SUBST(objdir)
65 dnl Check the cpp directory
66 AC_CONFIG_SUBDIRS(cpp)
68 dnl Create the output files.
69 AC_OUTPUT(Makefile doc/Makefile query/Makefile)