aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Love2000-07-18 22:04:26 +0000
committerDave Love2000-07-18 22:04:26 +0000
commit4428e2683a856eb1ea77cc98cf1244925c14be6c (patch)
treeddedd6c230a65b8d1e7e8ccfd0bb21948f55d465
parent3beb81fce9c339dede2069acb632ef31f76639fc (diff)
downloademacs-4428e2683a856eb1ea77cc98cf1244925c14be6c.tar.gz
emacs-4428e2683a856eb1ea77cc98cf1244925c14be6c.zip
Reorder so that most tests are done after CPPFLAGS
is set from the C_SWITCH_... definitions.
-rw-r--r--configure.in276
1 files changed, 138 insertions, 138 deletions
diff --git a/configure.in b/configure.in
index f91c3da4270..3a99fea4d2a 100644
--- a/configure.in
+++ b/configure.in
@@ -1156,6 +1156,144 @@ fi
1156dnl checks for Unix variants 1156dnl checks for Unix variants
1157AC_AIX 1157AC_AIX
1158 1158
1159#### Extract some information from the operating system and machine files.
1160
1161AC_CHECKING([the machine- and system-dependent files to find out
1162 - which libraries the lib-src programs will want, and
1163 - whether the GNU malloc routines are usable])
1164
1165### First figure out CFLAGS (which we use for running the compiler here)
1166### and REAL_CFLAGS (which we use for real compilation).
1167### The two are the same except on a few systems, where they are made
1168### different to work around various lossages. For example,
1169### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
1170### as implying static linking.
1171
1172### If the CFLAGS env var is specified, we use that value
1173### instead of the default.
1174
1175### It's not important that this name contain the PID; you can't run
1176### two configures in the same directory and have anything work
1177### anyway.
1178tempcname="conftest.c"
1179
1180echo '
1181#include "'${srcdir}'/src/'${opsysfile}'"
1182#include "'${srcdir}'/src/'${machfile}'"
1183#ifndef LIBS_MACHINE
1184#define LIBS_MACHINE
1185#endif
1186#ifndef LIBS_SYSTEM
1187#define LIBS_SYSTEM
1188#endif
1189#ifndef C_SWITCH_SYSTEM
1190#define C_SWITCH_SYSTEM
1191#endif
1192#ifndef C_SWITCH_MACHINE
1193#define C_SWITCH_MACHINE
1194#endif
1195configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
1196configure___ c_switch_system=C_SWITCH_SYSTEM
1197configure___ c_switch_machine=C_SWITCH_MACHINE
1198
1199#ifndef LIB_X11_LIB
1200#define LIB_X11_LIB -lX11
1201#endif
1202
1203#ifndef LIBX11_MACHINE
1204#define LIBX11_MACHINE
1205#endif
1206
1207#ifndef LIBX11_SYSTEM
1208#define LIBX11_SYSTEM
1209#endif
1210configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
1211
1212#ifdef UNEXEC
1213configure___ unexec=UNEXEC
1214#else
1215configure___ unexec=unexec.o
1216#endif
1217
1218#ifdef SYSTEM_MALLOC
1219configure___ system_malloc=yes
1220#else
1221configure___ system_malloc=no
1222#endif
1223
1224#ifndef C_DEBUG_SWITCH
1225#define C_DEBUG_SWITCH -g
1226#endif
1227
1228#ifndef C_OPTIMIZE_SWITCH
1229#ifdef __GNUC__
1230#define C_OPTIMIZE_SWITCH -O2
1231#else
1232#define C_OPTIMIZE_SWITCH -O
1233#endif
1234#endif
1235
1236#ifndef LD_SWITCH_MACHINE
1237#define LD_SWITCH_MACHINE
1238#endif
1239
1240#ifndef LD_SWITCH_SYSTEM
1241#define LD_SWITCH_SYSTEM
1242#endif
1243
1244#ifndef LD_SWITCH_X_SITE_AUX
1245#define LD_SWITCH_X_SITE_AUX
1246#endif
1247
1248configure___ ld_switch_system=LD_SWITCH_SYSTEM
1249configure___ ld_switch_machine=LD_SWITCH_MACHINE
1250
1251#ifdef THIS_IS_CONFIGURE
1252
1253/* Get the CFLAGS for tests in configure. */
1254#ifdef __GNUC__
1255configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
1256#else
1257configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
1258#endif
1259
1260#else /* not THIS_IS_CONFIGURE */
1261
1262/* Get the CFLAGS for real compilation. */
1263#ifdef __GNUC__
1264configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
1265#else
1266configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
1267#endif
1268
1269#endif /* not THIS_IS_CONFIGURE */
1270' > ${tempcname}
1271
1272# The value of CPP is a quoted variable reference, so we need to do this
1273# to get its actual value...
1274CPP=`eval "echo $CPP"`
1275changequote(, )dnl
1276eval `${CPP} -Isrc ${tempcname} \
1277 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
1278if test "x$SPECIFIED_CFLAGS" = x; then
1279 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
1280 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
1281else
1282 REAL_CFLAGS="$CFLAGS"
1283fi
1284changequote([, ])dnl
1285rm ${tempcname}
1286
1287ac_link="$ac_link $ld_switch_machine $ld_switch_system"
1288
1289### Make sure subsequent tests use flags consistent with the build flags.
1290
1291if test x"${OVERRIDE_CPPFLAGS}" != x; then
1292 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
1293else
1294 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
1295fi
1296
1159# Sound support for GNU/Linux and the free BSDs. 1297# Sound support for GNU/Linux and the free BSDs.
1160AC_CHECK_HEADERS(machine/soundcard.h sys/soundcard.h soundcard.h) 1298AC_CHECK_HEADERS(machine/soundcard.h sys/soundcard.h soundcard.h)
1161# Emulation library used on NetBSD. 1299# Emulation library used on NetBSD.
@@ -1356,136 +1494,6 @@ if test "${opsys}" = "hpux9shr"; then
1356 esac 1494 esac
1357fi 1495fi
1358 1496
1359#### Extract some information from the operating system and machine files.
1360
1361AC_CHECKING([the machine- and system-dependent files to find out
1362 - which libraries the lib-src programs will want, and
1363 - whether the GNU malloc routines are usable])
1364
1365### First figure out CFLAGS (which we use for running the compiler here)
1366### and REAL_CFLAGS (which we use for real compilation).
1367### The two are the same except on a few systems, where they are made
1368### different to work around various lossages. For example,
1369### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
1370### as implying static linking.
1371
1372### If the CFLAGS env var is specified, we use that value
1373### instead of the default.
1374
1375### It's not important that this name contain the PID; you can't run
1376### two configures in the same directory and have anything work
1377### anyway.
1378tempcname="conftest.c"
1379
1380echo '
1381#include "'${srcdir}'/src/'${opsysfile}'"
1382#include "'${srcdir}'/src/'${machfile}'"
1383#ifndef LIBS_MACHINE
1384#define LIBS_MACHINE
1385#endif
1386#ifndef LIBS_SYSTEM
1387#define LIBS_SYSTEM
1388#endif
1389#ifndef C_SWITCH_SYSTEM
1390#define C_SWITCH_SYSTEM
1391#endif
1392#ifndef C_SWITCH_MACHINE
1393#define C_SWITCH_MACHINE
1394#endif
1395configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
1396configure___ c_switch_system=C_SWITCH_SYSTEM
1397configure___ c_switch_machine=C_SWITCH_MACHINE
1398
1399#ifndef LIB_X11_LIB
1400#define LIB_X11_LIB -lX11
1401#endif
1402
1403#ifndef LIBX11_MACHINE
1404#define LIBX11_MACHINE
1405#endif
1406
1407#ifndef LIBX11_SYSTEM
1408#define LIBX11_SYSTEM
1409#endif
1410configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
1411
1412#ifdef UNEXEC
1413configure___ unexec=UNEXEC
1414#else
1415configure___ unexec=unexec.o
1416#endif
1417
1418#ifdef SYSTEM_MALLOC
1419configure___ system_malloc=yes
1420#else
1421configure___ system_malloc=no
1422#endif
1423
1424#ifndef C_DEBUG_SWITCH
1425#define C_DEBUG_SWITCH -g
1426#endif
1427
1428#ifndef C_OPTIMIZE_SWITCH
1429#ifdef __GNUC__
1430#define C_OPTIMIZE_SWITCH -O2
1431#else
1432#define C_OPTIMIZE_SWITCH -O
1433#endif
1434#endif
1435
1436#ifndef LD_SWITCH_MACHINE
1437#define LD_SWITCH_MACHINE
1438#endif
1439
1440#ifndef LD_SWITCH_SYSTEM
1441#define LD_SWITCH_SYSTEM
1442#endif
1443
1444#ifndef LD_SWITCH_X_SITE_AUX
1445#define LD_SWITCH_X_SITE_AUX
1446#endif
1447
1448configure___ ld_switch_system=LD_SWITCH_SYSTEM
1449configure___ ld_switch_machine=LD_SWITCH_MACHINE
1450
1451#ifdef THIS_IS_CONFIGURE
1452
1453/* Get the CFLAGS for tests in configure. */
1454#ifdef __GNUC__
1455configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
1456#else
1457configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
1458#endif
1459
1460#else /* not THIS_IS_CONFIGURE */
1461
1462/* Get the CFLAGS for real compilation. */
1463#ifdef __GNUC__
1464configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
1465#else
1466configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
1467#endif
1468
1469#endif /* not THIS_IS_CONFIGURE */
1470' > ${tempcname}
1471
1472# The value of CPP is a quoted variable reference, so we need to do this
1473# to get its actual value...
1474CPP=`eval "echo $CPP"`
1475changequote(, )dnl
1476eval `${CPP} -Isrc ${tempcname} \
1477 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
1478if test "x$SPECIFIED_CFLAGS" = x; then
1479 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
1480 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
1481else
1482 REAL_CFLAGS="$CFLAGS"
1483fi
1484changequote([, ])dnl
1485rm ${tempcname}
1486
1487ac_link="$ac_link $ld_switch_machine $ld_switch_system"
1488
1489### Compute the unexec source name from the object name. 1497### Compute the unexec source name from the object name.
1490UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`" 1498UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
1491 1499
@@ -1520,14 +1528,6 @@ if test x"${REL_ALLOC}" = x; then
1520 REL_ALLOC=${GNU_MALLOC} 1528 REL_ALLOC=${GNU_MALLOC}
1521fi 1529fi
1522 1530
1523#### Add the libraries to LIBS and check for some functions.
1524
1525if test x"${OVERRIDE_CPPFLAGS}" != x; then
1526 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
1527else
1528 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
1529fi
1530
1531LIBS="$libsrc_libs $LIBS" 1531LIBS="$libsrc_libs $LIBS"
1532 1532
1533dnl If found, this defines HAVE_LIBDNET, which m/pmax.h checks, 1533dnl If found, this defines HAVE_LIBDNET, which m/pmax.h checks,