comparison configure.in @ 40054:37e17a8f108b

Make ready for autoconf 2.5x. (AC_PREREQ): Require autoconf 2.50.
author Andreas Schwab <schwab@suse.de>
date Fri, 19 Oct 2001 12:30:52 +0000
parents b18544b16624
children 52a687c4840a
comparison
equal deleted inserted replaced
40053:9e38aa44c426 40054:37e17a8f108b
21 dnl You should have received a copy of the GNU General Public License 21 dnl You should have received a copy of the GNU General Public License
22 dnl along with GNU Emacs; see the file COPYING. If not, write to the 22 dnl along with GNU Emacs; see the file COPYING. If not, write to the
23 dnl Free Software Foundation, Inc., 59 Temple Place - Suite 330, 23 dnl Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 dnl Boston, MA 02111-1307, USA. 24 dnl Boston, MA 02111-1307, USA.
25 25
26 AC_PREREQ(2.8)dnl 26 AC_PREREQ(2.50)dnl
27 AC_INIT(src/lisp.h) 27 AC_INIT(src/lisp.h)
28 AC_CONFIG_HEADER(src/config.h:src/config.in) 28 AC_CONFIG_HEADER(src/config.h:src/config.in)
29 29
30 lispdir='${datadir}/emacs/${version}/lisp' 30 lispdir='${datadir}/emacs/${version}/lisp'
31 locallisppath='${datadir}/emacs/${version}/site-lisp:'\ 31 locallisppath='${datadir}/emacs/${version}/site-lisp:'\
1104 SPECIFIED_CFLAGS="$CFLAGS" 1104 SPECIFIED_CFLAGS="$CFLAGS"
1105 1105
1106 case ${with_gcc} in 1106 case ${with_gcc} in
1107 "yes" ) CC="gcc" GCC=yes ;; 1107 "yes" ) CC="gcc" GCC=yes ;;
1108 "no" ) : ${CC=cc} ;; 1108 "no" ) : ${CC=cc} ;;
1109 * ) AC_PROG_CC 1109 * )
1110 esac 1110 esac
1111 AC_PROG_CC
1111 1112
1112 # On Suns, sometimes $CPP names a directory. 1113 # On Suns, sometimes $CPP names a directory.
1113 if test -n "$CPP" && test -d "$CPP"; then 1114 if test -n "$CPP" && test -d "$CPP"; then
1114 CPP= 1115 CPP=
1115 fi 1116 fi
1353 AC_TYPE_SIGNAL 1354 AC_TYPE_SIGNAL
1354 1355
1355 dnl Check for speed_t typedef. 1356 dnl Check for speed_t typedef.
1356 AC_CACHE_CHECK(for speed_t, emacs_cv_speed_t, 1357 AC_CACHE_CHECK(for speed_t, emacs_cv_speed_t,
1357 AC_TRY_COMPILE([#include <termios.h>], [speed_t x = 1;], 1358 AC_TRY_COMPILE([#include <termios.h>], [speed_t x = 1;],
1358 emacs_cv_speed_t=yes)) 1359 emacs_cv_speed_t=yes, emacs_cv_speed_t=no))
1359 if test $emacs_cv_speed_t = yes; then 1360 if test $emacs_cv_speed_t = yes; then
1360 AC_DEFINE(HAVE_SPEED_T) 1361 AC_DEFINE(HAVE_SPEED_T)
1361 fi 1362 fi
1362 1363
1363 AC_CACHE_CHECK(for struct timeval, emacs_cv_struct_timeval, 1364 AC_CACHE_CHECK(for struct timeval, emacs_cv_struct_timeval,
1526 doug_lea_malloc=yes 1527 doug_lea_malloc=yes
1527 AC_CHECK_FUNC(malloc_get_state, ,doug_lea_malloc=no) 1528 AC_CHECK_FUNC(malloc_get_state, ,doug_lea_malloc=no)
1528 AC_CHECK_FUNC(malloc_set_state, ,doug_lea_malloc=no) 1529 AC_CHECK_FUNC(malloc_set_state, ,doug_lea_malloc=no)
1529 AC_CACHE_CHECK(whether __after_morecore_hook exists, 1530 AC_CACHE_CHECK(whether __after_morecore_hook exists,
1530 emacs_cv_var___after_morecore_hook, 1531 emacs_cv_var___after_morecore_hook,
1531 AC_TRY_LINK([extern void (* __after_morecore_hook)();],[__after_morecore_hook = 0], 1532 [AC_TRY_LINK([extern void (* __after_morecore_hook)();],[__after_morecore_hook = 0],
1532 emacs_cv_var___after_morecore_hook=yes, 1533 emacs_cv_var___after_morecore_hook=yes,
1533 emacs_cv_var___after_morecore_hook=no)) 1534 emacs_cv_var___after_morecore_hook=no)])
1534 if test $emacs_cv_var___after_morecore_hook = no; then 1535 if test $emacs_cv_var___after_morecore_hook = no; then
1535 doug_lea_malloc=no 1536 doug_lea_malloc=no
1536 fi 1537 fi
1537 if test "${system_malloc}" = "yes"; then 1538 if test "${system_malloc}" = "yes"; then
1538 GNU_MALLOC=no 1539 GNU_MALLOC=no
1656 fi 1657 fi
1657 1658
1658 if test "${window_system}" = "x11"; then 1659 if test "${window_system}" = "x11"; then
1659 AC_MSG_CHECKING(X11 version 6) 1660 AC_MSG_CHECKING(X11 version 6)
1660 AC_CACHE_VAL(emacs_cv_x11_version_6, 1661 AC_CACHE_VAL(emacs_cv_x11_version_6,
1661 AC_TRY_LINK([#include <X11/Xlib.h>], 1662 [AC_TRY_LINK([#include <X11/Xlib.h>],
1662 [#if XlibSpecificationRelease < 6 1663 [#if XlibSpecificationRelease < 6
1663 fail; 1664 fail;
1664 #endif 1665 #endif
1665 ], emacs_cv_x11_version_6=yes, emacs_cv_x11_version_6=no)) 1666 ], emacs_cv_x11_version_6=yes, emacs_cv_x11_version_6=no)])
1666 if test $emacs_cv_x11_version_6 = yes; then 1667 if test $emacs_cv_x11_version_6 = yes; then
1667 AC_MSG_RESULT(6 or newer) 1668 AC_MSG_RESULT(6 or newer)
1668 AC_DEFINE(HAVE_X11R6) 1669 AC_DEFINE(HAVE_X11R6)
1669 else 1670 else
1670 AC_MSG_RESULT(before 6) 1671 AC_MSG_RESULT(before 6)
1672 fi 1673 fi
1673 1674
1674 if test "${window_system}" = "x11"; then 1675 if test "${window_system}" = "x11"; then
1675 AC_MSG_CHECKING(X11 version 5) 1676 AC_MSG_CHECKING(X11 version 5)
1676 AC_CACHE_VAL(emacs_cv_x11_version_5, 1677 AC_CACHE_VAL(emacs_cv_x11_version_5,
1677 AC_TRY_LINK([#include <X11/Xlib.h>], 1678 [AC_TRY_LINK([#include <X11/Xlib.h>],
1678 [#if XlibSpecificationRelease < 5 1679 [#if XlibSpecificationRelease < 5
1679 fail; 1680 fail;
1680 #endif 1681 #endif
1681 ], emacs_cv_x11_version_5=yes, emacs_cv_x11_version_5=no)) 1682 ], emacs_cv_x11_version_5=yes, emacs_cv_x11_version_5=no)])
1682 if test $emacs_cv_x11_version_5 = yes; then 1683 if test $emacs_cv_x11_version_5 = yes; then
1683 AC_MSG_RESULT(5 or newer) 1684 AC_MSG_RESULT(5 or newer)
1684 HAVE_X11R5=yes 1685 HAVE_X11R5=yes
1685 AC_DEFINE(HAVE_X11R5) 1686 AC_DEFINE(HAVE_X11R5)
1686 else 1687 else
1693 dnl Older compilers (eg sunos4 cc) choke on it. 1694 dnl Older compilers (eg sunos4 cc) choke on it.
1694 if test x"${USE_X_TOOLKIT}" = xmaybe; then 1695 if test x"${USE_X_TOOLKIT}" = xmaybe; then
1695 if test x"${HAVE_X11R5}" = xyes; then 1696 if test x"${HAVE_X11R5}" = xyes; then
1696 AC_MSG_CHECKING(X11 version 5 with Xaw) 1697 AC_MSG_CHECKING(X11 version 5 with Xaw)
1697 AC_CACHE_VAL(emacs_cv_x11_version_5_with_xaw, 1698 AC_CACHE_VAL(emacs_cv_x11_version_5_with_xaw,
1698 AC_TRY_LINK([ 1699 [AC_TRY_LINK([
1699 #include <X11/Intrinsic.h> 1700 #include <X11/Intrinsic.h>
1700 #include <X11/Xaw/Simple.h>], 1701 #include <X11/Xaw/Simple.h>],
1701 [], 1702 [],
1702 emacs_cv_x11_version_5_with_xaw=yes, 1703 emacs_cv_x11_version_5_with_xaw=yes,
1703 emacs_cv_x11_version_5_with_xaw=no)) 1704 emacs_cv_x11_version_5_with_xaw=no)])
1704 if test $emacs_cv_x11_version_5_with_xaw = yes; then 1705 if test $emacs_cv_x11_version_5_with_xaw = yes; then
1705 AC_MSG_RESULT([5 or newer, with Xaw; use toolkit by default]) 1706 AC_MSG_RESULT([5 or newer, with Xaw; use toolkit by default])
1706 USE_X_TOOLKIT=LUCID 1707 USE_X_TOOLKIT=LUCID
1707 else 1708 else
1708 AC_MSG_RESULT(before 5 or no Xaw; do not use toolkit by default) 1709 AC_MSG_RESULT(before 5 or no Xaw; do not use toolkit by default)
1716 X_TOOLKIT_TYPE=$USE_X_TOOLKIT 1717 X_TOOLKIT_TYPE=$USE_X_TOOLKIT
1717 1718
1718 if test "${USE_X_TOOLKIT}" != "none"; then 1719 if test "${USE_X_TOOLKIT}" != "none"; then
1719 AC_MSG_CHECKING(X11 toolkit version) 1720 AC_MSG_CHECKING(X11 toolkit version)
1720 AC_CACHE_VAL(emacs_cv_x11_toolkit_version_6, 1721 AC_CACHE_VAL(emacs_cv_x11_toolkit_version_6,
1721 AC_TRY_LINK([#include <X11/Intrinsic.h>], 1722 [AC_TRY_LINK([#include <X11/Intrinsic.h>],
1722 [#if XtSpecificationRelease < 6 1723 [#if XtSpecificationRelease < 6
1723 fail; 1724 fail;
1724 #endif 1725 #endif
1725 ], emacs_cv_x11_toolkit_version_6=yes, emacs_cv_x11_toolkit_version_6=no)) 1726 ], emacs_cv_x11_toolkit_version_6=yes, emacs_cv_x11_toolkit_version_6=no)])
1726 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6 1727 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
1727 if test $emacs_cv_x11_toolkit_version_6 = yes; then 1728 if test $emacs_cv_x11_toolkit_version_6 = yes; then
1728 AC_MSG_RESULT(6 or newer) 1729 AC_MSG_RESULT(6 or newer)
1729 AC_DEFINE(HAVE_X11XTR6) 1730 AC_DEFINE(HAVE_X11XTR6)
1730 else 1731 else
1750 fi 1751 fi
1751 fi 1752 fi
1752 1753
1753 if test "${USE_X_TOOLKIT}" = "MOTIF"; then 1754 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
1754 AC_CACHE_CHECK(for Motif version 2.1, emacs_cv_motif_version_2_1, 1755 AC_CACHE_CHECK(for Motif version 2.1, emacs_cv_motif_version_2_1,
1755 AC_TRY_COMPILE([#include <Xm/Xm.h>], 1756 [AC_TRY_COMPILE([#include <Xm/Xm.h>],
1756 [#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1) 1757 [#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
1757 int x = 5; 1758 int x = 5;
1758 #else 1759 #else
1759 Motif version prior to 2.1. 1760 Motif version prior to 2.1.
1760 #endif], 1761 #endif],
1761 emacs_cv_motif_version_2_1=yes, emacs_cv_motif_version_2_1=no)) 1762 emacs_cv_motif_version_2_1=yes, emacs_cv_motif_version_2_1=no)])
1762 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1 1763 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
1763 if test $emacs_cv_motif_version_2_1 = yes; then 1764 if test $emacs_cv_motif_version_2_1 = yes; then
1764 HAVE_LIBXP=no 1765 HAVE_LIBXP=no
1765 AC_DEFINE(HAVE_MOTIF_2_1) 1766 AC_DEFINE(HAVE_MOTIF_2_1)
1766 AC_CHECK_LIB(Xp, XpCreateContext, HAVE_LIBXP=yes) 1767 AC_CHECK_LIB(Xp, XpCreateContext, HAVE_LIBXP=yes)
1893 fi 1894 fi
1894 1895
1895 # If netdb.h doesn't declare h_errno, we must declare it by hand. 1896 # If netdb.h doesn't declare h_errno, we must declare it by hand.
1896 AC_CACHE_CHECK(whether netdb declares h_errno, 1897 AC_CACHE_CHECK(whether netdb declares h_errno,
1897 emacs_cv_netdb_declares_h_errno, 1898 emacs_cv_netdb_declares_h_errno,
1898 AC_TRY_LINK([#include <netdb.h>], 1899 [AC_TRY_LINK([#include <netdb.h>],
1899 [return h_errno;], 1900 [return h_errno;],
1900 emacs_cv_netdb_declares_h_errno=yes, emacs_cv_netdb_declares_h_errno=no)) 1901 emacs_cv_netdb_declares_h_errno=yes, emacs_cv_netdb_declares_h_errno=no)])
1901 if test $emacs_cv_netdb_declares_h_errno = yes; then 1902 if test $emacs_cv_netdb_declares_h_errno = yes; then
1902 AC_DEFINE(HAVE_H_ERRNO) 1903 AC_DEFINE(HAVE_H_ERRNO)
1903 fi 1904 fi
1904 1905
1905 AC_FUNC_ALLOCA 1906 AC_FUNC_ALLOCA
2037 2038
2038 if test "x$HAVE_TIMEVAL" = xyes; then 2039 if test "x$HAVE_TIMEVAL" = xyes; then
2039 AC_CHECK_FUNCS(gettimeofday) 2040 AC_CHECK_FUNCS(gettimeofday)
2040 AC_CACHE_CHECK(whether gettimeofday can accept two arguments, 2041 AC_CACHE_CHECK(whether gettimeofday can accept two arguments,
2041 emacs_cv_gettimeofday_two_arguments, 2042 emacs_cv_gettimeofday_two_arguments,
2042 AC_TRY_COMPILE([ 2043 [AC_TRY_COMPILE([
2043 #ifdef TIME_WITH_SYS_TIME 2044 #ifdef TIME_WITH_SYS_TIME
2044 #include <sys/time.h> 2045 #include <sys/time.h>
2045 #include <time.h> 2046 #include <time.h>
2046 #else 2047 #else
2047 #ifdef HAVE_SYS_TIME_H 2048 #ifdef HAVE_SYS_TIME_H
2051 #endif 2052 #endif
2052 #endif], 2053 #endif],
2053 [struct timeval time; 2054 [struct timeval time;
2054 gettimeofday (&time, 0);], 2055 gettimeofday (&time, 0);],
2055 emacs_cv_gettimeofday_two_arguments=yes, 2056 emacs_cv_gettimeofday_two_arguments=yes,
2056 emacs_cv_gettimeofday_two_arguments=no)) 2057 emacs_cv_gettimeofday_two_arguments=no)])
2057 if test $emacs_cv_gettimeofday_two_arguments = no; then 2058 if test $emacs_cv_gettimeofday_two_arguments = no; then
2058 AC_DEFINE(GETTIMEOFDAY_ONE_ARGUMENT) 2059 AC_DEFINE(GETTIMEOFDAY_ONE_ARGUMENT)
2059 fi 2060 fi
2060 fi 2061 fi
2061 2062
2288 sed -e '/start of cpp stuff/q' \ 2289 sed -e '/start of cpp stuff/q' \
2289 < Makefile.c > junk1.c 2290 < Makefile.c > junk1.c
2290 sed -e '1,/start of cpp stuff/d'\ 2291 sed -e '1,/start of cpp stuff/d'\
2291 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \ 2292 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
2292 < Makefile.c > junk.c 2293 < Makefile.c > junk.c
2293 $CPP $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c | \ 2294 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
2294 sed -e 's/^ / /' -e '/^#/d' -e '/^[ ]*$/d' > junk2.c 2295 sed -e 's/^ / /' -e '/^#/d' -e '/^[ ]*$/d' > junk2.c
2295 cat junk1.c junk2.c > Makefile.new 2296 cat junk1.c junk2.c > Makefile.new
2296 rm -f junk.c junk1.c junk2.c 2297 rm -f junk.c junk1.c junk2.c
2297 chmod 444 Makefile.new 2298 chmod 444 Makefile.new
2298 mv -f Makefile.new Makefile 2299 mv -f Makefile.new Makefile
2304 sed -e '/start of cpp stuff/q' \ 2305 sed -e '/start of cpp stuff/q' \
2305 < Makefile.c > junk1.c 2306 < Makefile.c > junk1.c
2306 sed -e '1,/start of cpp stuff/d'\ 2307 sed -e '1,/start of cpp stuff/d'\
2307 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \ 2308 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
2308 < Makefile.c > junk.c 2309 < Makefile.c > junk.c
2309 $CPP $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c | \ 2310 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
2310 sed -e 's/^ / /' -e '/^#/d' -e '/^[ ]*$/d' > junk2.c 2311 sed -e 's/^ / /' -e '/^#/d' -e '/^[ ]*$/d' > junk2.c
2311 cat junk1.c junk2.c > Makefile.new 2312 cat junk1.c junk2.c > Makefile.new
2312 rm -f junk.c junk1.c junk2.c 2313 rm -f junk.c junk1.c junk2.c
2313 chmod 444 Makefile.new 2314 chmod 444 Makefile.new
2314 mv -f Makefile.new Makefile 2315 mv -f Makefile.new Makefile
2315 ) 2316 )
2316 2317
2317 if test ! -f src/.gdbinit && test -f $top_srcdir/src/.gdbinit; then 2318 if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
2318 echo creating src/.gdbinit 2319 echo creating src/.gdbinit
2319 echo source $top_srcdir/src/.gdbinit > src/.gdbinit 2320 echo source $srcdir/src/.gdbinit > src/.gdbinit
2320 fi 2321 fi
2321 2322
2322 # This is how we know whether to re-run configure in certain cases. 2323 # This is how we know whether to re-run configure in certain cases.
2323 touch src/config.stamp 2324 touch src/config.stamp
2324 2325