diff options
| author | Richard M. Stallman | 1995-06-19 18:50:13 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-06-19 18:50:13 +0000 |
| commit | 509fccc3aecfb5b069d9a63b0136a8ed6dd153c6 (patch) | |
| tree | 1338642f30f1e85cd5b6749666c5bcb1cfa88858 | |
| parent | 94a6c818cee9328a575dd728e779d4935a1196ea (diff) | |
| download | emacs-509fccc3aecfb5b069d9a63b0136a8ed6dd153c6.tar.gz emacs-509fccc3aecfb5b069d9a63b0136a8ed6dd153c6.zip | |
Test whether XFree86 needs -b i486-linuxaout to link.
Use this -b option only if it really improves matters.
Report more clearly when there is no special
dir to search for X includes or libraries.
| -rw-r--r-- | configure.in | 58 |
1 files changed, 51 insertions, 7 deletions
diff --git a/configure.in b/configure.in index 96afa333ca6..df1d1ea2213 100644 --- a/configure.in +++ b/configure.in | |||
| @@ -1143,13 +1143,49 @@ else | |||
| 1143 | fi | 1143 | fi |
| 1144 | AC_MSG_RESULT($HAVE_XFREE386) | 1144 | AC_MSG_RESULT($HAVE_XFREE386) |
| 1145 | 1145 | ||
| 1146 | # We change CFLAGS temporarily so that C_SWITCH_X_SITE gets used | 1146 | # Change CFLAGS temporarily so that C_SWITCH_X_SITE gets used |
| 1147 | # for the tests that follow. | 1147 | # for the tests that follow. We set it back to REAL_CFLAGS later on. |
| 1148 | 1148 | ||
| 1149 | if test "${HAVE_X11}" = "yes"; then | 1149 | if test "${HAVE_X11}" = "yes"; then |
| 1150 | DEFS="$C_SWITCH_X_SITE $DEFS" | 1150 | DEFS="$C_SWITCH_X_SITE $DEFS" |
| 1151 | LIBS="$LD_SWITCH_X_SITE $LIBX $LIBS" | 1151 | LIBS="$LD_SWITCH_X_SITE $LIBX $LIBS" |
| 1152 | CFLAGS="$C_SWITCH_X_SITE $CFLAGS" | 1152 | CFLAGS="$C_SWITCH_X_SITE $CFLAGS" |
| 1153 | |||
| 1154 | if test "${HAVE_XFREE386}" = "yes" && test "${opsys}" = "linux"; then | ||
| 1155 | AC_MSG_CHECKING(whether XFree86 needs -b to link) | ||
| 1156 | AC_TRY_LINK([], | ||
| 1157 | [XOpenDisplay ("foo");], | ||
| 1158 | [xfree86_first_failure=no], | ||
| 1159 | [xfree86_first_failure=yes]) | ||
| 1160 | if test "${xfree86_first_failure}" = "yes"; then | ||
| 1161 | OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE" | ||
| 1162 | OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE" | ||
| 1163 | OLD_CPPFLAGS="$CPPFLAGS" | ||
| 1164 | OLD_LIBS="$LIBS" | ||
| 1165 | LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout" | ||
| 1166 | C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout" | ||
| 1167 | CPPFLAGS="$CPPFLAGS -b i486-linuxaout" | ||
| 1168 | LIBS="$LIBS -b i486-linuxaout" | ||
| 1169 | AC_TRY_LINK([], | ||
| 1170 | [XOpenDisplay ("foo");], | ||
| 1171 | [xfree86_second_failure=no], | ||
| 1172 | [xfree86_second_failure=yes]) | ||
| 1173 | if test "${xfree86_second_failure}" = "yes"; then | ||
| 1174 | # If we get the same failure with -b, there is no use adding -b. | ||
| 1175 | # So take it out. This plays safe. | ||
| 1176 | LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE" | ||
| 1177 | C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE" | ||
| 1178 | CPPFLAGS="$OLD_CPPFLAGS" | ||
| 1179 | LIBS="$OLD_LIBS" | ||
| 1180 | AC_MSG_RESULT(no) | ||
| 1181 | else | ||
| 1182 | AC_MSG_RESULT(yes) | ||
| 1183 | fi | ||
| 1184 | else | ||
| 1185 | AC_MSG_RESULT(no) | ||
| 1186 | fi | ||
| 1187 | fi | ||
| 1188 | |||
| 1153 | AC_CHECK_FUNCS(XrmSetDatabase XScreenResourceString \ | 1189 | AC_CHECK_FUNCS(XrmSetDatabase XScreenResourceString \ |
| 1154 | XScreenNumberOfScreen XSetWMProtocols) | 1190 | XScreenNumberOfScreen XSetWMProtocols) |
| 1155 | fi | 1191 | fi |
| @@ -1278,7 +1314,6 @@ fi | |||
| 1278 | 1314 | ||
| 1279 | #### Report on what we decided to do. | 1315 | #### Report on what we decided to do. |
| 1280 | echo " | 1316 | echo " |
| 1281 | |||
| 1282 | Configured for \`${canonical}'. | 1317 | Configured for \`${canonical}'. |
| 1283 | 1318 | ||
| 1284 | Where should the build process find the source code? ${srcdir} | 1319 | Where should the build process find the source code? ${srcdir} |
| @@ -1288,11 +1323,20 @@ Configured for \`${canonical}'. | |||
| 1288 | Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason} | 1323 | Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason} |
| 1289 | Should Emacs use the relocating allocator for buffers? ${REL_ALLOC} | 1324 | Should Emacs use the relocating allocator for buffers? ${REL_ALLOC} |
| 1290 | What window system should Emacs use? ${window_system} | 1325 | What window system should Emacs use? ${window_system} |
| 1291 | What toolkit should Emacs use? ${USE_X_TOOLKIT}${x_includes+ | 1326 | What toolkit should Emacs use? ${USE_X_TOOLKIT}" |
| 1292 | Where do we find X Windows header files? }${x_includes}${x_libraries+ | 1327 | |
| 1293 | Where do we find X Windows libraries? }${x_libraries} | 1328 | if test -n "${x_includes}"; then |
| 1329 | echo " Where do we find X Windows header files? ${x_includes}" | ||
| 1330 | else | ||
| 1331 | echo " Where do we find X Windows header files? Standard dirs" | ||
| 1332 | fi | ||
| 1333 | if test -n "${x_libraries}"; then | ||
| 1334 | echo " Where do we find X Windows libraries? ${x_libraries}" | ||
| 1335 | else | ||
| 1336 | echo " Where do we find X Windows libraries? Standard dirs" | ||
| 1337 | fi | ||
| 1294 | 1338 | ||
| 1295 | " | 1339 | echo |
| 1296 | 1340 | ||
| 1297 | # Remove any trailing slashes in these variables. | 1341 | # Remove any trailing slashes in these variables. |
| 1298 | changequote(, )dnl | 1342 | changequote(, )dnl |