]> git.saurik.com Git - apt.git/blame - configure.in
Progress and combined cache generator
[apt.git] / configure.in
CommitLineData
d7bccc73
AL
1dnl Process this file with autoconf to produce a configure script.
2dnl The ONLY thing this is used for is to configure for different
3dnl linux architectures and configurations, it is not used to make the
4dnl code more portable
5
6dnl You MUST have an environment that has all the POSIX functions and
7dnl some of the more populare bsd/sysv ones (like select). You'll also
8dnl need a C++ compiler that is semi-standard conformant, exceptions are
9dnl not used but STL is.
10
11AC_INIT(configure.in)
066427d0 12AC_CONFIG_AUX_DIR(buildlib)
d7bccc73
AL
13AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in)
14
15dnl Tom's host stuff
16tl_CHECK_TOOL_PREFIX dnl Initial guess
17
18dnl Check our C compiler
19tl_PROG_CC
20AC_ISC_POSIX
21
22dnl Check the host arch (build+target not needed... yet)
23tl_CANONICAL_HOST
24tl_CHECK_TOOL_PREFIX dnl recheck, in case the initial guess was wrong
25
26dnl Check for other programs
27tl_PROG_CXX
28AC_LANG_CPLUSPLUS
29
30dnl Checks for X11
31AC_PATH_X
32AC_PATH_XTRA
33AC_SUBST(X11LIB)
34X11LIB=
35if test "$no_x" != "yes"; then
36 X11LIB="-lx11"
118a5e95 37 AC_DEFINE(HAVE_X11)
d7bccc73
AL
38fi
39
40dnl Checks for Slang
118a5e95 41AC_CHECK_LIB(slang, init_SLang,[AC_DEFINE(HAVE_LIBSLANG) SLANGLIB="-lslang"])
d7bccc73
AL
42AC_SUBST(SLANGLIB)
43
44dnl Checks for GPM
45AC_ARG_WITH(gpm,[ --without-gpm do not use GPM mouse support])
46if test "$with_gpm" != "no"; then
118a5e95 47 AC_CHECK_LIB(gpm, Gpm_Open,[AC_DEFINE(HAVE_LIBGPM) GPMLIB="-lgpm"])
d7bccc73
AL
48 AC_SUBST(GPMLIB)
49fi
50
51dnl Converts the ARCH to be the same as dpkg
52AC_MSG_CHECKING(system architecture)
53archset="`awk '$1 == "'$host_cpu'" { print $2 }' $srcdir/buildlib/archtable`"
54if test "x$archset" = "x"; then
55 AC_MSG_ERROR(failed: use --host=)
56fi
57AC_MSG_RESULT($archset)
58AC_DEFINE_UNQUOTED(PKG_DEB_ARCH,"$archset")
59
60dnl Check the sizes etc. of the architecture
61changequote(,)
62if archline="`sed -ne 's/^'$archset':[ ]\+\(.*\)/\1/gp' $srcdir/buildlib/sizetable`"; then
63changequote([,])
64 set $archline
65 if test "$1" = "little"; then
66 ac_cv_c_bigendian=no
67 else
68 ac_cv_c_bigendian=yes
69 fi
70 size_char=$2
71 size_int=$3
72 size_short=$4
73 size_long=$5
74fi
75if test "$cross_compiling" = "yes" -a "$archline" = ""; then
76 AC_MSG_ERROR(When cross compiling, architecture must be present in sizetable)
77fi
78AC_C_BIGENDIAN
79AC_CHECK_SIZEOF(char,$size_char)
80AC_CHECK_SIZEOF(int,$size_int)
81AC_CHECK_SIZEOF(short,$size_short)
82AC_CHECK_SIZEOF(long,$size_long)
83
84dnl Check for debiandoc
85AC_CHECK_PROG(DEBIANDOC_HTML,debiandoc2html,"yes","")
86AC_CHECK_PROG(DEBIANDOC_TEXT,debiandoc2text,"yes","")
87
066427d0 88AC_OUTPUT(environment.mak:buildlib/environment.mak.in makefile:buildlib/makefile.in,make dirs)