1 dnl Process this file with autoconf to produce a configure script.
2 dnl The ONLY thing this is used for is to configure for different
3 dnl linux architectures and configurations, it is not used to make the
6 dnl You MUST have an environment that has all the POSIX functions and
7 dnl some of the more populare bsd/sysv ones (like select). You'll also
8 dnl need a C++ compiler that is semi-standard conformant, exceptions are
9 dnl not used but STL is.
12 AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in)
15 tl_CHECK_TOOL_PREFIX dnl Initial guess
17 dnl Check our C compiler
21 dnl Check the host arch (build+target not needed... yet)
23 tl_CHECK_TOOL_PREFIX dnl recheck, in case the initial guess was wrong
25 dnl Check for other programs
34 if test "$no_x" != "yes"; then
40 AC_CHECK_LIB(slang, init_SLang,[AC_DEFINE(HAVE_LIBSLANG) SLANGLIB="-lslang"])
44 AC_ARG_WITH(gpm,[ --without-gpm do not use GPM mouse support])
45 if test "$with_gpm" != "no"; then
46 AC_CHECK_LIB(gpm, Gpm_Open,[AC_DEFINE(HAVE_LIBGPM) GPMLIB="-lgpm"])
50 dnl Converts the ARCH to be the same as dpkg
51 AC_MSG_CHECKING(system architecture)
52 archset="`awk '$1 == "'$host_cpu'" { print $2 }' $srcdir/buildlib/archtable`"
53 if test "x$archset" = "x"; then
54 AC_MSG_ERROR(failed: use --host=)
56 AC_MSG_RESULT($archset)
57 AC_DEFINE_UNQUOTED(PKG_DEB_ARCH,"$archset")
59 dnl Check the sizes etc. of the architecture
61 if archline="`sed -ne 's/^'$archset':[ ]\+\(.*\)/\1/gp' $srcdir/buildlib/sizetable`"; then
64 if test "$1" = "little"; then
74 if test "$cross_compiling" = "yes" -a "$archline" = ""; then
75 AC_MSG_ERROR(When cross compiling, architecture must be present in sizetable)
78 AC_CHECK_SIZEOF(char,$size_char)
79 AC_CHECK_SIZEOF(int,$size_int)
80 AC_CHECK_SIZEOF(short,$size_short)
81 AC_CHECK_SIZEOF(long,$size_long)
83 dnl Check for debiandoc
84 AC_CHECK_PROG(DEBIANDOC_HTML,debiandoc2html,"yes","")
85 AC_CHECK_PROG(DEBIANDOC_TEXT,debiandoc2text,"yes","")
87 AC_OUTPUT(environment.mak:buildlib/environment.mak.in)
89 dnl Setup the directories
90 mkdir doc bin obj include/apt-pkg include/deity