Mercurial > emacs
comparison configure @ 27675:e655a2d4ecca
*** empty log message ***
author | Dave Love <fx@gnu.org> |
---|---|
date | Sat, 12 Feb 2000 16:37:27 +0000 |
parents | 6a78e514e6d3 |
children | 75463d908406 |
comparison
equal
deleted
inserted
replaced
27674:c04790190e75 | 27675:e655a2d4ecca |
---|---|
1390 machine=iris4d opsys=irix6-5 | 1390 machine=iris4d opsys=irix6-5 |
1391 # Without defining _LANGUAGE_C, things get masked out in the headers | 1391 # Without defining _LANGUAGE_C, things get masked out in the headers |
1392 # so that, for instance, grepping for `free' in stdlib.h fails and | 1392 # so that, for instance, grepping for `free' in stdlib.h fails and |
1393 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m). | 1393 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m). |
1394 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C" | 1394 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C" |
1395 NON_GCC_TEST_OPTIONS="-n32 -G0 -D_LANGUAGE_C" | 1395 NON_GCC_TEST_OPTIONS="-n32 -D_LANGUAGE_C" |
1396 ;; | 1396 ;; |
1397 mips-sgi-irix6* ) | 1397 mips-sgi-irix6* ) |
1398 machine=iris4d opsys=irix6-0 | 1398 machine=iris4d opsys=irix6-0 |
1399 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5, | 1399 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5, |
1400 # but presumably it does no harm. | 1400 # but presumably it does no harm. |
2731 #include "confdefs.h" | 2731 #include "confdefs.h" |
2732 | 2732 |
2733 int main() { | 2733 int main() { |
2734 | 2734 |
2735 /* Ultrix mips cc rejects this. */ | 2735 /* Ultrix mips cc rejects this. */ |
2736 typedef int charset[2]; const charset x; | 2736 typedef int charset[2]; const charset x = {0,0}; |
2737 /* SunOS 4.1.1 cc rejects this. */ | 2737 /* SunOS 4.1.1 cc rejects this. */ |
2738 char const *const *ccp; | 2738 char const *const *ccp; |
2739 char **p; | 2739 char **p; |
2740 /* NEC SVR4.0.2 mips cc rejects this. */ | 2740 /* NEC SVR4.0.2 mips cc rejects this. */ |
2741 struct point {int x, y;}; | 2741 struct point {int x, y;}; |
4674 cat > conftest.$ac_ext <<EOF | 4674 cat > conftest.$ac_ext <<EOF |
4675 #line 4676 "configure" | 4675 #line 4676 "configure" |
4676 #include "confdefs.h" | 4676 #include "confdefs.h" |
4677 #include <alloca.h> | 4677 #include <alloca.h> |
4678 int main() { | 4678 int main() { |
4679 char *p = alloca(2 * sizeof(int)); | 4679 void *p = alloca(2 * sizeof(int)); |
4680 ; return 0; } | 4680 ; return 0; } |
4681 EOF | 4681 EOF |
4682 if { (eval echo configure:4683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | 4682 if { (eval echo configure:4683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
4683 rm -rf conftest* | 4683 rm -rf conftest* |
4684 ac_cv_header_alloca_h=yes | 4684 ac_cv_header_alloca_h=yes |
6318 EOF | 6318 EOF |
6319 | 6319 |
6320 else | 6320 else |
6321 echo "$ac_t""no" 1>&6 | 6321 echo "$ac_t""no" 1>&6 |
6322 fi | 6322 fi |
6323 | |
6324 echo $ac_n "checking for pid_t""... $ac_c" 1>&6 | |
6325 echo "configure:6326: checking for pid_t" >&5 | |
6326 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then | |
6327 echo $ac_n "(cached) $ac_c" 1>&6 | |
6328 else | |
6329 cat > conftest.$ac_ext <<EOF | |
6330 #line 6331 "configure" | |
6331 #include "confdefs.h" | |
6332 #include <sys/types.h> | |
6333 #if STDC_HEADERS | |
6334 #include <stdlib.h> | |
6335 #include <stddef.h> | |
6336 #endif | |
6337 EOF | |
6338 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6339 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
6340 rm -rf conftest* | |
6341 ac_cv_type_pid_t=yes | |
6342 else | |
6343 rm -rf conftest* | |
6344 ac_cv_type_pid_t=no | |
6345 fi | |
6346 rm -f conftest* | |
6347 | |
6348 fi | |
6349 echo "$ac_t""$ac_cv_type_pid_t" 1>&6 | |
6350 if test $ac_cv_type_pid_t = no; then | |
6351 cat >> confdefs.h <<\EOF | |
6352 #define pid_t int | |
6353 EOF | |
6354 | |
6355 fi | |
6356 | |
6357 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` | |
6358 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 | |
6359 echo "configure:6360: checking for vfork.h" >&5 | |
6360 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
6361 echo $ac_n "(cached) $ac_c" 1>&6 | |
6362 else | |
6363 cat > conftest.$ac_ext <<EOF | |
6364 #line 6365 "configure" | |
6365 #include "confdefs.h" | |
6366 #include <vfork.h> | |
6367 EOF | |
6368 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
6369 { (eval echo configure:6370: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
6370 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
6371 if test -z "$ac_err"; then | |
6372 rm -rf conftest* | |
6373 eval "ac_cv_header_$ac_safe=yes" | |
6374 else | |
6375 echo "$ac_err" >&5 | |
6376 echo "configure: failed program was:" >&5 | |
6377 cat conftest.$ac_ext >&5 | |
6378 rm -rf conftest* | |
6379 eval "ac_cv_header_$ac_safe=no" | |
6380 fi | |
6381 rm -f conftest* | |
6382 fi | |
6383 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
6384 echo "$ac_t""yes" 1>&6 | |
6385 cat >> confdefs.h <<\EOF | |
6386 #define HAVE_VFORK_H 1 | |
6387 EOF | |
6388 | |
6389 else | |
6390 echo "$ac_t""no" 1>&6 | |
6391 fi | |
6392 | |
6393 echo $ac_n "checking for working vfork""... $ac_c" 1>&6 | |
6394 echo "configure:6395: checking for working vfork" >&5 | |
6395 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then | |
6396 echo $ac_n "(cached) $ac_c" 1>&6 | |
6397 else | |
6398 if test "$cross_compiling" = yes; then | |
6399 echo $ac_n "checking for vfork""... $ac_c" 1>&6 | |
6400 echo "configure:6401: checking for vfork" >&5 | |
6401 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then | |
6402 echo $ac_n "(cached) $ac_c" 1>&6 | |
6403 else | |
6404 cat > conftest.$ac_ext <<EOF | |
6405 #line 6406 "configure" | |
6406 #include "confdefs.h" | |
6407 /* System header to define __stub macros and hopefully few prototypes, | |
6408 which can conflict with char vfork(); below. */ | |
6409 #include <assert.h> | |
6410 /* Override any gcc2 internal prototype to avoid an error. */ | |
6411 /* We use char because int might match the return type of a gcc2 | |
6412 builtin and then its argument prototype would still apply. */ | |
6413 char vfork(); | |
6414 | |
6415 int main() { | |
6416 | |
6417 /* The GNU C library defines this for functions which it implements | |
6418 to always fail with ENOSYS. Some functions are actually named | |
6419 something starting with __ and the normal name is an alias. */ | |
6420 #if defined (__stub_vfork) || defined (__stub___vfork) | |
6421 choke me | |
6422 #else | |
6423 vfork(); | |
6424 #endif | |
6425 | |
6426 ; return 0; } | |
6427 EOF | |
6428 if { (eval echo configure:6429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
6429 rm -rf conftest* | |
6430 eval "ac_cv_func_vfork=yes" | |
6431 else | |
6432 echo "configure: failed program was:" >&5 | |
6433 cat conftest.$ac_ext >&5 | |
6434 rm -rf conftest* | |
6435 eval "ac_cv_func_vfork=no" | |
6436 fi | |
6437 rm -f conftest* | |
6438 fi | |
6439 | |
6440 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then | |
6441 echo "$ac_t""yes" 1>&6 | |
6442 : | |
6443 else | |
6444 echo "$ac_t""no" 1>&6 | |
6445 fi | |
6446 | |
6447 ac_cv_func_vfork_works=$ac_cv_func_vfork | |
6448 else | |
6449 cat > conftest.$ac_ext <<EOF | |
6450 #line 6451 "configure" | |
6451 #include "confdefs.h" | |
6452 /* Thanks to Paul Eggert for this test. */ | |
6453 #include <stdio.h> | |
6454 #include <sys/types.h> | |
6455 #include <sys/stat.h> | |
6456 #ifdef HAVE_UNISTD_H | |
6457 #include <unistd.h> | |
6458 #endif | |
6459 #ifdef HAVE_VFORK_H | |
6460 #include <vfork.h> | |
6461 #endif | |
6462 /* On some sparc systems, changes by the child to local and incoming | |
6463 argument registers are propagated back to the parent. | |
6464 The compiler is told about this with #include <vfork.h>, | |
6465 but some compilers (e.g. gcc -O) don't grok <vfork.h>. | |
6466 Test for this by using a static variable whose address | |
6467 is put into a register that is clobbered by the vfork. */ | |
6468 static | |
6469 #ifdef __cplusplus | |
6470 sparc_address_test (int arg) | |
6471 #else | |
6472 sparc_address_test (arg) int arg; | |
6473 #endif | |
6474 { | |
6475 static pid_t child; | |
6476 if (!child) { | |
6477 child = vfork (); | |
6478 if (child < 0) { | |
6479 perror ("vfork"); | |
6480 _exit(2); | |
6481 } | |
6482 if (!child) { | |
6483 arg = getpid(); | |
6484 write(-1, "", 0); | |
6485 _exit (arg); | |
6486 } | |
6487 } | |
6488 } | |
6489 main() { | |
6490 pid_t parent = getpid (); | |
6491 pid_t child; | |
6492 | |
6493 sparc_address_test (); | |
6494 | |
6495 child = vfork (); | |
6496 | |
6497 if (child == 0) { | |
6498 /* Here is another test for sparc vfork register problems. | |
6499 This test uses lots of local variables, at least | |
6500 as many local variables as main has allocated so far | |
6501 including compiler temporaries. 4 locals are enough for | |
6502 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. | |
6503 A buggy compiler should reuse the register of parent | |
6504 for one of the local variables, since it will think that | |
6505 parent can't possibly be used any more in this routine. | |
6506 Assigning to the local variable will thus munge parent | |
6507 in the parent process. */ | |
6508 pid_t | |
6509 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
6510 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
6511 /* Convince the compiler that p..p7 are live; otherwise, it might | |
6512 use the same hardware register for all 8 local variables. */ | |
6513 if (p != p1 || p != p2 || p != p3 || p != p4 | |
6514 || p != p5 || p != p6 || p != p7) | |
6515 _exit(1); | |
6516 | |
6517 /* On some systems (e.g. IRIX 3.3), | |
6518 vfork doesn't separate parent from child file descriptors. | |
6519 If the child closes a descriptor before it execs or exits, | |
6520 this munges the parent's descriptor as well. | |
6521 Test for this by closing stdout in the child. */ | |
6522 _exit(close(fileno(stdout)) != 0); | |
6523 } else { | |
6524 int status; | |
6525 struct stat st; | |
6526 | |
6527 while (wait(&status) != child) | |
6528 ; | |
6529 exit( | |
6530 /* Was there some problem with vforking? */ | |
6531 child < 0 | |
6532 | |
6533 /* Did the child fail? (This shouldn't happen.) */ | |
6534 || status | |
6535 | |
6536 /* Did the vfork/compiler bug occur? */ | |
6537 || parent != getpid() | |
6538 | |
6539 /* Did the file descriptor bug occur? */ | |
6540 || fstat(fileno(stdout), &st) != 0 | |
6541 ); | |
6542 } | |
6543 } | |
6544 EOF | |
6545 if { (eval echo configure:6546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null | |
6546 then | |
6547 ac_cv_func_vfork_works=yes | |
6548 else | |
6549 echo "configure: failed program was:" >&5 | |
6550 cat conftest.$ac_ext >&5 | |
6551 rm -fr conftest* | |
6552 ac_cv_func_vfork_works=no | |
6553 fi | |
6554 rm -fr conftest* | |
6555 fi | |
6556 | |
6557 fi | |
6558 | |
6559 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 | |
6560 if test $ac_cv_func_vfork_works = no; then | |
6561 cat >> confdefs.h <<\EOF | |
6562 #define vfork fork | |
6563 EOF | |
6564 | |
6565 fi | |
6566 | |
6323 | 6567 |
6324 # Set up the CFLAGS for real compilation, so we can substitute it. | 6568 # Set up the CFLAGS for real compilation, so we can substitute it. |
6325 CFLAGS="$REAL_CFLAGS" | 6569 CFLAGS="$REAL_CFLAGS" |
6326 | 6570 |
6327 #### Find out which version of Emacs this is. | 6571 #### Find out which version of Emacs this is. |