configure.in 2.3 KB

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