diff options
| author | Dave Love | 2000-07-18 22:04:26 +0000 |
|---|---|---|
| committer | Dave Love | 2000-07-18 22:04:26 +0000 |
| commit | 4428e2683a856eb1ea77cc98cf1244925c14be6c (patch) | |
| tree | ddedd6c230a65b8d1e7e8ccfd0bb21948f55d465 | |
| parent | 3beb81fce9c339dede2069acb632ef31f76639fc (diff) | |
| download | emacs-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.in | 276 |
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 | |||
| 1156 | dnl checks for Unix variants | 1156 | dnl checks for Unix variants |
| 1157 | AC_AIX | 1157 | AC_AIX |
| 1158 | 1158 | ||
| 1159 | #### Extract some information from the operating system and machine files. | ||
| 1160 | |||
| 1161 | AC_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. | ||
| 1178 | tempcname="conftest.c" | ||
| 1179 | |||
| 1180 | echo ' | ||
| 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 | ||
| 1195 | configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM | ||
| 1196 | configure___ c_switch_system=C_SWITCH_SYSTEM | ||
| 1197 | configure___ 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 | ||
| 1210 | configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM | ||
| 1211 | |||
| 1212 | #ifdef UNEXEC | ||
| 1213 | configure___ unexec=UNEXEC | ||
| 1214 | #else | ||
| 1215 | configure___ unexec=unexec.o | ||
| 1216 | #endif | ||
| 1217 | |||
| 1218 | #ifdef SYSTEM_MALLOC | ||
| 1219 | configure___ system_malloc=yes | ||
| 1220 | #else | ||
| 1221 | configure___ 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 | |||
| 1248 | configure___ ld_switch_system=LD_SWITCH_SYSTEM | ||
| 1249 | configure___ ld_switch_machine=LD_SWITCH_MACHINE | ||
| 1250 | |||
| 1251 | #ifdef THIS_IS_CONFIGURE | ||
| 1252 | |||
| 1253 | /* Get the CFLAGS for tests in configure. */ | ||
| 1254 | #ifdef __GNUC__ | ||
| 1255 | configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}' | ||
| 1256 | #else | ||
| 1257 | configure___ 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__ | ||
| 1264 | configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}' | ||
| 1265 | #else | ||
| 1266 | configure___ 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... | ||
| 1274 | CPP=`eval "echo $CPP"` | ||
| 1275 | changequote(, )dnl | ||
| 1276 | eval `${CPP} -Isrc ${tempcname} \ | ||
| 1277 | | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'` | ||
| 1278 | if test "x$SPECIFIED_CFLAGS" = x; then | ||
| 1279 | eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \ | ||
| 1280 | | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'` | ||
| 1281 | else | ||
| 1282 | REAL_CFLAGS="$CFLAGS" | ||
| 1283 | fi | ||
| 1284 | changequote([, ])dnl | ||
| 1285 | rm ${tempcname} | ||
| 1286 | |||
| 1287 | ac_link="$ac_link $ld_switch_machine $ld_switch_system" | ||
| 1288 | |||
| 1289 | ### Make sure subsequent tests use flags consistent with the build flags. | ||
| 1290 | |||
| 1291 | if test x"${OVERRIDE_CPPFLAGS}" != x; then | ||
| 1292 | CPPFLAGS="${OVERRIDE_CPPFLAGS}" | ||
| 1293 | else | ||
| 1294 | CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS" | ||
| 1295 | fi | ||
| 1296 | |||
| 1159 | # Sound support for GNU/Linux and the free BSDs. | 1297 | # Sound support for GNU/Linux and the free BSDs. |
| 1160 | AC_CHECK_HEADERS(machine/soundcard.h sys/soundcard.h soundcard.h) | 1298 | AC_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 |
| 1357 | fi | 1495 | fi |
| 1358 | 1496 | ||
| 1359 | #### Extract some information from the operating system and machine files. | ||
| 1360 | |||
| 1361 | AC_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. | ||
| 1378 | tempcname="conftest.c" | ||
| 1379 | |||
| 1380 | echo ' | ||
| 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 | ||
| 1395 | configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM | ||
| 1396 | configure___ c_switch_system=C_SWITCH_SYSTEM | ||
| 1397 | configure___ 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 | ||
| 1410 | configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM | ||
| 1411 | |||
| 1412 | #ifdef UNEXEC | ||
| 1413 | configure___ unexec=UNEXEC | ||
| 1414 | #else | ||
| 1415 | configure___ unexec=unexec.o | ||
| 1416 | #endif | ||
| 1417 | |||
| 1418 | #ifdef SYSTEM_MALLOC | ||
| 1419 | configure___ system_malloc=yes | ||
| 1420 | #else | ||
| 1421 | configure___ 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 | |||
| 1448 | configure___ ld_switch_system=LD_SWITCH_SYSTEM | ||
| 1449 | configure___ ld_switch_machine=LD_SWITCH_MACHINE | ||
| 1450 | |||
| 1451 | #ifdef THIS_IS_CONFIGURE | ||
| 1452 | |||
| 1453 | /* Get the CFLAGS for tests in configure. */ | ||
| 1454 | #ifdef __GNUC__ | ||
| 1455 | configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}' | ||
| 1456 | #else | ||
| 1457 | configure___ 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__ | ||
| 1464 | configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}' | ||
| 1465 | #else | ||
| 1466 | configure___ 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... | ||
| 1474 | CPP=`eval "echo $CPP"` | ||
| 1475 | changequote(, )dnl | ||
| 1476 | eval `${CPP} -Isrc ${tempcname} \ | ||
| 1477 | | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'` | ||
| 1478 | if test "x$SPECIFIED_CFLAGS" = x; then | ||
| 1479 | eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \ | ||
| 1480 | | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'` | ||
| 1481 | else | ||
| 1482 | REAL_CFLAGS="$CFLAGS" | ||
| 1483 | fi | ||
| 1484 | changequote([, ])dnl | ||
| 1485 | rm ${tempcname} | ||
| 1486 | |||
| 1487 | ac_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. |
| 1490 | UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`" | 1498 | UNEXEC_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} |
| 1521 | fi | 1529 | fi |
| 1522 | 1530 | ||
| 1523 | #### Add the libraries to LIBS and check for some functions. | ||
| 1524 | |||
| 1525 | if test x"${OVERRIDE_CPPFLAGS}" != x; then | ||
| 1526 | CPPFLAGS="${OVERRIDE_CPPFLAGS}" | ||
| 1527 | else | ||
| 1528 | CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS" | ||
| 1529 | fi | ||
| 1530 | |||
| 1531 | LIBS="$libsrc_libs $LIBS" | 1531 | LIBS="$libsrc_libs $LIBS" |
| 1532 | 1532 | ||
| 1533 | dnl If found, this defines HAVE_LIBDNET, which m/pmax.h checks, | 1533 | dnl If found, this defines HAVE_LIBDNET, which m/pmax.h checks, |