aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Schwab2002-04-14 01:40:58 +0000
committerAndreas Schwab2002-04-14 01:40:58 +0000
commit5e7d772d7092e5667d423f37435d70a8f1df7bbd (patch)
treebf29628f354040c9b0ab78c667524fa61bef6108
parent7605f1bd6c4cdd4a572e32567e6b470423edae77 (diff)
downloademacs-5e7d772d7092e5667d423f37435d70a8f1df7bbd.tar.gz
emacs-5e7d772d7092e5667d423f37435d70a8f1df7bbd.zip
Add config header templates to all AC_DEFINE and
AC_DEFINE_UNQUOTED symbols.
-rw-r--r--configure.in399
1 files changed, 336 insertions, 63 deletions
diff --git a/configure.in b/configure.in
index 65d61e32d61..9ceb2fc2919 100644
--- a/configure.in
+++ b/configure.in
@@ -67,9 +67,12 @@ AC_ARG_WITH(pop,
67else : 67else :
68fi], 68fi],
69AC_DEFINE(MAIL_USE_POP)) 69AC_DEFINE(MAIL_USE_POP))
70AH_TEMPLATE(MAIL_USE_POP, [Define to support POP mail retrieval.])dnl
70AC_ARG_WITH(kerberos, 71AC_ARG_WITH(kerberos,
71[ --with-kerberos support Kerberos-authenticated POP], 72[ --with-kerberos support Kerberos-authenticated POP],
72[AC_DEFINE(KERBEROS)]) 73[AC_DEFINE(KERBEROS)])
74AH_TEMPLATE(KERBEROS,
75 [Define to support Kerberos-authenticated POP mail retrieval.])dnl
73AC_ARG_WITH(kerberos5, 76AC_ARG_WITH(kerberos5,
74[ --with-kerberos5 support Kerberos version 5 authenticated POP], 77[ --with-kerberos5 support Kerberos version 5 authenticated POP],
75[if test "${with_kerberos5+set}" = set; then 78[if test "${with_kerberos5+set}" = set; then
@@ -78,10 +81,10 @@ AC_ARG_WITH(kerberos5,
78 AC_DEFINE(KERBEROS) 81 AC_DEFINE(KERBEROS)
79 fi 82 fi
80fi 83fi
81AC_DEFINE(KERBEROS5)]) 84AC_DEFINE(KERBEROS5, 1, [Define to use Kerberos 5 instead of Kerberos 4.])])
82AC_ARG_WITH(hesiod, 85AC_ARG_WITH(hesiod,
83[ --with-hesiod support Hesiod to get the POP server host], 86[ --with-hesiod support Hesiod to get the POP server host],
84[AC_DEFINE(HESIOD)]) 87[AC_DEFINE(HESIOD, 1, [Define to support using a Hesiod database to find the POP server.])])
85 88
86AC_ARG_WITH(sound, 89AC_ARG_WITH(sound,
87[ --without-sound don't compile with sound support]) 90[ --without-sound don't compile with sound support])
@@ -1405,7 +1408,7 @@ AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
1405#endif], [static struct utimbuf x; x.actime = x.modtime;], 1408#endif], [static struct utimbuf x; x.actime = x.modtime;],
1406 emacs_cv_struct_utimbuf=yes, emacs_cv_struct_utimbuf=no)) 1409 emacs_cv_struct_utimbuf=yes, emacs_cv_struct_utimbuf=no))
1407if test $emacs_cv_struct_utimbuf = yes; then 1410if test $emacs_cv_struct_utimbuf = yes; then
1408 AC_DEFINE(HAVE_STRUCT_UTIMBUF) 1411 AC_DEFINE(HAVE_STRUCT_UTIMBUF, 1, [Define to 1 if `struct utimbuf' is declared by <utime.h>.])
1409fi 1412fi
1410 1413
1411dnl checks for typedefs 1414dnl checks for typedefs
@@ -1416,7 +1419,7 @@ AC_CACHE_CHECK(for speed_t, emacs_cv_speed_t,
1416AC_TRY_COMPILE([#include <termios.h>], [speed_t x = 1;], 1419AC_TRY_COMPILE([#include <termios.h>], [speed_t x = 1;],
1417 emacs_cv_speed_t=yes, emacs_cv_speed_t=no)) 1420 emacs_cv_speed_t=yes, emacs_cv_speed_t=no))
1418if test $emacs_cv_speed_t = yes; then 1421if test $emacs_cv_speed_t = yes; then
1419 AC_DEFINE(HAVE_SPEED_T) 1422 AC_DEFINE(HAVE_SPEED_T, 1, [Define to 1 if `speed_t' is declared by <termios.h>.])
1420fi 1423fi
1421 1424
1422AC_CACHE_CHECK(for struct timeval, emacs_cv_struct_timeval, 1425AC_CACHE_CHECK(for struct timeval, emacs_cv_struct_timeval,
@@ -1433,7 +1436,7 @@ AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
1433 emacs_cv_struct_timeval=yes, emacs_cv_struct_timeval=no)) 1436 emacs_cv_struct_timeval=yes, emacs_cv_struct_timeval=no))
1434HAVE_TIMEVAL=$emacs_cv_struct_timeval 1437HAVE_TIMEVAL=$emacs_cv_struct_timeval
1435if test $emacs_cv_struct_timeval = yes; then 1438if test $emacs_cv_struct_timeval = yes; then
1436 AC_DEFINE(HAVE_TIMEVAL) 1439 AC_DEFINE(HAVE_TIMEVAL, 1, [Define to 1 if `struct timeval' is declared by <sys/time.h>.])
1437fi 1440fi
1438 1441
1439AC_CACHE_CHECK(for struct exception, emacs_cv_struct_exception, 1442AC_CACHE_CHECK(for struct exception, emacs_cv_struct_exception,
@@ -1442,19 +1445,16 @@ AC_TRY_COMPILE([#include <math.h>],
1442 emacs_cv_struct_exception=yes, emacs_cv_struct_exception=no)) 1445 emacs_cv_struct_exception=yes, emacs_cv_struct_exception=no))
1443HAVE_EXCEPTION=$emacs_cv_struct_exception 1446HAVE_EXCEPTION=$emacs_cv_struct_exception
1444if test $emacs_cv_struct_exception != yes; then 1447if test $emacs_cv_struct_exception != yes; then
1445 AC_DEFINE(NO_MATHERR) 1448 AC_DEFINE(NO_MATHERR, 1, [Define to 1 if you don't have struct exception in math.h.])
1446fi 1449fi
1447 1450
1448dnl checks for structure members 1451dnl checks for structure members
1449AC_STRUCT_TM 1452AC_STRUCT_TM
1450AC_STRUCT_TIMEZONE 1453AC_STRUCT_TIMEZONE
1451AC_CACHE_CHECK(for tm_gmtoff in struct tm, emacs_cv_tm_gmtoff, 1454AC_CHECK_MEMBER(struct tm.tm_gmtoff,
1452AC_TRY_LINK([#include <time.h>], [struct tm t; t.tm_gmtoff = 0], 1455 [AC_DEFINE(HAVE_TM_GMTOFF, 1,
1453 emacs_cv_tm_gmtoff=yes, 1456 [Define to 1 if `tm_gmtoff' is member of `struct tm'.])],,
1454 emacs_cv_tm_gmtoff=no)) 1457 [#include <time.h>])
1455if test $emacs_cv_tm_gmtoff = yes; then
1456 AC_DEFINE(HAVE_TM_GMTOFF)
1457fi
1458 1458
1459dnl checks for compiler characteristics 1459dnl checks for compiler characteristics
1460 1460
@@ -1476,6 +1476,9 @@ if test $emacs_cv_void_star = yes; then
1476else 1476else
1477 AC_DEFINE(POINTER_TYPE, char) 1477 AC_DEFINE(POINTER_TYPE, char)
1478fi 1478fi
1479AH_TEMPLATE(POINTER_TYPE,
1480 [Define as `void' if your compiler accepts `void *'; otherwise
1481 define as `char'.])dnl
1479 1482
1480dnl check for Make feature 1483dnl check for Make feature
1481AC_PROG_MAKE_SET 1484AC_PROG_MAKE_SET
@@ -1495,8 +1498,9 @@ else
1495 if test "$gamedir" = "yes"; then 1498 if test "$gamedir" = "yes"; then
1496 gamedir="${localstatedir}/games/emacs" 1499 gamedir="${localstatedir}/games/emacs"
1497 fi 1500 fi
1498 tgamedir=`eval "echo $gamedir"` 1501 eval tgamedir=\"$gamedir\"
1499 AC_DEFINE_UNQUOTED(HAVE_SHARED_GAME_DIR, "$tgamedir") 1502 AC_DEFINE_UNQUOTED(HAVE_SHARED_GAME_DIR, "$tgamedir",
1503 [Define to the name of the shared game directory.])
1500 else 1504 else
1501 AC_MSG_RESULT([no]) 1505 AC_MSG_RESULT([no])
1502 gamedir=no 1506 gamedir=no
@@ -1622,7 +1626,8 @@ if test "$doug_lea_malloc" = "yes" ; then
1622 GNU_MALLOC_reason=" 1626 GNU_MALLOC_reason="
1623 (Using Doug Lea's new malloc from the GNU C Library.)" 1627 (Using Doug Lea's new malloc from the GNU C Library.)"
1624 fi 1628 fi
1625 AC_DEFINE(DOUG_LEA_MALLOC) 1629 AC_DEFINE(DOUG_LEA_MALLOC, 1,
1630 [Define to 1 if you are using the GNU C Library.])
1626fi 1631fi
1627 1632
1628if test x"${REL_ALLOC}" = x; then 1633if test x"${REL_ALLOC}" = x; then
@@ -1726,7 +1731,7 @@ if test "${HAVE_X11}" = "yes"; then
1726 emacs_xkb=yes, emacs_xkb=no) 1731 emacs_xkb=yes, emacs_xkb=no)
1727 AC_MSG_RESULT($emacs_xkb) 1732 AC_MSG_RESULT($emacs_xkb)
1728 if test $emacs_xkb = yes; then 1733 if test $emacs_xkb = yes; then
1729 AC_DEFINE(HAVE_XKBGETKEYBOARD) 1734 AC_DEFINE(HAVE_XKBGETKEYBOARD, 1, [Define to 1 if you have the XkbGetKeyboard function.])
1730 fi 1735 fi
1731 1736
1732 AC_CHECK_FUNCS(XrmSetDatabase XScreenResourceString \ 1737 AC_CHECK_FUNCS(XrmSetDatabase XScreenResourceString \
@@ -1743,7 +1748,8 @@ fail;
1743], emacs_cv_x11_version_6=yes, emacs_cv_x11_version_6=no)]) 1748], emacs_cv_x11_version_6=yes, emacs_cv_x11_version_6=no)])
1744 if test $emacs_cv_x11_version_6 = yes; then 1749 if test $emacs_cv_x11_version_6 = yes; then
1745 AC_MSG_RESULT(6 or newer) 1750 AC_MSG_RESULT(6 or newer)
1746 AC_DEFINE(HAVE_X11R6) 1751 AC_DEFINE(HAVE_X11R6, 1,
1752 [Define to 1 if you have the X11R6 or newer version of Xlib.])
1747 else 1753 else
1748 AC_MSG_RESULT(before 6) 1754 AC_MSG_RESULT(before 6)
1749 fi 1755 fi
@@ -1760,7 +1766,8 @@ fail;
1760 if test $emacs_cv_x11_version_5 = yes; then 1766 if test $emacs_cv_x11_version_5 = yes; then
1761 AC_MSG_RESULT(5 or newer) 1767 AC_MSG_RESULT(5 or newer)
1762 HAVE_X11R5=yes 1768 HAVE_X11R5=yes
1763 AC_DEFINE(HAVE_X11R5) 1769 AC_DEFINE(HAVE_X11R5, 1,
1770 [Define to 1 if you have the X11R5 or newer version of Xlib.])
1764 else 1771 else
1765 HAVE_X11R5=no 1772 HAVE_X11R5=no
1766 AC_MSG_RESULT(before 5) 1773 AC_MSG_RESULT(before 5)
@@ -1804,7 +1811,8 @@ fail;
1804 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6 1811 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
1805 if test $emacs_cv_x11_toolkit_version_6 = yes; then 1812 if test $emacs_cv_x11_toolkit_version_6 = yes; then
1806 AC_MSG_RESULT(6 or newer) 1813 AC_MSG_RESULT(6 or newer)
1807 AC_DEFINE(HAVE_X11XTR6) 1814 AC_DEFINE(HAVE_X11XTR6, 1,
1815 [Define to 1 if you have the X11R6 or newer version of Xt.])
1808 else 1816 else
1809 AC_MSG_RESULT(before 6) 1817 AC_MSG_RESULT(before 6)
1810 fi 1818 fi
@@ -1840,10 +1848,12 @@ Motif version prior to 2.1.
1840 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1 1848 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
1841 if test $emacs_cv_motif_version_2_1 = yes; then 1849 if test $emacs_cv_motif_version_2_1 = yes; then
1842 HAVE_LIBXP=no 1850 HAVE_LIBXP=no
1843 AC_DEFINE(HAVE_MOTIF_2_1) 1851 AC_DEFINE(HAVE_MOTIF_2_1, 1,
1852 [Define to 1 if you have Motif 2.1 or newer.])
1844 AC_CHECK_LIB(Xp, XpCreateContext, HAVE_LIBXP=yes) 1853 AC_CHECK_LIB(Xp, XpCreateContext, HAVE_LIBXP=yes)
1845 if test ${HAVE_LIBXP} = yes; then 1854 if test ${HAVE_LIBXP} = yes; then
1846 AC_DEFINE(HAVE_LIBXP) 1855 AC_DEFINE(HAVE_LIBXP, 1,
1856 [Define to 1 if you have the Xp library (-lXp).])
1847 fi 1857 fi
1848 fi 1858 fi
1849fi 1859fi
@@ -1855,7 +1865,8 @@ if test "${HAVE_X11}" = "yes"; then
1855 AC_CHECK_HEADER(X11/Xaw3d/Scrollbar.h, 1865 AC_CHECK_HEADER(X11/Xaw3d/Scrollbar.h,
1856 AC_CHECK_LIB(Xaw3d, XawScrollbarSetThumb, HAVE_XAW3D=yes)) 1866 AC_CHECK_LIB(Xaw3d, XawScrollbarSetThumb, HAVE_XAW3D=yes))
1857 if test "${HAVE_XAW3D}" = "yes"; then 1867 if test "${HAVE_XAW3D}" = "yes"; then
1858 AC_DEFINE(HAVE_XAW3D) 1868 AC_DEFINE(HAVE_XAW3D, 1,
1869 [Define to 1 if you have the Xaw3d library (-lXaw3d).])
1859 fi 1870 fi
1860 fi 1871 fi
1861fi 1872fi
@@ -1864,6 +1875,8 @@ dnl Use toolkit scroll bars if configured for X toolkit and either
1864dnl using Motif or Xaw3d is available, and unless 1875dnl using Motif or Xaw3d is available, and unless
1865dnl --with-toolkit-scroll-bars=no was specified. 1876dnl --with-toolkit-scroll-bars=no was specified.
1866 1877
1878AH_TEMPLATE(USE_TOOLKIT_SCROLL_BARS,
1879 [Define to 1 if we should use toolkit scroll bars.])dnl
1867USE_TOOLKIT_SCROLL_BARS=no 1880USE_TOOLKIT_SCROLL_BARS=no
1868if test "${with_toolkit_scroll_bars}" != "no"; then 1881if test "${with_toolkit_scroll_bars}" != "no"; then
1869 if test "${USE_X_TOOLKIT}" != "none"; then 1882 if test "${USE_X_TOOLKIT}" != "none"; then
@@ -1882,7 +1895,8 @@ dnl Don't use X11 input methods if user specifies he doesn't want it
1882dnl with `--with-xim=no'. 1895dnl with `--with-xim=no'.
1883 1896
1884if test "${with_xim}" != "no"; then 1897if test "${with_xim}" != "no"; then
1885 AC_DEFINE(USE_XIM) 1898 AC_DEFINE(USE_XIM, 1,
1899 [Define to 1 if we should use XIM, if it is available.])
1886fi 1900fi
1887 1901
1888### Use -lXpm if available, unless `--with-xpm=no'. 1902### Use -lXpm if available, unless `--with-xpm=no'.
@@ -1909,7 +1923,7 @@ no_return_alloc_pixels
1909 fi 1923 fi
1910 1924
1911 if test "${HAVE_XPM}" = "yes"; then 1925 if test "${HAVE_XPM}" = "yes"; then
1912 AC_DEFINE(HAVE_XPM) 1926 AC_DEFINE(HAVE_XPM, 1, [Define to 1 if you have the Xpm libary (-lXpm).])
1913 fi 1927 fi
1914fi 1928fi
1915 1929
@@ -1923,6 +1937,7 @@ if test "${HAVE_X11}" = "yes"; then
1923 AC_CHECK_LIB(jpeg, jpeg_destroy_compress, HAVE_JPEG=yes)) 1937 AC_CHECK_LIB(jpeg, jpeg_destroy_compress, HAVE_JPEG=yes))
1924 fi 1938 fi
1925 1939
1940 AH_TEMPLATE(HAVE_JPEG, [Define to 1 if you have the jpeg library (-ljpeg).])dnl
1926 if test "${HAVE_JPEG}" = "yes"; then 1941 if test "${HAVE_JPEG}" = "yes"; then
1927 AC_DEFINE(HAVE_JPEG) 1942 AC_DEFINE(HAVE_JPEG)
1928 AC_EGREP_CPP( 1943 AC_EGREP_CPP(
@@ -1947,7 +1962,7 @@ if test "${HAVE_X11}" = "yes"; then
1947 fi 1962 fi
1948 1963
1949 if test "${HAVE_PNG}" = "yes"; then 1964 if test "${HAVE_PNG}" = "yes"; then
1950 AC_DEFINE(HAVE_PNG) 1965 AC_DEFINE(HAVE_PNG, 1, [Define to 1 if you have the png library (-lpng).])
1951 fi 1966 fi
1952fi 1967fi
1953 1968
@@ -1963,7 +1978,7 @@ if test "${HAVE_X11}" = "yes"; then
1963 fi 1978 fi
1964 1979
1965 if test "${HAVE_TIFF}" = "yes"; then 1980 if test "${HAVE_TIFF}" = "yes"; then
1966 AC_DEFINE(HAVE_TIFF) 1981 AC_DEFINE(HAVE_TIFF, 1, [Define to 1 if you have the tiff library (-ltiff).])
1967 fi 1982 fi
1968fi 1983fi
1969 1984
@@ -1978,7 +1993,7 @@ if test "${HAVE_X11}" = "yes"; then
1978 fi 1993 fi
1979 1994
1980 if test "${HAVE_GIF}" = "yes"; then 1995 if test "${HAVE_GIF}" = "yes"; then
1981 AC_DEFINE(HAVE_GIF) 1996 AC_DEFINE(HAVE_GIF, 1, [Define to 1 if you have the ungif library (-lungif).])
1982 fi 1997 fi
1983fi 1998fi
1984 1999
@@ -1989,7 +2004,7 @@ if test "${HAVE_X11}" = "yes"; then
1989 AC_CHECK_LIB(SM, SmcOpenConnection, HAVE_X_SM=yes, -lICE)) 2004 AC_CHECK_LIB(SM, SmcOpenConnection, HAVE_X_SM=yes, -lICE))
1990 2005
1991 if test "${HAVE_X_SM}" = "yes"; then 2006 if test "${HAVE_X_SM}" = "yes"; then
1992 AC_DEFINE(HAVE_X_SM) 2007 AC_DEFINE(HAVE_X_SM, 1, [Define to 1 if you have the SM library (-lSM).])
1993 case "$LIBS" in 2008 case "$LIBS" in
1994 *-lSM*) ;; 2009 *-lSM*) ;;
1995 *) LIBS="-lSM -lICE $LIBS" ;; 2010 *) LIBS="-lSM -lICE $LIBS" ;;
@@ -2004,7 +2019,7 @@ AC_CACHE_CHECK(whether netdb declares h_errno,
2004 [return h_errno;], 2019 [return h_errno;],
2005 emacs_cv_netdb_declares_h_errno=yes, emacs_cv_netdb_declares_h_errno=no)]) 2020 emacs_cv_netdb_declares_h_errno=yes, emacs_cv_netdb_declares_h_errno=no)])
2006if test $emacs_cv_netdb_declares_h_errno = yes; then 2021if test $emacs_cv_netdb_declares_h_errno = yes; then
2007 AC_DEFINE(HAVE_H_ERRNO) 2022 AC_DEFINE(HAVE_H_ERRNO, 1, [Define to 1 if netdb.h declares h_errno.])
2008fi 2023fi
2009 2024
2010AC_FUNC_ALLOCA 2025AC_FUNC_ALLOCA
@@ -2030,7 +2045,7 @@ if test "$ac_cv_lib_lockfile_maillock" = no; then
2030 AC_MSG_ERROR([Shared liblockfile found but can't link against it. 2045 AC_MSG_ERROR([Shared liblockfile found but can't link against it.
2031This probably means that movemail could lose mail. 2046This probably means that movemail could lose mail.
2032There may be a \`development' package to install containing liblockfile.]) 2047There may be a \`development' package to install containing liblockfile.])
2033 else AC_DEFINE(LIBMAIL, -llockfile) 2048 else AC_DEFINE(LIBMAIL, -llockfile, [Define to -llockfile if it is usable.])
2034 fi 2049 fi
2035 else : 2050 else :
2036fi 2051fi
@@ -2050,7 +2065,7 @@ AC_CHECK_HEADERS(sys/un.h)
2050 2065
2051AC_FUNC_MKTIME 2066AC_FUNC_MKTIME
2052if test "$ac_cv_func_working_mktime" = no; then 2067if test "$ac_cv_func_working_mktime" = no; then
2053 AC_DEFINE(BROKEN_MKTIME) 2068 AC_DEFINE(BROKEN_MKTIME, 1, [Define to 1 if the mktime function is broken.])
2054fi 2069fi
2055 2070
2056AC_FUNC_GETLOADAVG 2071AC_FUNC_GETLOADAVG
@@ -2078,12 +2093,15 @@ if test "$with_hesiod" = yes ; then
2078 [AC_CHECK_LIB(resolv, __res_send, resolv=yes)])])]) 2093 [AC_CHECK_LIB(resolv, __res_send, resolv=yes)])])])
2079 if test "$resolv" = yes ; then 2094 if test "$resolv" = yes ; then
2080 RESOLVLIB=-lresolv 2095 RESOLVLIB=-lresolv
2081 AC_DEFINE(HAVE_LIBRESOLV) 2096 AC_DEFINE(HAVE_LIBRESOLV, 1,
2097 [Define to 1 if you have the resolv library (-lresolv).])
2082 else 2098 else
2083 RESOLVLIB= 2099 RESOLVLIB=
2084 fi 2100 fi
2085 AC_CHECK_FUNC(hes_getmailhost, , [AC_CHECK_LIB(hesiod, hes_getmailhost, 2101 AC_CHECK_FUNC(hes_getmailhost, , [AC_CHECK_LIB(hesiod, hes_getmailhost,
2086 AC_DEFINE(HAVE_LIBHESIOD), :, $RESOLVLIB)]) 2102 AC_DEFINE(HAVE_LIBHESIOD, 1,
2103 [Define to 1 if you have the hesiod library (-lhesiod).]),
2104 :, $RESOLVLIB)])
2087fi 2105fi
2088 2106
2089# These tell us which Kerberos-related libraries to use. 2107# These tell us which Kerberos-related libraries to use.
@@ -2157,14 +2175,16 @@ else
2157fi])dnl 2175fi])dnl
2158AC_MSG_RESULT($emacs_cv_localtime_cache) 2176AC_MSG_RESULT($emacs_cv_localtime_cache)
2159if test $emacs_cv_localtime_cache = yes; then 2177if test $emacs_cv_localtime_cache = yes; then
2160 AC_DEFINE(LOCALTIME_CACHE) 2178 AC_DEFINE(LOCALTIME_CACHE, 1,
2179 [Define to 1 if localtime caches TZ.])
2161fi 2180fi
2162 2181
2163if test "x$HAVE_TIMEVAL" = xyes; then 2182if test "x$HAVE_TIMEVAL" = xyes; then
2164 AC_CHECK_FUNCS(gettimeofday) 2183 AC_CHECK_FUNCS(gettimeofday)
2165 AC_CACHE_CHECK(whether gettimeofday can accept two arguments, 2184 if test $ac_cv_func_gettimeofday = yes; then
2166 emacs_cv_gettimeofday_two_arguments, 2185 AC_CACHE_CHECK(whether gettimeofday can accept two arguments,
2167 [AC_TRY_COMPILE([ 2186 emacs_cv_gettimeofday_two_arguments,
2187 [AC_TRY_COMPILE([
2168#ifdef TIME_WITH_SYS_TIME 2188#ifdef TIME_WITH_SYS_TIME
2169#include <sys/time.h> 2189#include <sys/time.h>
2170#include <time.h> 2190#include <time.h>
@@ -2175,12 +2195,14 @@ if test "x$HAVE_TIMEVAL" = xyes; then
2175#include <time.h> 2195#include <time.h>
2176#endif 2196#endif
2177#endif], 2197#endif],
2178 [struct timeval time; 2198 [struct timeval time;
2179 gettimeofday (&time, 0);], 2199 gettimeofday (&time, 0);],
2180 emacs_cv_gettimeofday_two_arguments=yes, 2200 emacs_cv_gettimeofday_two_arguments=yes,
2181 emacs_cv_gettimeofday_two_arguments=no)]) 2201 emacs_cv_gettimeofday_two_arguments=no)])
2182 if test $emacs_cv_gettimeofday_two_arguments = no; then 2202 if test $emacs_cv_gettimeofday_two_arguments = no; then
2183 AC_DEFINE(GETTIMEOFDAY_ONE_ARGUMENT) 2203 AC_DEFINE(GETTIMEOFDAY_ONE_ARGUMENT, 1,
2204 [Define to 1 if gettimeofday accepts only one argument.])
2205 fi
2184 fi 2206 fi
2185fi 2207fi
2186 2208
@@ -2222,17 +2244,19 @@ if test $ok_so_far = yes; then
2222 AC_CHECK_HEADER(arpa/inet.h, , ok_so_far=no) 2244 AC_CHECK_HEADER(arpa/inet.h, , ok_so_far=no)
2223fi 2245fi
2224if test $ok_so_far = yes; then 2246if test $ok_so_far = yes; then
2225 AC_DEFINE(HAVE_INET_SOCKETS) 2247 AC_DEFINE(HAVE_INET_SOCKETS, 1,
2248 [Define to 1 if you have inet sockets.])
2226fi 2249fi
2227 2250
2228if test -f /usr/lpp/X11/bin/smt.exp; then 2251if test -f /usr/lpp/X11/bin/smt.exp; then
2229 AC_DEFINE(HAVE_AIX_SMT_EXP) 2252 AC_DEFINE(HAVE_AIX_SMT_EXP, 1,
2253 [Define to 1 if the file /usr/lpp/X11/bin/smt.exp exists.])
2230fi 2254fi
2231 2255
2232AC_MSG_CHECKING(whether system supports dynamic ptys) 2256AC_MSG_CHECKING(whether system supports dynamic ptys)
2233if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then 2257if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
2234 AC_MSG_RESULT(yes) 2258 AC_MSG_RESULT(yes)
2235 AC_DEFINE(HAVE_DEV_PTMX) 2259 AC_DEFINE(HAVE_DEV_PTMX, 1, [Define to 1 if dynamic ptys are supported.])
2236else 2260else
2237 AC_MSG_RESULT(no) 2261 AC_MSG_RESULT(no)
2238fi 2262fi
@@ -2290,39 +2314,288 @@ AC_SUBST(machfile)
2290AC_SUBST(opsysfile) 2314AC_SUBST(opsysfile)
2291AC_SUBST(GETLOADAVG_LIBS) 2315AC_SUBST(GETLOADAVG_LIBS)
2292 2316
2293AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "${canonical}") 2317AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "${canonical}",
2294AC_DEFINE_UNQUOTED(EMACS_CONFIG_OPTIONS, "${ac_configure_args}") 2318 [Define to the canonical Emacs configuration name.])
2295AC_DEFINE_UNQUOTED(config_machfile, "${machfile}") 2319AC_DEFINE_UNQUOTED(EMACS_CONFIG_OPTIONS, "${ac_configure_args}",
2296AC_DEFINE_UNQUOTED(config_opsysfile, "${opsysfile}") 2320 [Define to the options passed to configure.])
2297AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, ${LD_SWITCH_X_SITE}) 2321AC_DEFINE_UNQUOTED(config_machfile, "${machfile}",
2298AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE_AUX, ${LD_SWITCH_X_SITE_AUX}) 2322 [Define to the used machine dependent file.])
2299AC_DEFINE_UNQUOTED(C_SWITCH_X_SITE, ${C_SWITCH_X_SITE}) 2323AC_DEFINE_UNQUOTED(config_opsysfile, "${opsysfile}",
2300AC_DEFINE_UNQUOTED(UNEXEC_SRC, ${UNEXEC_SRC}) 2324 [Define to the used os dependent file.])
2325AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, ${LD_SWITCH_X_SITE},
2326[Define LD_SWITCH_X_SITE to contain any special flags your loader
2327 may need to deal with X Windows. For instance, if you've defined
2328 HAVE_X_WINDOWS above and your X libraries aren't in a place that
2329 your loader can find on its own, you might want to add "-L/..." or
2330 something similar.])
2331AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE_AUX, ${LD_SWITCH_X_SITE_AUX},
2332 [Define LD_SWITCH_X_SITE_AUX with an -R option
2333 in case it's needed (for Solaris, for example).])
2334AC_DEFINE_UNQUOTED(C_SWITCH_X_SITE, ${C_SWITCH_X_SITE},
2335[Define C_SWITCH_X_SITE to contain any special flags your compiler
2336 may need to deal with X Windows. For instance, if you've defined
2337 HAVE_X_WINDOWS above and your X include files aren't in a place
2338 that your compiler can find on its own, you might want to add
2339 "-I/..." or something similar.])
2340AC_DEFINE_UNQUOTED(UNEXEC_SRC, ${UNEXEC_SRC},
2341 [Define to the unexec source file name.])
2301 2342
2302if test "${HAVE_X_WINDOWS}" = "yes" ; then 2343if test "${HAVE_X_WINDOWS}" = "yes" ; then
2303 AC_DEFINE(HAVE_X_WINDOWS) 2344 AC_DEFINE(HAVE_X_WINDOWS, 1,
2345 [Define to 1 if you want to use the X window system.])
2304fi 2346fi
2305if test "${USE_X_TOOLKIT}" != "none" ; then 2347if test "${USE_X_TOOLKIT}" != "none" ; then
2306 AC_DEFINE(USE_X_TOOLKIT) 2348 AC_DEFINE(USE_X_TOOLKIT, 1, [Define to 1 if using an X toolkit.])
2307fi 2349fi
2308if test "${HAVE_X11}" = "yes" ; then 2350if test "${HAVE_X11}" = "yes" ; then
2309 AC_DEFINE(HAVE_X11) 2351 AC_DEFINE(HAVE_X11, 1,
2352 [Define to 1 if you want to use version 11 of X windows.
2353 Otherwise, Emacs expects to use version 10.])
2310fi 2354fi
2311if test "${HAVE_XFREE386}" = "yes" ; then 2355if test "${HAVE_XFREE386}" = "yes" ; then
2312 AC_DEFINE(HAVE_XFREE386) 2356 AC_DEFINE(HAVE_XFREE386, 1, [Define to 1 if you're using XFree386.])
2313fi 2357fi
2314if test "${HAVE_MENUS}" = "yes" ; then 2358if test "${HAVE_MENUS}" = "yes" ; then
2315 AC_DEFINE(HAVE_MENUS) 2359 AC_DEFINE(HAVE_MENUS, 1,
2360 [Define to 1 if you have mouse menus.
2361 (This is automatic if you use X, but the option to specify it remains.)
2362 It is also defined with other window systems that support xmenu.c.])
2316fi 2363fi
2317if test "${GNU_MALLOC}" = "yes" ; then 2364if test "${GNU_MALLOC}" = "yes" ; then
2318 AC_DEFINE(GNU_MALLOC) 2365 AC_DEFINE(GNU_MALLOC, 1,
2366 [Define to 1 if you want to use the GNU memory allocator.])
2319fi 2367fi
2320if test "${REL_ALLOC}" = "yes" ; then 2368if test "${REL_ALLOC}" = "yes" ; then
2321 AC_DEFINE(REL_ALLOC) 2369 AC_DEFINE(REL_ALLOC, 1,
2370 [Define REL_ALLOC if you want to use the relocating allocator for
2371 buffer space.])
2322fi 2372fi
2323 2373
2324AC_CHECK_HEADERS(nlist.h, [AC_DEFINE(NLIST_STRUCT, 1, 2374AC_CHECK_HEADERS(nlist.h, [AC_DEFINE(NLIST_STRUCT, 1,
2325 [Define if you have <nlist.h>.])]) 2375 [Define to 1 if you have <nlist.h>.])])
2376
2377AH_TOP([/* GNU Emacs site configuration template file. -*- C -*-
2378 Copyright (C) 1988, 1993, 1994, 1999, 2000 Free Software Foundation, Inc.
2379
2380This file is part of GNU Emacs.
2381
2382GNU Emacs is free software; you can redistribute it and/or modify
2383it under the terms of the GNU General Public License as published by
2384the Free Software Foundation; either version 2, or (at your option)
2385any later version.
2386
2387GNU Emacs is distributed in the hope that it will be useful,
2388but WITHOUT ANY WARRANTY; without even the implied warranty of
2389MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2390GNU General Public License for more details.
2391
2392You should have received a copy of the GNU General Public License
2393along with GNU Emacs; see the file COPYING. If not, write to the
2394Free Software Foundation, Inc., 59 Temple Place - Suite 330,
2395Boston, MA 02111-1307, USA. */
2396
2397
2398/* No code in Emacs #includes config.h twice, but some of the code
2399 intended to work with other packages as well (like gmalloc.c)
2400 think they can include it as many times as they like. */
2401#ifndef EMACS_CONFIG_H
2402#define EMACS_CONFIG_H
2403])dnl
2404
2405AH_BOTTOM([
2406/* If we're using any sort of window system, define some consequences. */
2407#ifdef HAVE_X_WINDOWS
2408#define HAVE_WINDOW_SYSTEM
2409#define MULTI_KBOARD
2410#define HAVE_MOUSE
2411#endif
2412
2413/* Define USER_FULL_NAME to return a string
2414 that is the user's full name.
2415 It can assume that the variable `pw'
2416 points to the password file entry for this user.
2417
2418 At some sites, the pw_gecos field contains
2419 the user's full name. If neither this nor any other
2420 field contains the right thing, use pw_name,
2421 giving the user's login name, since that is better than nothing. */
2422#define USER_FULL_NAME pw->pw_gecos
2423
2424/* Define AMPERSAND_FULL_NAME if you use the convention
2425 that & in the full name stands for the login id. */
2426/* Turned on June 1996 supposing nobody will mind it. */
2427#define AMPERSAND_FULL_NAME
2428
2429/* Define HAVE_SOUND if we have sound support. We know it works
2430 and compiles only on the specified platforms. For others,
2431 it probably doesn't make sense to try. */
2432
2433#if defined __FreeBSD__ || defined __NetBSD__ || defined __linux__
2434#ifdef HAVE_MACHINE_SOUNDCARD_H
2435#define HAVE_SOUND 1
2436#endif
2437#ifdef HAVE_SYS_SOUNDCARD_H
2438#define HAVE_SOUND 1
2439#endif
2440#ifdef HAVE_SOUNDCARD_H
2441#define HAVE_SOUND 1
2442#endif
2443#endif /* __FreeBSD__ || __NetBSD__ || __linux__ */
2444
2445/* If using GNU, then support inline function declarations. */
2446/* Don't try to switch on inline handling as detected by AC_C_INLINE
2447 generally, because even if non-gcc compilers accept `inline', they
2448 may reject `extern inline'. */
2449#ifdef __GNUC__
2450#define INLINE __inline__
2451#else
2452#define INLINE
2453#endif
2454
2455/* Include the os and machine dependent files. */
2456#include config_opsysfile
2457#include config_machfile
2458
2459/* Load in the conversion definitions if this system
2460 needs them and the source file being compiled has not
2461 said to inhibit this. There should be no need for you
2462 to alter these lines. */
2463
2464#ifdef SHORTNAMES
2465#ifndef NO_SHORTNAMES
2466#include "../shortnames/remap.h"
2467#endif /* not NO_SHORTNAMES */
2468#endif /* SHORTNAMES */
2469
2470/* If no remapping takes place, static variables cannot be dumped as
2471 pure, so don't worry about the `static' keyword. */
2472#ifdef NO_REMAP
2473#undef static
2474#endif
2475
2476/* Define `subprocesses' should be defined if you want to
2477 have code for asynchronous subprocesses
2478 (as used in M-x compile and M-x shell).
2479 These do not work for some USG systems yet;
2480 for the ones where they work, the s/SYSTEM.h file defines this flag. */
2481
2482#ifndef VMS
2483#ifndef USG
2484/* #define subprocesses */
2485#endif
2486#endif
2487
2488/* SIGTYPE is the macro we actually use. */
2489#ifndef SIGTYPE
2490#define SIGTYPE RETSIGTYPE
2491#endif
2492
2493#ifdef emacs /* Don't do this for lib-src. */
2494/* Tell regex.c to use a type compatible with Emacs. */
2495#define RE_TRANSLATE_TYPE Lisp_Object
2496#define RE_TRANSLATE(TBL, C) CHAR_TABLE_TRANSLATE (TBL, C)
2497#define RE_TRANSLATE_P(TBL) (XFASTINT (TBL) != 0)
2498#endif
2499
2500/* Avoid link-time collision with system mktime if we will use our own. */
2501#if ! HAVE_MKTIME || BROKEN_MKTIME
2502#define mktime emacs_mktime
2503#endif
2504
2505/* The rest of the code currently tests the CPP symbol BSTRING.
2506 Override any claims made by the system-description files.
2507 Note that on some SCO version it is possible to have bcopy and not bcmp. */
2508#undef BSTRING
2509#if defined (HAVE_BCOPY) && defined (HAVE_BCMP)
2510#define BSTRING
2511#endif
2512
2513/* Some of the files of Emacs which are intended for use with other
2514 programs assume that if you have a config.h file, you must declare
2515 the type of getenv.
2516
2517 This declaration shouldn't appear when alloca.s or Makefile.in
2518 includes config.h. */
2519#ifndef NOT_C_CODE
2520extern char *getenv ();
2521#endif
2522
2523#endif /* EMACS_CONFIG_H */
2524
2525/* These default definitions are good for almost all machines.
2526 The exceptions override them in m/MACHINE.h. */
2527
2528#ifndef BITS_PER_CHAR
2529#define BITS_PER_CHAR 8
2530#endif
2531
2532#ifndef BITS_PER_SHORT
2533#define BITS_PER_SHORT 16
2534#endif
2535
2536/* Note that lisp.h uses this in a preprocessor conditional, so it
2537 would not work to use sizeof. That being so, we do all of them
2538 without sizeof, for uniformity's sake. */
2539#ifndef BITS_PER_INT
2540#define BITS_PER_INT 32
2541#endif
2542
2543#ifndef BITS_PER_LONG
2544#ifdef _LP64
2545#define BITS_PER_LONG 64
2546#else
2547#define BITS_PER_LONG 32
2548#endif
2549#endif
2550
2551/* Define if the compiler supports function prototypes. It may do so
2552 but not define __STDC__ (e.g. DEC C by default) or may define it as
2553 zero. */
2554#undef PROTOTYPES
2555/* For mktime.c: */
2556#ifndef __P
2557# if defined PROTOTYPES
2558# define __P(args) args
2559# else
2560# define __P(args) ()
2561# endif /* GCC. */
2562#endif /* __P */
2563
2564
2565/* Don't include "string.h" or <stdlib.h> in non-C code. */
2566#ifndef NOT_C_CODE
2567#ifdef HAVE_STRING_H
2568#include "string.h"
2569#endif
2570#ifdef HAVE_STDLIB_H
2571#include <stdlib.h>
2572#endif
2573#endif
2574
2575/* Define HAVE_X_I18N if we have usable i18n support. */
2576
2577#ifdef HAVE_X11R6
2578#define HAVE_X_I18N
2579#elif defined HAVE_X11R5 && !defined X11R5_INHIBIT_I18N
2580#define HAVE_X_I18N
2581#endif
2582
2583/* Define HAVE_X11R6_XIM if we have usable X11R6-style XIM support. */
2584
2585#if defined HAVE_X11R6 && !defined INHIBIT_X11R6_XIM
2586#define HAVE_X11R6_XIM
2587#endif
2588
2589/* Should we enable expensive run-time checking of data types? */
2590#undef ENABLE_CHECKING
2591
2592#if defined __GNUC__ && (__GNUC__ > 2 \
2593 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5))
2594#define NO_RETURN __attribute__ ((__noreturn__))
2595#else
2596#define NO_RETURN /* nothing */
2597#endif
2598])dnl
2326 2599
2327#### Report on what we decided to do. 2600#### Report on what we decided to do.
2328echo " 2601echo "