3 |
dnl autoconf |
dnl autoconf |
4 |
dnl in the directory containing this script. |
dnl in the directory containing this script. |
5 |
dnl |
dnl |
6 |
dnl Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 |
dnl Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2003 |
7 |
dnl Free Software Foundation, Inc. |
dnl Free Software Foundation, Inc. |
8 |
dnl |
dnl |
9 |
dnl This file is part of GNU Emacs. |
dnl This file is part of GNU Emacs. |
23 |
dnl Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
dnl Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
24 |
dnl Boston, MA 02111-1307, USA. |
dnl Boston, MA 02111-1307, USA. |
25 |
|
|
26 |
AC_PREREQ(2.51)dnl |
AC_PREREQ(2.54)dnl |
27 |
AC_INIT(src/lisp.h) |
AC_INIT(src/lisp.h) |
28 |
AC_CONFIG_HEADER(src/config.h:src/config.in) |
AC_CONFIG_HEADER(src/config.h:src/config.in) |
29 |
|
|
38 |
etcdir='${datadir}/emacs/${version}/etc' |
etcdir='${datadir}/emacs/${version}/etc' |
39 |
archlibdir='${libexecdir}/emacs/${version}/${configuration}' |
archlibdir='${libexecdir}/emacs/${version}/${configuration}' |
40 |
docdir='${datadir}/emacs/${version}/etc' |
docdir='${datadir}/emacs/${version}/etc' |
41 |
gamedir=yes |
gamedir='${localstatedir}/games/emacs' |
|
|
|
|
AC_ARG_WITH(game-dir, |
|
|
[ --with-game-dir use a shared game directory if possible], |
|
|
[ |
|
|
gamedir="$withval" |
|
|
]) |
|
|
if test "$gamedir" = yes; then |
|
|
gamedir="${localstatedir}/games/emacs" |
|
|
fi |
|
|
eval tgamedir=\"$gamedir\" |
|
|
if test "$gamedir" != no; then |
|
|
AC_DEFINE_UNQUOTED(HAVE_SHARED_GAME_DIR, "$tgamedir", |
|
|
[Define to the name of the shared game directory.]) |
|
|
fi |
|
42 |
|
|
43 |
gameuser=games |
gameuser=games |
|
AC_ARG_WITH(game-user, |
|
|
[ --with-game-user use specified user for game directory], |
|
|
[gameuser="$withval"]) |
|
44 |
|
|
45 |
AC_ARG_WITH(gcc, |
AC_ARG_WITH(gcc, |
46 |
[ --without-gcc don't use GCC to compile Emacs if GCC is found]) |
[ --without-gcc don't use GCC to compile Emacs if GCC is found]) |
77 |
dnl added later on when we find the path of X, and it's best to |
dnl added later on when we find the path of X, and it's best to |
78 |
dnl keep them together visually. |
dnl keep them together visually. |
79 |
AC_ARG_WITH(x-toolkit, |
AC_ARG_WITH(x-toolkit, |
80 |
[ --with-x-toolkit=KIT use an X toolkit (KIT = yes/lucid/athena/motif/no)], |
[ --with-x-toolkit=KIT use an X toolkit |
81 |
|
(KIT = yes/lucid/athena/motif/gtk/no)], |
82 |
[ case "${withval}" in |
[ case "${withval}" in |
83 |
y | ye | yes ) val=athena ;; |
y | ye | yes ) val=athena ;; |
84 |
n | no ) val=no ;; |
n | no ) val=no ;; |
85 |
l | lu | luc | luci | lucid ) val=lucid ;; |
l | lu | luc | luci | lucid ) val=lucid ;; |
86 |
a | at | ath | athe | athen | athena ) val=athena ;; |
a | at | ath | athe | athen | athena ) val=athena ;; |
87 |
m | mo | mot | moti | motif ) val=motif ;; |
m | mo | mot | moti | motif ) val=motif ;; |
88 |
|
g | gt | gtk ) val=gtk ;; |
89 |
dnl These don't currently work. |
dnl These don't currently work. |
90 |
dnl o | op | ope | open | open- | open-l | open-lo \ |
dnl o | op | ope | open | open- | open-l | open-lo \ |
91 |
dnl | open-loo | open-look ) val=open-look ;; |
dnl | open-loo | open-look ) val=open-look ;; |
92 |
* ) |
* ) |
93 |
dnl AC_MSG_ERROR([the \`--with-x-toolkit' option is supposed to have a value |
dnl AC_MSG_ERROR([the `--with-x-toolkit' option is supposed to have a value |
94 |
dnl which is \`yes', \`no', \`lucid', \`athena', \`motif' or \`open-look'.]) |
dnl which is `yes', `no', `lucid', `athena', `motif' or `open-look'.]) |
95 |
AC_MSG_ERROR([\`--with-x-toolkit=$withval' is invalid\; |
AC_MSG_ERROR([`--with-x-toolkit=$withval' is invalid\; |
96 |
this option's value should be \`yes', \`no', \`lucid', \`athena', or \`motif'. |
this option's value should be `yes', `no', `lucid', `athena', `motif' or `gtk'. |
97 |
Currently, \`yes', \`athena' and \`lucid' are synonyms.]) |
Currently, `yes', `athena' and `lucid' are synonyms.]) |
98 |
;; |
;; |
99 |
esac |
esac |
100 |
with_x_toolkit=$val |
with_x_toolkit=$val |
109 |
[ --with-gif use -lungif for displaying GIF images]) |
[ --with-gif use -lungif for displaying GIF images]) |
110 |
AC_ARG_WITH(png, |
AC_ARG_WITH(png, |
111 |
[ --with-png use -lpng for displaying PNG images]) |
[ --with-png use -lpng for displaying PNG images]) |
112 |
|
AC_ARG_WITH(gtk, |
113 |
|
[ --with-gtk use GTK (same as --with-x-toolkit=gtk)]) |
114 |
|
AC_ARG_WITH(pkg-config-prog, |
115 |
|
[ --with-pkg-config-prog Path to pkg-config to use for finding GTK]) |
116 |
AC_ARG_WITH(toolkit-scroll-bars, |
AC_ARG_WITH(toolkit-scroll-bars, |
117 |
[ --without-toolkit-scroll-bars |
[ --without-toolkit-scroll-bars |
118 |
don't use Motif or Xaw3d scroll bars]) |
don't use Motif or Xaw3d scroll bars]) |
120 |
[ --without-xim don't use X11 XIM]) |
[ --without-xim don't use X11 XIM]) |
121 |
AC_ARG_WITH(carbon, |
AC_ARG_WITH(carbon, |
122 |
[ --without-carbon don't use Carbon GUI on Mac OS X]) |
[ --without-carbon don't use Carbon GUI on Mac OS X]) |
123 |
|
AC_ARG_ENABLE(carbon-app, |
124 |
|
[[ --enable-carbon-app[=DIR] [DIR=/Application] |
125 |
|
specify install directory for Emacs.app on Mac OS X]], |
126 |
|
[ carbon_appdir_x=${enableval}]) |
127 |
|
|
128 |
#### Make srcdir absolute, if it isn't already. It's important to |
#### Make srcdir absolute, if it isn't already. It's important to |
129 |
#### avoid running the path through pwd unnecessarily, since pwd can |
#### avoid running the path through pwd unnecessarily, since pwd can |
152 |
#### Check if the source directory already has a configured system in it. |
#### Check if the source directory already has a configured system in it. |
153 |
if test `pwd` != `(cd ${srcdir} && pwd)` \ |
if test `pwd` != `(cd ${srcdir} && pwd)` \ |
154 |
&& test -f "${srcdir}/src/config.h" ; then |
&& test -f "${srcdir}/src/config.h" ; then |
155 |
AC_MSG_WARN([The directory tree \`${srcdir}' is being used |
AC_MSG_WARN([[The directory tree `${srcdir}' is being used |
156 |
as a build directory right now; it has been configured in its own |
as a build directory right now; it has been configured in its own |
157 |
right. To configure in another directory as well, you MUST |
right. To configure in another directory as well, you MUST |
158 |
use GNU make. If you do not have GNU make, then you must |
use GNU make. If you do not have GNU make, then you must |
159 |
now do \`make distclean' in ${srcdir}, |
now do `make distclean' in ${srcdir}, |
160 |
and then run $0 again.]) |
and then run $0 again.]]) |
161 |
|
|
162 |
changequote(, )dnl |
[extrasub='/^VPATH[ ]*=/c\ |
|
extrasub='/^VPATH[ ]*=/c\ |
|
|
changequote([, ])dnl |
|
163 |
vpath %.c $(srcdir)\ |
vpath %.c $(srcdir)\ |
164 |
vpath %.h $(srcdir)\ |
vpath %.h $(srcdir)\ |
165 |
vpath %.y $(srcdir)\ |
vpath %.y $(srcdir)\ |
166 |
vpath %.l $(srcdir)\ |
vpath %.l $(srcdir)\ |
167 |
vpath %.s $(srcdir)\ |
vpath %.s $(srcdir)\ |
168 |
vpath %.in $(srcdir)\ |
vpath %.in $(srcdir)\ |
169 |
vpath %.texi $(srcdir)' |
vpath %.texi $(srcdir)'] |
170 |
fi |
fi |
171 |
|
|
172 |
#### Given the configuration name, set machfile and opsysfile to the |
#### Given the configuration name, set machfile and opsysfile to the |
178 |
canonical=$host |
canonical=$host |
179 |
configuration=${host_alias-$host} |
configuration=${host_alias-$host} |
180 |
|
|
181 |
changequote(, )dnl |
dnl This used to use changequote, but, apart from `changequote is evil' |
182 |
|
dnl per the autoconf manual, we can speed up autoconf somewhat by quoting |
183 |
|
dnl the great gob of text. Thus it's not processed for possible expansion. |
184 |
|
dnl Just make sure the brackets remain balanced. |
185 |
|
[ |
186 |
|
|
187 |
### If you add support for a new configuration, add code to this |
### If you add support for a new configuration, add code to this |
188 |
### switch statement to recognize your configuration name and select |
### switch statement to recognize your configuration name and select |
231 |
powerpc-apple-netbsd*) machine=macppc ;; |
powerpc-apple-netbsd*) machine=macppc ;; |
232 |
mips-*-netbsd*) machine=pmax ;; |
mips-*-netbsd*) machine=pmax ;; |
233 |
mipsel-*-netbsd*) machine=pmax ;; |
mipsel-*-netbsd*) machine=pmax ;; |
234 |
|
mipseb-*-netbsd*) machine=pmax ;; |
235 |
ns32k-*-netbsd*) machine=ns32000 ;; |
ns32k-*-netbsd*) machine=ns32000 ;; |
236 |
powerpc-*-netbsd*) machine=macppc ;; |
powerpc-*-netbsd*) machine=macppc ;; |
237 |
sparc*-*-netbsd*) machine=sparc ;; |
sparc*-*-netbsd*) machine=sparc ;; |
570 |
hppa*-hp-hpux9* ) |
hppa*-hp-hpux9* ) |
571 |
machine=hp800 opsys=hpux9 |
machine=hp800 opsys=hpux9 |
572 |
;; |
;; |
573 |
|
hppa*-hp-hpux10.2* ) |
574 |
|
machine=hp800 opsys=hpux10-20 |
575 |
|
;; |
576 |
hppa*-hp-hpux10* ) |
hppa*-hp-hpux10* ) |
577 |
machine=hp800 opsys=hpux10 |
machine=hp800 opsys=hpux10 |
578 |
;; |
;; |
811 |
machine=plexus opsys=usg5-2 |
machine=plexus opsys=usg5-2 |
812 |
;; |
;; |
813 |
|
|
|
## PowerPC reference platform |
|
|
powerpcle-*-solaris2* ) |
|
|
machine=prep |
|
|
opsys=sol2-5 |
|
|
;; |
|
|
|
|
814 |
## Pyramid machines |
## Pyramid machines |
815 |
## I don't really have any idea what sort of processor the Pyramid has, |
## I don't really have any idea what sort of processor the Pyramid has, |
816 |
## so I'm assuming it is its own architecture. |
## so I'm assuming it is its own architecture. |
950 |
NON_GNU_CPP=/usr/ccs/lib/cpp |
NON_GNU_CPP=/usr/ccs/lib/cpp |
951 |
RANLIB="ar -ts" |
RANLIB="ar -ts" |
952 |
;; |
;; |
953 |
|
*-sunos5.6* | *-solaris2.6* ) |
954 |
|
opsys=sol2-6 |
955 |
|
NON_GNU_CPP=/usr/ccs/lib/cpp |
956 |
|
RANLIB="ar -ts" |
957 |
|
;; |
958 |
*-sunos5* | *-solaris* ) |
*-sunos5* | *-solaris* ) |
959 |
opsys=sol2-5 |
opsys=sol2-6 |
960 |
NON_GNU_CPP=/usr/ccs/lib/cpp |
NON_GNU_CPP=/usr/ccs/lib/cpp |
961 |
;; |
;; |
962 |
* ) opsys=bsd4-2 ;; |
* ) opsys=bsd4-2 ;; |
1056 |
i[3456]86-*-* ) |
i[3456]86-*-* ) |
1057 |
machine=intel386 |
machine=intel386 |
1058 |
case "${canonical}" in |
case "${canonical}" in |
1059 |
|
*-cygwin ) opsys=cygwin ;; |
1060 |
*-lynxos* ) opsys=lynxos ;; |
*-lynxos* ) opsys=lynxos ;; |
1061 |
*-isc1.* | *-isc2.[01]* ) opsys=386-ix ;; |
*-isc1.* | *-isc2.[01]* ) opsys=386-ix ;; |
1062 |
*-isc2.2* ) opsys=isc2-2 ;; |
*-isc2.2* ) opsys=isc2-2 ;; |
1071 |
*-xenix* ) opsys=xenix ;; |
*-xenix* ) opsys=xenix ;; |
1072 |
*-linux-gnu* ) opsys=gnu-linux ;; |
*-linux-gnu* ) opsys=gnu-linux ;; |
1073 |
*-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;; |
*-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;; |
1074 |
*-sco3.2v5* ) opsys=sco5 |
*-sco3.2v5* ) opsys=sco5 |
1075 |
NON_GNU_CPP=/lib/cpp |
NON_GNU_CPP=/lib/cpp |
1076 |
# Prevent -belf from being passed to $CPP. |
# Prevent -belf from being passed to $CPP. |
1077 |
# /lib/cpp does not accept it. |
# /lib/cpp does not accept it. |
1090 |
;; |
;; |
1091 |
|
|
1092 |
## Mips Linux-based GNU system |
## Mips Linux-based GNU system |
1093 |
mips-*-linux-gnu* ) |
mips-*-linux-gnu* | mipsel-*-linux-gnu* ) |
1094 |
machine=mips opsys=gnu-linux |
machine=mips opsys=gnu-linux |
1095 |
;; |
;; |
1096 |
|
|
1115 |
|
|
1116 |
## AMD x86-64 Linux-based GNU system |
## AMD x86-64 Linux-based GNU system |
1117 |
x86_64-*-linux-gnu* ) |
x86_64-*-linux-gnu* ) |
1118 |
machine=amdx86-64 opsys=gnu-linux |
machine=amdx86-64 opsys=gnu-linux |
1119 |
;; |
;; |
1120 |
|
|
1121 |
* ) |
* ) |
1159 |
esac |
esac |
1160 |
fi |
fi |
1161 |
|
|
1162 |
changequote([, ])dnl |
] |
1163 |
|
|
1164 |
if test $unported = yes; then |
if test $unported = yes; then |
1165 |
AC_MSG_ERROR([Emacs hasn't been ported to \`${canonical}' systems. |
AC_MSG_ERROR([Emacs hasn't been ported to `${canonical}' systems. |
1166 |
Check \`etc/MACHINES' for recognized configuration names.]) |
Check `etc/MACHINES' for recognized configuration names.]) |
1167 |
fi |
fi |
1168 |
|
|
1169 |
machfile="m/${machine}.h" |
machfile="m/${machine}.h" |
1215 |
CC="$CC $NON_GCC_TEST_OPTIONS" |
CC="$CC $NON_GCC_TEST_OPTIONS" |
1216 |
fi |
fi |
1217 |
|
|
1218 |
|
#### Some other nice autoconf tests. |
1219 |
|
|
1220 |
|
dnl checks for programs |
1221 |
|
AC_PROG_LN_S |
1222 |
|
AC_PROG_CPP |
1223 |
|
AC_PROG_INSTALL |
1224 |
|
if test "x$RANLIB" = x; then |
1225 |
|
AC_PROG_RANLIB |
1226 |
|
fi |
1227 |
|
AC_PATH_PROG(INSTALL_INFO, install-info) |
1228 |
|
AC_PATH_PROG(INSTALL_INFO, install-info,, /usr/sbin) |
1229 |
|
AC_PATH_PROG(INSTALL_INFO, install-info,:, /sbin) |
1230 |
|
|
1231 |
|
dnl Add our options to ac_link now, after it is set up. |
1232 |
|
|
1233 |
if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x |
if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x |
1234 |
then |
then |
1235 |
ac_link="$ac_link $GCC_LINK_TEST_OPTIONS" |
ac_link="$ac_link $GCC_LINK_TEST_OPTIONS" |
1240 |
ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS" |
ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS" |
1241 |
fi |
fi |
1242 |
|
|
|
#### Some other nice autoconf tests. If you add a test here which |
|
|
#### should make an entry in src/config.h, don't forget to add an |
|
|
#### #undef clause to src/config.h.in for autoconf to modify. |
|
|
|
|
|
dnl checks for programs |
|
|
AC_PROG_LN_S |
|
|
AC_PROG_CPP |
|
|
AC_PROG_INSTALL |
|
|
AC_PROG_YACC |
|
|
if test "x$RANLIB" = x; then |
|
|
AC_PROG_RANLIB |
|
|
fi |
|
|
|
|
1243 |
dnl checks for Unix variants |
dnl checks for Unix variants |
1244 |
AC_AIX |
AC_AIX |
1245 |
|
|
1336 |
|
|
1337 |
#ifndef LD_SWITCH_X_SITE_AUX |
#ifndef LD_SWITCH_X_SITE_AUX |
1338 |
#define LD_SWITCH_X_SITE_AUX |
#define LD_SWITCH_X_SITE_AUX |
1339 |
#endif |
#endif |
1340 |
|
|
1341 |
configure___ ld_switch_system=LD_SWITCH_SYSTEM |
configure___ ld_switch_system=LD_SWITCH_SYSTEM |
1342 |
configure___ ld_switch_machine=LD_SWITCH_MACHINE |
configure___ ld_switch_machine=LD_SWITCH_MACHINE |
1365 |
# The value of CPP is a quoted variable reference, so we need to do this |
# The value of CPP is a quoted variable reference, so we need to do this |
1366 |
# to get its actual value... |
# to get its actual value... |
1367 |
CPP=`eval "echo $CPP"` |
CPP=`eval "echo $CPP"` |
1368 |
changequote(, )dnl |
[eval `${CPP} -Isrc ${tempcname} \ |
|
eval `${CPP} -Isrc ${tempcname} \ |
|
1369 |
| sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'` |
| sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'` |
1370 |
if test "x$SPECIFIED_CFLAGS" = x; then |
if test "x$SPECIFIED_CFLAGS" = x; then |
1371 |
eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \ |
eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \ |
1372 |
| sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'` |
| sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'` |
1373 |
else |
else |
1374 |
REAL_CFLAGS="$CFLAGS" |
REAL_CFLAGS="$CFLAGS" |
1375 |
fi |
fi] |
|
changequote([, ])dnl |
|
1376 |
rm ${tempcname} |
rm ${tempcname} |
1377 |
|
|
1378 |
ac_link="$ac_link $ld_switch_machine $ld_switch_system" |
ac_link="$ac_link $ld_switch_machine $ld_switch_system" |
1385 |
CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS" |
CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS" |
1386 |
fi |
fi |
1387 |
|
|
1388 |
|
dnl For AC_FUNC_GETLOADAVG, at least: |
1389 |
|
AC_CONFIG_LIBOBJ_DIR(src) |
1390 |
|
|
1391 |
|
AC_GNU_SOURCE |
1392 |
|
|
1393 |
dnl Do this early because it can frob feature test macros for Unix-98 &c. |
dnl Do this early because it can frob feature test macros for Unix-98 &c. |
1394 |
AC_SYS_LARGEFILE |
AC_SYS_LARGEFILE |
1395 |
|
|
1404 |
dnl checks for header files |
dnl checks for header files |
1405 |
AC_CHECK_HEADERS(sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \ |
AC_CHECK_HEADERS(sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \ |
1406 |
linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \ |
linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \ |
1407 |
termcap.h stdio_ext.h fcntl.h term.h strings.h coff.h) |
termcap.h stdio_ext.h fcntl.h term.h strings.h coff.h pty.h sys/mman.h \ |
1408 |
|
sys/param.h sys/vlimit.h sys/resource.h) |
1409 |
|
dnl On Solaris 8 there's a compilation warning for term.h because |
1410 |
|
dnl it doesn't define `bool'. |
1411 |
|
AC_CHECK_HEADERS(term.h, , , -) |
1412 |
AC_HEADER_STDC |
AC_HEADER_STDC |
1413 |
AC_HEADER_TIME |
AC_HEADER_TIME |
1414 |
AC_DECL_SYS_SIGLIST |
AC_CHECK_DECLS([sys_siglist]) |
1415 |
|
if test $ac_cv_have_decl_sys_siglist != yes; then |
1416 |
|
# For Tru64, at least: |
1417 |
|
AC_CHECK_DECLS([__sys_siglist]) |
1418 |
|
if test $ac_cv_have_decl___sys_siglist = yes; then |
1419 |
|
AC_DEFINE(sys_siglist, __sys_siglist, |
1420 |
|
[Define to any substitute for sys_siglist.]) |
1421 |
|
fi |
1422 |
|
fi |
1423 |
AC_HEADER_SYS_WAIT |
AC_HEADER_SYS_WAIT |
1424 |
|
|
1425 |
dnl Some systems have utime.h but don't declare the struct anyplace. |
dnl Some systems have utime.h but don't declare the struct anyplace. |
1450 |
[AC_TRY_COMPILE([#include <termios.h>], [speed_t x = 1;], |
[AC_TRY_COMPILE([#include <termios.h>], [speed_t x = 1;], |
1451 |
emacs_cv_speed_t=yes, emacs_cv_speed_t=no)]) |
emacs_cv_speed_t=yes, emacs_cv_speed_t=no)]) |
1452 |
if test $emacs_cv_speed_t = yes; then |
if test $emacs_cv_speed_t = yes; then |
1453 |
AC_DEFINE(HAVE_SPEED_T, 1, |
AC_DEFINE(HAVE_SPEED_T, 1, |
1454 |
[Define to 1 if `speed_t' is declared by <termios.h>.]) |
[Define to 1 if `speed_t' is declared by <termios.h>.]) |
1455 |
fi |
fi |
1456 |
|
|
1472 |
fi |
fi |
1473 |
|
|
1474 |
AC_CACHE_CHECK(for struct exception, emacs_cv_struct_exception, |
AC_CACHE_CHECK(for struct exception, emacs_cv_struct_exception, |
1475 |
AC_TRY_COMPILE([#include <math.h>], |
AC_TRY_COMPILE([#include <math.h>], |
1476 |
[static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;], |
[static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;], |
1477 |
emacs_cv_struct_exception=yes, emacs_cv_struct_exception=no)) |
emacs_cv_struct_exception=yes, emacs_cv_struct_exception=no)) |
1478 |
HAVE_EXCEPTION=$emacs_cv_struct_exception |
HAVE_EXCEPTION=$emacs_cv_struct_exception |
1501 |
dnl the compiler groks `extern inline'. |
dnl the compiler groks `extern inline'. |
1502 |
dnl AC_C_INLINE |
dnl AC_C_INLINE |
1503 |
AC_CACHE_CHECK([for void * support], emacs_cv_void_star, |
AC_CACHE_CHECK([for void * support], emacs_cv_void_star, |
1504 |
[AC_TRY_COMPILE(, [void * foo;], |
[AC_TRY_COMPILE(, [void * foo;], |
1505 |
emacs_cv_void_star=yes, emacs_cv_void_star=no)]) |
emacs_cv_void_star=yes, emacs_cv_void_star=no)]) |
1506 |
if test $emacs_cv_void_star = yes; then |
if test $emacs_cv_void_star = yes; then |
1507 |
AC_DEFINE(POINTER_TYPE, void) |
AC_DEFINE(POINTER_TYPE, void) |
1512 |
[Define as `void' if your compiler accepts `void *'; otherwise |
[Define as `void' if your compiler accepts `void *'; otherwise |
1513 |
define as `char'.])dnl |
define as `char'.])dnl |
1514 |
|
|
1515 |
|
dnl This could be used for targets which can have both byte sexes. |
1516 |
|
dnl We could presumably replace the hardwired WORDS_BIG_ENDIAN generally. |
1517 |
|
dnl AC_C_BIGENDIAN |
1518 |
|
|
1519 |
dnl check for Make feature |
dnl check for Make feature |
1520 |
AC_PROG_MAKE_SET |
AC_PROG_MAKE_SET |
1521 |
|
|
1580 |
athena | lucid ) USE_X_TOOLKIT=LUCID ;; |
athena | lucid ) USE_X_TOOLKIT=LUCID ;; |
1581 |
motif ) USE_X_TOOLKIT=MOTIF ;; |
motif ) USE_X_TOOLKIT=MOTIF ;; |
1582 |
dnl open-look ) USE_X_TOOLKIT=OPEN_LOOK ;; |
dnl open-look ) USE_X_TOOLKIT=OPEN_LOOK ;; |
1583 |
|
gtk ) with_gtk=yes |
1584 |
|
dnl Dont set this for GTK. A lot of tests below assumes Xt when |
1585 |
|
dnl USE_X_TOOLKIT is set. |
1586 |
|
USE_X_TOOLKIT=none ;; |
1587 |
no ) USE_X_TOOLKIT=none ;; |
no ) USE_X_TOOLKIT=none ;; |
1588 |
dnl If user did not say whether to use a toolkit, |
dnl If user did not say whether to use a toolkit, |
1589 |
dnl make this decision later: use the toolkit if we have X11R5 or newer. |
dnl make this decision later: use the toolkit if we have X11R5 or newer. |
1602 |
case ${HAVE_X11} in |
case ${HAVE_X11} in |
1603 |
yes ) HAVE_MENUS=yes ;; |
yes ) HAVE_MENUS=yes ;; |
1604 |
esac |
esac |
1605 |
|
|
1606 |
if test "${opsys}" = "hpux9"; then |
if test "${opsys}" = "hpux9"; then |
1607 |
case "${x_libraries}" in |
case "${x_libraries}" in |
1608 |
*X11R4* ) |
*X11R4* ) |
1685 |
HAVE_XFREE386=no |
HAVE_XFREE386=no |
1686 |
fi |
fi |
1687 |
AC_MSG_RESULT($HAVE_XFREE386) |
AC_MSG_RESULT($HAVE_XFREE386) |
1688 |
|
|
1689 |
|
dnl Check for need for bigtoc support on IBM AIX |
1690 |
|
|
1691 |
|
case ${host_os} in |
1692 |
|
aix*) |
1693 |
|
AC_CACHE_CHECK([for -bbigtoc option], [gdb_cv_bigtoc], [ |
1694 |
|
case $GCC in |
1695 |
|
yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; |
1696 |
|
*) gdb_cv_bigtoc=-bbigtoc ;; |
1697 |
|
esac |
1698 |
|
|
1699 |
# Change CFLAGS temporarily so that C_SWITCH_X_SITE gets used |
LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc |
1700 |
# for the tests that follow. We set it back to REAL_CFLAGS later on. |
AC_TRY_LINK([], [int i;], [], [gdb_cv_bigtoc=]) |
1701 |
|
]) |
1702 |
|
;; |
1703 |
|
esac |
1704 |
|
|
1705 |
|
# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets |
1706 |
|
# used for the tests that follow. We set them back to REAL_CFLAGS and |
1707 |
|
# REAL_CPPFLAGS later on. |
1708 |
|
|
1709 |
REAL_CPPFLAGS="$CPPFLAGS" |
REAL_CPPFLAGS="$CPPFLAGS" |
1710 |
|
|
1811 |
fi |
fi |
1812 |
fi |
fi |
1813 |
|
|
1814 |
|
dnl This function defintion taken from Gnome 2.0 |
1815 |
|
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) |
1816 |
|
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page |
1817 |
|
dnl also defines GSTUFF_PKG_ERRORS on error |
1818 |
|
AC_DEFUN(PKG_CHECK_MODULES, [ |
1819 |
|
succeeded=no |
1820 |
|
|
1821 |
|
if test -z "$PKG_CONFIG"; then |
1822 |
|
AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
1823 |
|
fi |
1824 |
|
|
1825 |
|
if test "$PKG_CONFIG" = "no" ; then |
1826 |
|
echo "*** The pkg-config script could not be found. Make sure it is" |
1827 |
|
echo "*** in your path, or give the full path to pkg-config with" |
1828 |
|
echo "*** the PKG_CONFIG environment variable or --with-pkg-config-prog." |
1829 |
|
echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." |
1830 |
|
else |
1831 |
|
PKG_CONFIG_MIN_VERSION=0.9.0 |
1832 |
|
if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
1833 |
|
AC_MSG_CHECKING(for $2) |
1834 |
|
|
1835 |
|
if $PKG_CONFIG --exists "$2" ; then |
1836 |
|
AC_MSG_RESULT(yes) |
1837 |
|
succeeded=yes |
1838 |
|
|
1839 |
|
AC_MSG_CHECKING($1_CFLAGS) |
1840 |
|
$1_CFLAGS=`$PKG_CONFIG --cflags "$2"` |
1841 |
|
AC_MSG_RESULT($$1_CFLAGS) |
1842 |
|
|
1843 |
|
AC_MSG_CHECKING($1_LIBS) |
1844 |
|
$1_LIBS=`$PKG_CONFIG --libs "$2"` |
1845 |
|
AC_MSG_RESULT($$1_LIBS) |
1846 |
|
else |
1847 |
|
$1_CFLAGS="" |
1848 |
|
$1_LIBS="" |
1849 |
|
## If we have a custom action on failure, don't print errors, but |
1850 |
|
## do set a variable so people can do so. |
1851 |
|
$1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` |
1852 |
|
ifelse([$4], ,echo $$1_PKG_ERRORS,) |
1853 |
|
fi |
1854 |
|
|
1855 |
|
AC_SUBST($1_CFLAGS) |
1856 |
|
AC_SUBST($1_LIBS) |
1857 |
|
else |
1858 |
|
echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." |
1859 |
|
echo "*** See http://www.freedesktop.org/software/pkgconfig" |
1860 |
|
fi |
1861 |
|
fi |
1862 |
|
|
1863 |
|
if test $succeeded = yes; then |
1864 |
|
ifelse([$3], , :, [$3]) |
1865 |
|
else |
1866 |
|
ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) |
1867 |
|
fi |
1868 |
|
]) |
1869 |
|
|
1870 |
|
HAVE_GTK=no |
1871 |
|
if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk"; then |
1872 |
|
if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then |
1873 |
|
AC_MSG_ERROR([Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}]); |
1874 |
|
fi |
1875 |
|
GLIB_REQUIRED=2.0.1 |
1876 |
|
GTK_REQUIRED=2.0.1 |
1877 |
|
GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" |
1878 |
|
|
1879 |
|
dnl Check if --with-pkg-config-prog has been given. |
1880 |
|
if test "X${with_pkg_config_prog}" != X; then |
1881 |
|
PKG_CONFIG="${with_pkg_config_prog}" |
1882 |
|
fi |
1883 |
|
dnl Checks for libraries. |
1884 |
|
PKG_CHECK_MODULES(GTK, $GTK_MODULES) |
1885 |
|
AC_SUBST(GTK_CFLAGS) |
1886 |
|
AC_SUBST(GTK_LIBS) |
1887 |
|
C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS" |
1888 |
|
HAVE_GTK=yes |
1889 |
|
AC_DEFINE(HAVE_GTK, 1, [Define to 1 if using GTK.]) |
1890 |
|
USE_X_TOOLKIT=none |
1891 |
|
|
1892 |
|
dnl GTK scrollbars resembles toolkit scrollbars alot, so to avoid |
1893 |
|
dnl a lot if #ifdef:s, say we have toolkit scrollbars. |
1894 |
|
with_toolkit_scroll_bars=yes |
1895 |
|
fi |
1896 |
|
|
1897 |
dnl Do not put whitespace before the #include statements below. |
dnl Do not put whitespace before the #include statements below. |
1898 |
dnl Older compilers (eg sunos4 cc) choke on it. |
dnl Older compilers (eg sunos4 cc) choke on it. |
1899 |
if test x"${USE_X_TOOLKIT}" = xmaybe; then |
if test x"${USE_X_TOOLKIT}" = xmaybe; then |
1957 |
fi |
fi |
1958 |
|
|
1959 |
if test "${USE_X_TOOLKIT}" = "MOTIF"; then |
if test "${USE_X_TOOLKIT}" = "MOTIF"; then |
1960 |
|
AC_CACHE_CHECK(for LessTif where some systems put it, emacs_cv_lesstif, |
1961 |
|
# We put this in CFLAGS temporarily to precede other -I options |
1962 |
|
# that might be in CFLAGS temporarily. |
1963 |
|
# We put this in CPPFLAGS where it precedes the other -I options. |
1964 |
|
OLD_CPPFLAGS=$CPPFLAGS |
1965 |
|
OLD_CFLAGS=$CFLAGS |
1966 |
|
CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS" |
1967 |
|
CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS" |
1968 |
|
[AC_TRY_COMPILE([#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>], |
1969 |
|
[int x = 5;], |
1970 |
|
emacs_cv_lesstif=yes, emacs_cv_lesstif=no)]) |
1971 |
|
if test $emacs_cv_lesstif = yes; then |
1972 |
|
# Make sure this -I option remains in CPPFLAGS after it is set |
1973 |
|
# back to REAL_CPPFLAGS. |
1974 |
|
# There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not |
1975 |
|
# have those other -I options anyway. Ultimately, having this |
1976 |
|
# directory ultimately in CPPFLAGS will be enough. |
1977 |
|
REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS" |
1978 |
|
LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS" |
1979 |
|
else |
1980 |
|
CFLAGS=$OLD_CFLAGS |
1981 |
|
CPPFLAGS=$OLD_CPPFLAGS |
1982 |
|
fi |
1983 |
AC_CACHE_CHECK(for Motif version 2.1, emacs_cv_motif_version_2_1, |
AC_CACHE_CHECK(for Motif version 2.1, emacs_cv_motif_version_2_1, |
1984 |
[AC_TRY_COMPILE([#include <Xm/Xm.h>], |
[AC_TRY_COMPILE([#include <Xm/Xm.h>], |
1985 |
[#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1) |
[#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1) |
1997 |
if test ${HAVE_LIBXP} = yes; then |
if test ${HAVE_LIBXP} = yes; then |
1998 |
AC_DEFINE(HAVE_LIBXP, 1, |
AC_DEFINE(HAVE_LIBXP, 1, |
1999 |
[Define to 1 if you have the Xp library (-lXp).]) |
[Define to 1 if you have the Xp library (-lXp).]) |
2000 |
fi |
fi |
2001 |
fi |
fi |
2002 |
fi |
fi |
2003 |
|
|
2005 |
HAVE_XAW3D=no |
HAVE_XAW3D=no |
2006 |
if test "${HAVE_X11}" = "yes"; then |
if test "${HAVE_X11}" = "yes"; then |
2007 |
if test "${USE_X_TOOLKIT}" != "none"; then |
if test "${USE_X_TOOLKIT}" != "none"; then |
2008 |
|
dnl Fixme: determine what Scrollbar.h needs to avoid compilation |
2009 |
|
dnl errors from the test without the `-'. |
2010 |
AC_CHECK_HEADER(X11/Xaw3d/Scrollbar.h, |
AC_CHECK_HEADER(X11/Xaw3d/Scrollbar.h, |
2011 |
AC_CHECK_LIB(Xaw3d, XawScrollbarSetThumb, HAVE_XAW3D=yes)) |
[AC_CHECK_LIB(Xaw3d, XawScrollbarSetThumb, HAVE_XAW3D=yes)], , -) |
2012 |
if test "${HAVE_XAW3D}" = "yes"; then |
if test "${HAVE_XAW3D}" = "yes"; then |
2013 |
AC_DEFINE(HAVE_XAW3D, 1, |
AC_DEFINE(HAVE_XAW3D, 1, |
2014 |
[Define to 1 if you have the Xaw3d library (-lXaw3d).]) |
[Define to 1 if you have the Xaw3d library (-lXaw3d).]) |
2015 |
fi |
fi |
2016 |
fi |
fi |
2017 |
fi |
fi |
2018 |
|
|
2019 |
dnl Use toolkit scroll bars if configured for X toolkit and either |
dnl Use toolkit scroll bars if configured for GTK or X toolkit and either |
2020 |
dnl using Motif or Xaw3d is available, and unless |
dnl using Motif or Xaw3d is available, and unless |
2021 |
dnl --with-toolkit-scroll-bars=no was specified. |
dnl --with-toolkit-scroll-bars=no was specified. |
2022 |
|
|
2033 |
AC_DEFINE(USE_TOOLKIT_SCROLL_BARS) |
AC_DEFINE(USE_TOOLKIT_SCROLL_BARS) |
2034 |
USE_TOOLKIT_SCROLL_BARS=yes |
USE_TOOLKIT_SCROLL_BARS=yes |
2035 |
fi |
fi |
2036 |
|
elif test "${HAVE_GTK}" = "yes"; then |
2037 |
|
AC_DEFINE(USE_TOOLKIT_SCROLL_BARS) |
2038 |
|
USE_TOOLKIT_SCROLL_BARS=yes |
2039 |
fi |
fi |
2040 |
fi |
fi |
2041 |
|
|
2074 |
AC_DEFINE(HAVE_XPM, 1, [Define to 1 if you have the Xpm libary (-lXpm).]) |
AC_DEFINE(HAVE_XPM, 1, [Define to 1 if you have the Xpm libary (-lXpm).]) |
2075 |
fi |
fi |
2076 |
fi |
fi |
2077 |
|
|
2078 |
### Use -ljpeg if available, unless `--with-jpeg=no'. |
### Use -ljpeg if available, unless `--with-jpeg=no'. |
2079 |
HAVE_JPEG=no |
HAVE_JPEG=no |
2080 |
if test "${HAVE_X11}" = "yes"; then |
if test "${HAVE_X11}" = "yes"; then |
2081 |
if test "${with_jpeg}" != "no"; then |
if test "${with_jpeg}" != "no"; then |
2082 |
dnl Checking for jpeglib.h can lose becsue of a redefinition of |
dnl Checking for jpeglib.h can lose because of a redefinition of |
2083 |
dnl HAVE_STDLIB_H. |
dnl HAVE_STDLIB_H. |
2084 |
AC_CHECK_HEADER(jerror.h, |
AC_CHECK_HEADER(jerror.h, |
2085 |
AC_CHECK_LIB(jpeg, jpeg_destroy_compress, HAVE_JPEG=yes)) |
AC_CHECK_LIB(jpeg, jpeg_destroy_compress, HAVE_JPEG=yes)) |
2088 |
AH_TEMPLATE(HAVE_JPEG, [Define to 1 if you have the jpeg library (-ljpeg).])dnl |
AH_TEMPLATE(HAVE_JPEG, [Define to 1 if you have the jpeg library (-ljpeg).])dnl |
2089 |
if test "${HAVE_JPEG}" = "yes"; then |
if test "${HAVE_JPEG}" = "yes"; then |
2090 |
AC_DEFINE(HAVE_JPEG) |
AC_DEFINE(HAVE_JPEG) |
2091 |
AC_EGREP_CPP( |
AC_EGREP_CPP([version= *(6[2-9]|[7-9][0-9])], |
|
changequote({, })dnl avoid leadingspace on the next line |
|
|
{version= *(6[2-9]|[7-9][0-9])}, |
|
|
changequote([, ])dnl |
|
2092 |
[#include <jpeglib.h> |
[#include <jpeglib.h> |
2093 |
version=JPEG_LIB_VERSION |
version=JPEG_LIB_VERSION |
2094 |
], |
], |
2095 |
AC_DEFINE(HAVE_JPEG), |
AC_DEFINE(HAVE_JPEG), |
2096 |
[AC_MSG_WARN([libjpeg found, but not version 6b or later]) |
[AC_MSG_WARN([libjpeg found, but not version 6b or later]) |
2097 |
HAVE_JPEG=no]) |
HAVE_JPEG=no]) |
2098 |
fi |
fi |
2099 |
fi |
fi |
2100 |
|
|
2101 |
### Use -lpng if available, unless `--with-png=no'. |
### Use -lpng if available, unless `--with-png=no'. |
2102 |
HAVE_PNG=no |
HAVE_PNG=no |
2103 |
if test "${HAVE_X11}" = "yes"; then |
if test "${HAVE_X11}" = "yes"; then |
2110 |
AC_DEFINE(HAVE_PNG, 1, [Define to 1 if you have the png library (-lpng).]) |
AC_DEFINE(HAVE_PNG, 1, [Define to 1 if you have the png library (-lpng).]) |
2111 |
fi |
fi |
2112 |
fi |
fi |
2113 |
|
|
2114 |
### Use -ltiff if available, unless `--with-tiff=no'. |
### Use -ltiff if available, unless `--with-tiff=no'. |
2115 |
HAVE_TIFF=no |
HAVE_TIFF=no |
2116 |
if test "${HAVE_X11}" = "yes"; then |
if test "${HAVE_X11}" = "yes"; then |
2126 |
AC_DEFINE(HAVE_TIFF, 1, [Define to 1 if you have the tiff library (-ltiff).]) |
AC_DEFINE(HAVE_TIFF, 1, [Define to 1 if you have the tiff library (-ltiff).]) |
2127 |
fi |
fi |
2128 |
fi |
fi |
2129 |
|
|
2130 |
### Use -lgif if available, unless `--with-gif=no'. |
### Use -lgif if available, unless `--with-gif=no'. |
2131 |
HAVE_GIF=no |
HAVE_GIF=no |
2132 |
if test "${HAVE_X11}" = "yes"; then |
if test "${HAVE_X11}" = "yes"; then |
2150 |
|
|
2151 |
if test "${HAVE_CARBON}" = "yes"; then |
if test "${HAVE_CARBON}" = "yes"; then |
2152 |
AC_DEFINE(HAVE_CARBON, 1, [Define to 1 if you are using the Carbon API on Mac OS X.]) |
AC_DEFINE(HAVE_CARBON, 1, [Define to 1 if you are using the Carbon API on Mac OS X.]) |
2153 |
|
window_system=mac |
2154 |
|
## Specify the install directory |
2155 |
|
carbon_appdir= |
2156 |
|
if test "${carbon_appdir_x}" != ""; then |
2157 |
|
case ${carbon_appdir_x} in |
2158 |
|
y | ye | yes) carbon_appdir=/Applications ;; |
2159 |
|
* ) carbon_appdir=${carbon_appdir_x} ;; |
2160 |
|
esac |
2161 |
|
fi |
2162 |
|
# We also have mouse menus. |
2163 |
|
HAVE_MENUS=yes |
2164 |
fi |
fi |
2165 |
|
|
2166 |
### Use session management (-lSM -lICE) if available |
### Use session management (-lSM -lICE) if available |
2177 |
esac |
esac |
2178 |
fi |
fi |
2179 |
fi |
fi |
2180 |
|
|
2181 |
# If netdb.h doesn't declare h_errno, we must declare it by hand. |
# If netdb.h doesn't declare h_errno, we must declare it by hand. |
2182 |
AC_CACHE_CHECK(whether netdb declares h_errno, |
AC_CACHE_CHECK(whether netdb declares h_errno, |
2183 |
emacs_cv_netdb_declares_h_errno, |
emacs_cv_netdb_declares_h_errno, |
2210 |
if test $ac_cv_prog_liblockfile = yes; then |
if test $ac_cv_prog_liblockfile = yes; then |
2211 |
AC_MSG_ERROR([Shared liblockfile found but can't link against it. |
AC_MSG_ERROR([Shared liblockfile found but can't link against it. |
2212 |
This probably means that movemail could lose mail. |
This probably means that movemail could lose mail. |
2213 |
There may be a \`development' package to install containing liblockfile.]) |
There may be a `development' package to install containing liblockfile.]) |
2214 |
else AC_DEFINE(LIBMAIL, -llockfile, [Define to -llockfile if it is usable.]) |
else AC_DEFINE(LIBMAIL, -llockfile, [Define to -llockfile if it is usable.]) |
2215 |
fi |
fi |
2216 |
else : |
else : |
2225 |
utimes setrlimit setpgid getcwd getwd shutdown strftime getaddrinfo \ |
utimes setrlimit setpgid getcwd getwd shutdown strftime getaddrinfo \ |
2226 |
__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \ |
__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \ |
2227 |
sendto recvfrom getsockopt setsockopt getsockname getpeername \ |
sendto recvfrom getsockopt setsockopt getsockname getpeername \ |
2228 |
gai_strerror mkstemp getline getdelim) |
gai_strerror mkstemp getline getdelim mremap memmove fsync bzero \ |
2229 |
|
memset memcmp memmove) |
2230 |
|
|
2231 |
AC_CHECK_HEADERS(sys/un.h) |
AC_CHECK_HEADERS(sys/un.h) |
2232 |
|
|
2239 |
|
|
2240 |
AC_FUNC_FSEEKO |
AC_FUNC_FSEEKO |
2241 |
|
|
2242 |
|
AC_FUNC_GETPGRP |
2243 |
|
|
2244 |
# UNIX98 PTYs. |
# UNIX98 PTYs. |
2245 |
AC_CHECK_FUNCS(grantpt) |
AC_CHECK_FUNCS(grantpt) |
2246 |
|
|
2413 |
AC_CHECK_HEADER(arpa/inet.h, , ok_so_far=no) |
AC_CHECK_HEADER(arpa/inet.h, , ok_so_far=no) |
2414 |
fi |
fi |
2415 |
if test $ok_so_far = yes; then |
if test $ok_so_far = yes; then |
2416 |
|
dnl Fixme: Not used. Should this be HAVE_SOCKETS? |
2417 |
AC_DEFINE(HAVE_INET_SOCKETS, 1, |
AC_DEFINE(HAVE_INET_SOCKETS, 1, |
2418 |
[Define to 1 if you have inet sockets.]) |
[Define to 1 if you have inet sockets.]) |
2419 |
fi |
fi |
2433 |
|
|
2434 |
AC_FUNC_FORK |
AC_FUNC_FORK |
2435 |
|
|
2436 |
# Fixme: This should be replaced when we have autoconf 2.14. |
dnl Adapted from Haible's version. |
2437 |
AC_SIZE_T |
AC_CACHE_CHECK([for nl_langinfo and CODESET], emacs_cv_langinfo_codeset, |
2438 |
|
[AC_TRY_LINK([#include <langinfo.h>], |
2439 |
|
[char* cs = nl_langinfo(CODESET);], |
2440 |
|
emacs_cv_langinfo_codeset=yes, |
2441 |
|
emacs_cv_langinfo_codeset=no) |
2442 |
|
]) |
2443 |
|
if test $emacs_cv_langinfo_codeset = yes; then |
2444 |
|
AC_DEFINE(HAVE_LANGINFO_CODESET, 1, |
2445 |
|
[Define if you have <langinfo.h> and nl_langinfo(CODESET).]) |
2446 |
|
fi |
2447 |
|
|
2448 |
|
AC_CHECK_TYPES(size_t) |
2449 |
|
|
2450 |
|
dnl Restrict could probably be used effectively other than in regex.c. |
2451 |
|
AC_CACHE_CHECK([for C restrict keyword], emacs_cv_c_restrict, |
2452 |
|
[AC_TRY_COMPILE([void fred (int *restrict x);], [], |
2453 |
|
emacs_cv_c_restrict=yes, |
2454 |
|
[AC_TRY_COMPILE([void fred (int *__restrict x);], [], |
2455 |
|
emacs_cv_c_restrict=__restrict, |
2456 |
|
emacs_cv_c_restrict=no)])]) |
2457 |
|
case "$emacs_cv_c_restrict" in |
2458 |
|
yes) emacs_restrict=restrict;; |
2459 |
|
no) emacs_restrict="";; |
2460 |
|
*) emacs_restrict="$emacs_cv_c_restrict";; |
2461 |
|
esac |
2462 |
|
if test "$emacs_restrict" != __restrict; then |
2463 |
|
AC_DEFINE_UNQUOTED(__restrict, $emacs_restrict, |
2464 |
|
[Define to compiler's equivalent of C99 restrict keyword. |
2465 |
|
Don't define if equivalent is `__restrict'.]) |
2466 |
|
fi |
2467 |
|
|
2468 |
|
AC_CACHE_CHECK([for C restricted array declarations], emacs_cv_c_restrict_arr, |
2469 |
|
[AC_TRY_COMPILE([void fred (int x[__restrict]);], [], |
2470 |
|
emacs_cv_c_restrict_arr=yes, emacs_cv_c_restrict_arr=no)]) |
2471 |
|
if test "$emacs_cv_c_restrict_arr" = yes; then |
2472 |
|
AC_DEFINE(__restrict_arr, __restrict, |
2473 |
|
[Define to compiler's equivalent of C99 restrict keyword in array |
2474 |
|
declarations. Define as empty for no equivalent.]) |
2475 |
|
fi |
2476 |
|
|
2477 |
|
AC_CHECK_HEADERS(nlist.h, [AC_DEFINE(NLIST_STRUCT, 1, |
2478 |
|
[Define to 1 if you have <nlist.h>.])]) |
2479 |
|
|
2480 |
|
dnl Fixme: AC_SYS_POSIX_TERMIOS should probably be used, but it's not clear |
2481 |
|
dnl how the tty code is related to POSIX and/or other versions of termios. |
2482 |
|
|
2483 |
|
dnl Fixme: Use AC_FUNC_MEMCMP since memcmp is used. (Needs libobj replacement.) |
2484 |
|
|
2485 |
# Set up the CFLAGS for real compilation, so we can substitute it. |
# Set up the CFLAGS for real compilation, so we can substitute it. |
2486 |
CFLAGS="$REAL_CFLAGS" |
CFLAGS="$REAL_CFLAGS" |
2487 |
CPPFLAGS="$REAL_CPPFLAGS" |
CPPFLAGS="$REAL_CPPFLAGS" |
2488 |
|
|
|
changequote(, )dnl |
|
2489 |
#### Find out which version of Emacs this is. |
#### Find out which version of Emacs this is. |
2490 |
version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \ |
[version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \ |
2491 |
| sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'` |
| sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`] |
|
changequote([, ])dnl |
|
2492 |
if test x"${version}" = x; then |
if test x"${version}" = x; then |
2493 |
AC_MSG_ERROR(can't find current emacs version in \`${srcdir}/lisp/version.el'.) |
AC_MSG_ERROR([can't find current emacs version in `${srcdir}/lisp/version.el'.]) |
2494 |
fi |
fi |
2495 |
|
|
2496 |
### Specify what sort of things we'll be editing into Makefile and config.h. |
### Specify what sort of things we'll be editing into Makefile and config.h. |
2527 |
AC_SUBST(machfile) |
AC_SUBST(machfile) |
2528 |
AC_SUBST(opsysfile) |
AC_SUBST(opsysfile) |
2529 |
AC_SUBST(GETLOADAVG_LIBS) |
AC_SUBST(GETLOADAVG_LIBS) |
2530 |
|
AC_SUBST(carbon_appdir) |
2531 |
|
|
2532 |
AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "${canonical}", |
AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "${canonical}", |
2533 |
[Define to the canonical Emacs configuration name.]) |
[Define to the canonical Emacs configuration name.]) |
2586 |
buffer space.]) |
buffer space.]) |
2587 |
fi |
fi |
2588 |
|
|
2589 |
AC_CHECK_HEADERS(nlist.h, [AC_DEFINE(NLIST_STRUCT, 1, |
AH_TOP([/* GNU Emacs site configuration template file. |
2590 |
[Define to 1 if you have <nlist.h>.])]) |
Copyright (C) 1988, 93, 94, 99, 2000, 2002 Free Software Foundation, Inc. |
|
|
|
|
AH_TOP([/* GNU Emacs site configuration template file. -*- C -*- |
|
|
Copyright (C) 1988, 1993, 1994, 1999, 2000 Free Software Foundation, Inc. |
|
2591 |
|
|
2592 |
This file is part of GNU Emacs. |
This file is part of GNU Emacs. |
2593 |
|
|
2607 |
Boston, MA 02111-1307, USA. */ |
Boston, MA 02111-1307, USA. */ |
2608 |
|
|
2609 |
|
|
2610 |
/* No code in Emacs #includes config.h twice, but some of the code |
/* No code in Emacs #includes config.h twice, but some bits of code |
2611 |
intended to work with other packages as well (like gmalloc.c) |
intended to work with other packages as well (like gmalloc.c) |
2612 |
think they can include it as many times as they like. */ |
think they can include it as many times as they like. */ |
2613 |
#ifndef EMACS_CONFIG_H |
#ifndef EMACS_CONFIG_H |
2614 |
#define EMACS_CONFIG_H |
#define EMACS_CONFIG_H |
2627 |
#ifdef HAVE_CARBON |
#ifdef HAVE_CARBON |
2628 |
#define HAVE_WINDOW_SYSTEM |
#define HAVE_WINDOW_SYSTEM |
2629 |
#define HAVE_MOUSE |
#define HAVE_MOUSE |
|
#define HAVE_MENUS |
|
2630 |
#endif |
#endif |
2631 |
|
|
2632 |
/* Define USER_FULL_NAME to return a string |
/* Define USER_FULL_NAME to return a string |
2739 |
extern char *getenv (); |
extern char *getenv (); |
2740 |
#endif |
#endif |
2741 |
|
|
|
#endif /* EMACS_CONFIG_H */ |
|
|
|
|
2742 |
/* These default definitions are good for almost all machines. |
/* These default definitions are good for almost all machines. |
2743 |
The exceptions override them in m/MACHINE.h. */ |
The exceptions override them in m/MACHINE.h. */ |
2744 |
|
|
2778 |
# endif /* GCC. */ |
# endif /* GCC. */ |
2779 |
#endif /* __P */ |
#endif /* __P */ |
2780 |
|
|
|
|
|
2781 |
/* Don't include "string.h" or <stdlib.h> in non-C code. */ |
/* Don't include "string.h" or <stdlib.h> in non-C code. */ |
2782 |
#ifndef NOT_C_CODE |
#ifndef NOT_C_CODE |
2783 |
#ifdef HAVE_STRING_H |
#ifdef HAVE_STRING_H |
2784 |
#include "string.h" |
#include "string.h" |
2785 |
#endif |
#endif |
2786 |
|
#ifdef HAVE_STRINGS_H |
2787 |
|
#include "strings.h" /* May be needed for bcopy & al. */ |
2788 |
|
#endif |
2789 |
#ifdef HAVE_STDLIB_H |
#ifdef HAVE_STDLIB_H |
2790 |
#include <stdlib.h> |
#include <stdlib.h> |
2791 |
#endif |
#endif |
2792 |
|
#ifndef __GNUC__ |
2793 |
|
# ifdef HAVE_ALLOCA_H |
2794 |
|
# include <alloca.h> |
2795 |
|
# else /* AIX files deal with #pragma. */ |
2796 |
|
# ifndef alloca /* predefined by HP cc +Olibcalls */ |
2797 |
|
char *alloca (); |
2798 |
|
# endif |
2799 |
|
# endif /* HAVE_ALLOCA_H */ |
2800 |
|
#endif /* __GNUC__ */ |
2801 |
|
#ifndef HAVE_SIZE_T |
2802 |
|
typedef unsigned size_t; |
2803 |
#endif |
#endif |
2804 |
|
#endif /* NOT_C_CODE */ |
2805 |
|
|
2806 |
/* Define HAVE_X_I18N if we have usable i18n support. */ |
/* Define HAVE_X_I18N if we have usable i18n support. */ |
2807 |
|
|
2826 |
#else |
#else |
2827 |
#define NO_RETURN /* nothing */ |
#define NO_RETURN /* nothing */ |
2828 |
#endif |
#endif |
2829 |
|
|
2830 |
|
/* These won't be used automatically yet. We also need to know, at least, |
2831 |
|
that the stack is continuous. */ |
2832 |
|
#ifdef __GNUC__ |
2833 |
|
# ifndef GC_SETJMP_WORKS |
2834 |
|
/* GC_SETJMP_WORKS is nearly always appropriate for GCC -- |
2835 |
|
see NON_SAVING_SETJMP in the target descriptions. */ |
2836 |
|
/* Exceptions (see NON_SAVING_SETJMP in target description) are ns32k, |
2837 |
|
SCO5 non-ELF (but Emacs specifies ELF) and SVR3 on x86. |
2838 |
|
Fixme: Deal with ns32k, SVR3. */ |
2839 |
|
# define GC_SETJMP_WORKS 1 |
2840 |
|
# endif |
2841 |
|
# ifndef GC_LISP_OBJECT_ALIGNMENT |
2842 |
|
# define GC_LISP_OBJECT_ALIGNMENT (__alignof__ (Lisp_Object)) |
2843 |
|
# endif |
2844 |
|
#endif |
2845 |
|
|
2846 |
|
/* avoid deprecated functions */ |
2847 |
|
#ifdef HAVE_MEMCPY |
2848 |
|
# define bcopy(a,b,s) memcpy (b,a,s) |
2849 |
|
#endif |
2850 |
|
#ifdef HAVE_MEMSET |
2851 |
|
# define bzero(a,s) memset (a,0,s) |
2852 |
|
#endif |
2853 |
|
#ifdef HAVE_MEMCMP |
2854 |
|
# define BCMP memcmp |
2855 |
|
# define bcmp memcmp |
2856 |
|
#endif |
2857 |
|
|
2858 |
|
#endif /* EMACS_CONFIG_H */ |
2859 |
|
|
2860 |
|
/* |
2861 |
|
Local Variables: |
2862 |
|
mode: c |
2863 |
|
End: |
2864 |
|
*/ |
2865 |
])dnl |
])dnl |
2866 |
|
|
2867 |
#### Report on what we decided to do. |
#### Report on what we decided to do. |
2868 |
|
#### Report GTK as a toolkit, even if it doesn't use Xt. |
2869 |
|
#### It makes printing result more understandable as using GTK sets |
2870 |
|
#### toolkit_scroll_bars to yes by default. |
2871 |
|
if test "${HAVE_GTK}" = "yes"; then |
2872 |
|
USE_X_TOOLKIT=GTK |
2873 |
|
fi |
2874 |
|
|
2875 |
echo " |
echo " |
2876 |
Configured for \`${canonical}'. |
Configured for \`${canonical}'. |
2877 |
|
|
2883 |
Should Emacs use a relocating allocator for buffers? ${REL_ALLOC} |
Should Emacs use a relocating allocator for buffers? ${REL_ALLOC} |
2884 |
Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers |
Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers |
2885 |
What window system should Emacs use? ${window_system} |
What window system should Emacs use? ${window_system} |
2886 |
What toolkit should Emacs use? ${USE_X_TOOLKIT} |
What toolkit should Emacs use? ${USE_X_TOOLKIT}" |
|
Should Emacs use a shared game state directory? ${gamedir}" |
|
2887 |
|
|
2888 |
if test -n "${x_includes}"; then |
if test -n "${x_includes}"; then |
2889 |
echo " Where do we find X Windows header files? ${x_includes}" |
echo " Where do we find X Windows header files? ${x_includes}" |
2906 |
echo |
echo |
2907 |
|
|
2908 |
# Remove any trailing slashes in these variables. |
# Remove any trailing slashes in these variables. |
2909 |
changequote(, )dnl |
[test "${prefix}" != NONE && |
|
test "${prefix}" != NONE && |
|
2910 |
prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'` |
prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'` |
2911 |
test "${exec_prefix}" != NONE && |
test "${exec_prefix}" != NONE && |
2912 |
exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'` |
exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`] |
|
changequote([, ])dnl |
|
2913 |
|
|
2914 |
## Check if the C preprocessor will convert `..' to `. .'. If so, set |
## Check if the C preprocessor will convert `..' to `. .'. If so, set |
2915 |
## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile |
## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile |
2934 |
# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c |
# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c |
2935 |
# This must be done after src/config.h is built, since we rely on that file. |
# This must be done after src/config.h is built, since we rely on that file. |
2936 |
|
|
|
changequote(, )dnl The horror, the horror. |
|
2937 |
# Now get this: Some word that is part of the ${srcdir} directory name |
# Now get this: Some word that is part of the ${srcdir} directory name |
2938 |
# or the ${configuration} value might, just might, happen to be an |
# or the ${configuration} value might, just might, happen to be an |
2939 |
# identifier like `sun4' or `i386' or something, and be predefined by |
# identifier like `sun4' or `i386' or something, and be predefined by |
2940 |
# the C preprocessor to some helpful value like 1, or maybe the empty |
# the C preprocessor to some helpful value like 1, or maybe the empty |
2941 |
# string. Needless to say consequent macro substitutions are less |
# string. Needless to say consequent macro substitutions are less |
2942 |
# than conducive to the makefile finding the correct directory. |
# than conducive to the makefile finding the correct directory. |
2943 |
undefs="`echo $top_srcdir $configuration $canonical | |
[undefs="`echo $top_srcdir $configuration $canonical | |
2944 |
sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \ |
sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \ |
2945 |
-e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \ |
-e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \ |
2946 |
`" |
`"] |
|
changequote([, ])dnl |
|
2947 |
|
|
2948 |
echo creating src/epaths.h |
echo creating src/epaths.h |
2949 |
${MAKE-make} epaths-force |
${MAKE-make} epaths-force |