]> git.saurik.com Git - apt.git/blame - configure.in
Brought in the GUI
[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
880e9be4 36 X11LIB="-lX11"
118a5e95 37 AC_DEFINE(HAVE_X11)
880e9be4
AL
38 dnl Checks for Slang
39 AC_CHECK_LIB(Xpm, XpmLibraryVersion,[AC_DEFINE(HAVE_LIBXPM) XPMLIB="-lXpm"],,$X_LIBS $X_PRE_LIBS $X11LIB $X_EXTRA_LIBS)
40 AC_SUBST(XPMLIB)
41 if test "$XPMLIB" != "-lXpm"; then
42 AC_MSG_ERROR(failed: I need xpm if you are building for X)
43 fi
d7bccc73
AL
44fi
45
46dnl Checks for Slang
118a5e95 47AC_CHECK_LIB(slang, init_SLang,[AC_DEFINE(HAVE_LIBSLANG) SLANGLIB="-lslang"])
d7bccc73
AL
48AC_SUBST(SLANGLIB)
49
50dnl Checks for GPM
51AC_ARG_WITH(gpm,[ --without-gpm do not use GPM mouse support])
52if test "$with_gpm" != "no"; then
118a5e95 53 AC_CHECK_LIB(gpm, Gpm_Open,[AC_DEFINE(HAVE_LIBGPM) GPMLIB="-lgpm"])
d7bccc73
AL
54 AC_SUBST(GPMLIB)
55fi
56
57dnl Converts the ARCH to be the same as dpkg
58AC_MSG_CHECKING(system architecture)
59archset="`awk '$1 == "'$host_cpu'" { print $2 }' $srcdir/buildlib/archtable`"
60if test "x$archset" = "x"; then
61 AC_MSG_ERROR(failed: use --host=)
62fi
63AC_MSG_RESULT($archset)
64AC_DEFINE_UNQUOTED(PKG_DEB_ARCH,"$archset")
65
66dnl Check the sizes etc. of the architecture
67changequote(,)
68if archline="`sed -ne 's/^'$archset':[ ]\+\(.*\)/\1/gp' $srcdir/buildlib/sizetable`"; then
69changequote([,])
70 set $archline
71 if test "$1" = "little"; then
72 ac_cv_c_bigendian=no
73 else
74 ac_cv_c_bigendian=yes
75 fi
76 size_char=$2
77 size_int=$3
78 size_short=$4
79 size_long=$5
80fi
81if test "$cross_compiling" = "yes" -a "$archline" = ""; then
82 AC_MSG_ERROR(When cross compiling, architecture must be present in sizetable)
83fi
84AC_C_BIGENDIAN
85AC_CHECK_SIZEOF(char,$size_char)
86AC_CHECK_SIZEOF(int,$size_int)
87AC_CHECK_SIZEOF(short,$size_short)
88AC_CHECK_SIZEOF(long,$size_long)
89
90dnl Check for debiandoc
91AC_CHECK_PROG(DEBIANDOC_HTML,debiandoc2html,"yes","")
92AC_CHECK_PROG(DEBIANDOC_TEXT,debiandoc2text,"yes","")
93
066427d0 94AC_OUTPUT(environment.mak:buildlib/environment.mak.in makefile:buildlib/makefile.in,make dirs)