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
|
dnl Process this file with autoconf to produce a configure script.
dnl The ONLY thing this is used for is to configure for different
dnl linux architectures and configurations, it is not used to make the
dnl code more portable
dnl You MUST have an environment that has all the POSIX functions and
dnl some of the more populare bsd/sysv ones (like select). You'll also
dnl need a C++ compiler that is semi-standard conformant, exceptions are
dnl not used but STL is.
AC_INIT(configure.in)
AC_CONFIG_HEADER(init/config.h:config.h.in)
AC_DEFINE_UNQUOTED(VERSION,"0.7.7.1")
AC_DEFINE_UNQUOTED(PACKAGE,"console-apt")
dnl Checks for programs.
AC_PROG_CC
AC_ISC_POSIX
dnl Check the host arch (build+target not needed... yet)
dnl AC_CANONICAL_HOST
dnl AC_CHECK_TOOL_PREFIX
dnl Check for C++ compiler
AC_PROG_CXX
AC_PROG_CPP
dnl Checks for libraries.
dnl Required libraries
AC_DEFINE(HAVE_APTPKGLIB) APTPKGLIB="-lapt-pkg"
AC_SUBST(APTPKGLIB)
AC_CHECK_LIB(ncurses, getch,[AC_DEFINE(HAVE_CURSES) CURSESLIB="-lncurses"],
AC_CHECK_LIB(curses, getch,[AC_DEFINE(HAVE_CURSES) CURSESLIB="-lcurses"]))
AC_SUBST(CURSESLIB)
dnl Checks for GPM
AC_ARG_WITH(gpm,[ --without-gpm do not use GPM mouse support])
if test "$with_gpm" != "no"; then
AC_CHECK_LIB(gpm, Gpm_Open,[AC_DEFINE(HAVE_LIBGPM) GPMLIB="-lgpm"])
AC_SUBST(GPMLIB)
fi
dnl Checks for header files.
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(fcntl.h string.h sys/ioctl.h sys/time.h unistd.h ncurses.h)
dnl Checks for typedefs, structures, and compiler characteristics.
dnl AC_C_CONST
AC_C_INLINE
AC_HEADER_TIME
dnl Checks for library functions.
AC_TYPE_SIGNAL
AC_CHECK_FUNCS(gettimeofday regcomp strdup strstr)
AC_OUTPUT(makefile:makefile.in globalmakeflags:globalmakeflags.in)
|