diff options
| author | Chong Yidong | 2006-01-02 18:10:16 +0000 |
|---|---|---|
| committer | Chong Yidong | 2006-01-02 18:10:16 +0000 |
| commit | 01abe918fcabff234ed0cd105bd9e114fbb6a245 (patch) | |
| tree | 0f944095d4f3e42e79d552a95e3971e2464e2e6b | |
| parent | 7e8b9dc3cc466eec23c233b219f73f4e9181bc40 (diff) | |
| download | emacs-01abe918fcabff234ed0cd105bd9e114fbb6a245.tar.gz emacs-01abe918fcabff234ed0cd105bd9e114fbb6a245.zip | |
* configure.in: Use -Wno-pointer-sign if available.
* configure: Regenerate.
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rwxr-xr-x | configure | 109 | ||||
| -rw-r--r-- | configure.in | 19 |
3 files changed, 106 insertions, 27 deletions
| @@ -1,3 +1,8 @@ | |||
| 1 | 2006-01-02 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * configure.in: Use -Wno-pointer-sign if available. | ||
| 4 | * configure: Regenerate. | ||
| 5 | |||
| 1 | 2005-12-29 Andreas Schwab <schwab@suse.de> | 6 | 2005-12-29 Andreas Schwab <schwab@suse.de> |
| 2 | 7 | ||
| 3 | * config.guess, config.sub: Updated from master source. | 8 | * config.guess, config.sub: Updated from master source. |
| @@ -1718,6 +1718,7 @@ case "${canonical}" in | |||
| 1718 | case "${canonical}" in | 1718 | case "${canonical}" in |
| 1719 | alpha*-*-freebsd*) machine=alpha ;; | 1719 | alpha*-*-freebsd*) machine=alpha ;; |
| 1720 | i[3456]86-*-freebsd*) machine=intel386 ;; | 1720 | i[3456]86-*-freebsd*) machine=intel386 ;; |
| 1721 | amd64-*-freebsd*|x86_64-*-freebsd*) machine=amdx86-64 ;; | ||
| 1721 | esac | 1722 | esac |
| 1722 | ;; | 1723 | ;; |
| 1723 | 1724 | ||
| @@ -3667,6 +3668,65 @@ then | |||
| 3667 | CC="$CC $NON_GCC_TEST_OPTIONS" | 3668 | CC="$CC $NON_GCC_TEST_OPTIONS" |
| 3668 | fi | 3669 | fi |
| 3669 | 3670 | ||
| 3671 | ### Use -Wno-pointer-sign if the compiler supports it | ||
| 3672 | echo "$as_me:$LINENO: checking whether gcc understands -Wno-pointer-sign" >&5 | ||
| 3673 | echo $ECHO_N "checking whether gcc understands -Wno-pointer-sign... $ECHO_C" >&6 | ||
| 3674 | SAVE_CFLAGS="$CFLAGS" | ||
| 3675 | CFLAGS="$CFLAGS -Wno-pointer-sign" | ||
| 3676 | |||
| 3677 | cat >conftest.$ac_ext <<_ACEOF | ||
| 3678 | /* confdefs.h. */ | ||
| 3679 | _ACEOF | ||
| 3680 | cat confdefs.h >>conftest.$ac_ext | ||
| 3681 | cat >>conftest.$ac_ext <<_ACEOF | ||
| 3682 | /* end confdefs.h. */ | ||
| 3683 | |||
| 3684 | int | ||
| 3685 | main () | ||
| 3686 | { | ||
| 3687 | |||
| 3688 | ; | ||
| 3689 | return 0; | ||
| 3690 | } | ||
| 3691 | _ACEOF | ||
| 3692 | rm -f conftest.$ac_objext | ||
| 3693 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | ||
| 3694 | (eval $ac_compile) 2>conftest.er1 | ||
| 3695 | ac_status=$? | ||
| 3696 | grep -v '^ *+' conftest.er1 >conftest.err | ||
| 3697 | rm -f conftest.er1 | ||
| 3698 | cat conftest.err >&5 | ||
| 3699 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
| 3700 | (exit $ac_status); } && | ||
| 3701 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
| 3702 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
| 3703 | (eval $ac_try) 2>&5 | ||
| 3704 | ac_status=$? | ||
| 3705 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
| 3706 | (exit $ac_status); }; } && | ||
| 3707 | { ac_try='test -s conftest.$ac_objext' | ||
| 3708 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
| 3709 | (eval $ac_try) 2>&5 | ||
| 3710 | ac_status=$? | ||
| 3711 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
| 3712 | (exit $ac_status); }; }; then | ||
| 3713 | has_option=yes | ||
| 3714 | else | ||
| 3715 | echo "$as_me: failed program was:" >&5 | ||
| 3716 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
| 3717 | |||
| 3718 | has_option=no | ||
| 3719 | fi | ||
| 3720 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | ||
| 3721 | if test $has_option = yes; then | ||
| 3722 | C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH" | ||
| 3723 | fi | ||
| 3724 | echo "$as_me:$LINENO: result: $has_option" >&5 | ||
| 3725 | echo "${ECHO_T}$has_option" >&6 | ||
| 3726 | CFLAGS="$SAVE_CFLAGS" | ||
| 3727 | unset has_option | ||
| 3728 | unset SAVE_CFLAGS | ||
| 3729 | |||
| 3670 | #### Some other nice autoconf tests. | 3730 | #### Some other nice autoconf tests. |
| 3671 | 3731 | ||
| 3672 | echo "$as_me:$LINENO: checking whether ln -s works" >&5 | 3732 | echo "$as_me:$LINENO: checking whether ln -s works" >&5 |
| @@ -4254,7 +4314,6 @@ fi | |||
| 4254 | 4314 | ||
| 4255 | echo "$as_me:$LINENO: checking for -znocombreloc" >&5 | 4315 | echo "$as_me:$LINENO: checking for -znocombreloc" >&5 |
| 4256 | echo $ECHO_N "checking for -znocombreloc... $ECHO_C" >&6 | 4316 | echo $ECHO_N "checking for -znocombreloc... $ECHO_C" >&6 |
| 4257 | |||
| 4258 | cat >conftest.$ac_ext <<_ACEOF | 4317 | cat >conftest.$ac_ext <<_ACEOF |
| 4259 | main(){return 0;} | 4318 | main(){return 0;} |
| 4260 | _ACEOF | 4319 | _ACEOF |
| @@ -4425,6 +4484,10 @@ configure___ use_mmap_for_buffers=no | |||
| 4425 | #endif | 4484 | #endif |
| 4426 | #endif | 4485 | #endif |
| 4427 | 4486 | ||
| 4487 | #ifndef C_WARNINGS_SWITCH | ||
| 4488 | #define C_WARNINGS_SWITCH ${C_WARNINGS_SWITCH} | ||
| 4489 | #endif | ||
| 4490 | |||
| 4428 | #ifndef LD_SWITCH_MACHINE | 4491 | #ifndef LD_SWITCH_MACHINE |
| 4429 | #define LD_SWITCH_MACHINE | 4492 | #define LD_SWITCH_MACHINE |
| 4430 | #endif | 4493 | #endif |
| @@ -4453,7 +4516,7 @@ configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}' | |||
| 4453 | 4516 | ||
| 4454 | /* Get the CFLAGS for real compilation. */ | 4517 | /* Get the CFLAGS for real compilation. */ |
| 4455 | #ifdef __GNUC__ | 4518 | #ifdef __GNUC__ |
| 4456 | configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}' | 4519 | configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH '${SPECIFIED_CFLAGS}' |
| 4457 | #else | 4520 | #else |
| 4458 | configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}' | 4521 | configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}' |
| 4459 | #endif | 4522 | #endif |
| @@ -8009,7 +8072,7 @@ _ACEOF | |||
| 8009 | cat confdefs.h >>conftest.$ac_ext | 8072 | cat confdefs.h >>conftest.$ac_ext |
| 8010 | cat >>conftest.$ac_ext <<_ACEOF | 8073 | cat >>conftest.$ac_ext <<_ACEOF |
| 8011 | /* end confdefs.h. */ | 8074 | /* end confdefs.h. */ |
| 8012 | #include <X11/Xlib.h> | 8075 | #include <X11/Intrinsic.h> |
| 8013 | _ACEOF | 8076 | _ACEOF |
| 8014 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | 8077 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 |
| 8015 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | 8078 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 |
| @@ -8036,7 +8099,7 @@ else | |||
| 8036 | sed 's/^/| /' conftest.$ac_ext >&5 | 8099 | sed 's/^/| /' conftest.$ac_ext >&5 |
| 8037 | 8100 | ||
| 8038 | for ac_dir in $ac_x_header_dirs; do | 8101 | for ac_dir in $ac_x_header_dirs; do |
| 8039 | if test -r "$ac_dir/X11/Xlib.h"; then | 8102 | if test -r "$ac_dir/X11/Intrinsic.h"; then |
| 8040 | ac_x_includes=$ac_dir | 8103 | ac_x_includes=$ac_dir |
| 8041 | break | 8104 | break |
| 8042 | fi | 8105 | fi |
| @@ -8050,18 +8113,18 @@ if test "$ac_x_libraries" = no; then | |||
| 8050 | # See if we find them without any special options. | 8113 | # See if we find them without any special options. |
| 8051 | # Don't add to $LIBS permanently. | 8114 | # Don't add to $LIBS permanently. |
| 8052 | ac_save_LIBS=$LIBS | 8115 | ac_save_LIBS=$LIBS |
| 8053 | LIBS="-lX11 $LIBS" | 8116 | LIBS="-lXt $LIBS" |
| 8054 | cat >conftest.$ac_ext <<_ACEOF | 8117 | cat >conftest.$ac_ext <<_ACEOF |
| 8055 | /* confdefs.h. */ | 8118 | /* confdefs.h. */ |
| 8056 | _ACEOF | 8119 | _ACEOF |
| 8057 | cat confdefs.h >>conftest.$ac_ext | 8120 | cat confdefs.h >>conftest.$ac_ext |
| 8058 | cat >>conftest.$ac_ext <<_ACEOF | 8121 | cat >>conftest.$ac_ext <<_ACEOF |
| 8059 | /* end confdefs.h. */ | 8122 | /* end confdefs.h. */ |
| 8060 | #include <X11/Xlib.h> | 8123 | #include <X11/Intrinsic.h> |
| 8061 | int | 8124 | int |
| 8062 | main () | 8125 | main () |
| 8063 | { | 8126 | { |
| 8064 | XrmInitialize () | 8127 | XtMalloc (0) |
| 8065 | ; | 8128 | ; |
| 8066 | return 0; | 8129 | return 0; |
| 8067 | } | 8130 | } |
| @@ -8099,7 +8162,7 @@ for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` | |||
| 8099 | do | 8162 | do |
| 8100 | # Don't even attempt the hair of trying to link an X program! | 8163 | # Don't even attempt the hair of trying to link an X program! |
| 8101 | for ac_extension in a so sl; do | 8164 | for ac_extension in a so sl; do |
| 8102 | if test -r $ac_dir/libX11.$ac_extension; then | 8165 | if test -r $ac_dir/libXt.$ac_extension; then |
| 8103 | ac_x_libraries=$ac_dir | 8166 | ac_x_libraries=$ac_dir |
| 8104 | break 2 | 8167 | break 2 |
| 8105 | fi | 8168 | fi |
| @@ -21708,24 +21771,18 @@ else | |||
| 21708 | ac_cv_func_fork_works=cross | 21771 | ac_cv_func_fork_works=cross |
| 21709 | else | 21772 | else |
| 21710 | cat >conftest.$ac_ext <<_ACEOF | 21773 | cat >conftest.$ac_ext <<_ACEOF |
| 21711 | /* confdefs.h. */ | 21774 | /* By Ruediger Kuhlmann. */ |
| 21712 | _ACEOF | 21775 | #include <sys/types.h> |
| 21713 | cat confdefs.h >>conftest.$ac_ext | 21776 | #if HAVE_UNISTD_H |
| 21714 | cat >>conftest.$ac_ext <<_ACEOF | 21777 | # include <unistd.h> |
| 21715 | /* end confdefs.h. */ | 21778 | #endif |
| 21716 | $ac_includes_default | 21779 | /* Some systems only have a dummy stub for fork() */ |
| 21717 | int | 21780 | int main () |
| 21718 | main () | 21781 | { |
| 21719 | { | 21782 | if (fork() < 0) |
| 21720 | 21783 | exit (1); | |
| 21721 | /* By Ruediger Kuhlmann. */ | 21784 | exit (0); |
| 21722 | if (fork() < 0) | 21785 | } |
| 21723 | exit (1); | ||
| 21724 | exit (0); | ||
| 21725 | |||
| 21726 | ; | ||
| 21727 | return 0; | ||
| 21728 | } | ||
| 21729 | _ACEOF | 21786 | _ACEOF |
| 21730 | rm -f conftest$ac_exeext | 21787 | rm -f conftest$ac_exeext |
| 21731 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | 21788 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
diff --git a/configure.in b/configure.in index b9d2b469f59..9303dd71f03 100644 --- a/configure.in +++ b/configure.in | |||
| @@ -1261,6 +1261,19 @@ then | |||
| 1261 | CC="$CC $NON_GCC_TEST_OPTIONS" | 1261 | CC="$CC $NON_GCC_TEST_OPTIONS" |
| 1262 | fi | 1262 | fi |
| 1263 | 1263 | ||
| 1264 | ### Use -Wno-pointer-sign if the compiler supports it | ||
| 1265 | AC_MSG_CHECKING([whether gcc understands -Wno-pointer-sign]) | ||
| 1266 | SAVE_CFLAGS="$CFLAGS" | ||
| 1267 | CFLAGS="$CFLAGS -Wno-pointer-sign" | ||
| 1268 | AC_TRY_COMPILE([], [], has_option=yes, has_option=no,) | ||
| 1269 | if test $has_option = yes; then | ||
| 1270 | C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH" | ||
| 1271 | fi | ||
| 1272 | AC_MSG_RESULT($has_option) | ||
| 1273 | CFLAGS="$SAVE_CFLAGS" | ||
| 1274 | unset has_option | ||
| 1275 | unset SAVE_CFLAGS | ||
| 1276 | |||
| 1264 | #### Some other nice autoconf tests. | 1277 | #### Some other nice autoconf tests. |
| 1265 | 1278 | ||
| 1266 | dnl checks for programs | 1279 | dnl checks for programs |
| @@ -1394,6 +1407,10 @@ configure___ use_mmap_for_buffers=no | |||
| 1394 | #endif | 1407 | #endif |
| 1395 | #endif | 1408 | #endif |
| 1396 | 1409 | ||
| 1410 | #ifndef C_WARNINGS_SWITCH | ||
| 1411 | #define C_WARNINGS_SWITCH ${C_WARNINGS_SWITCH} | ||
| 1412 | #endif | ||
| 1413 | |||
| 1397 | #ifndef LD_SWITCH_MACHINE | 1414 | #ifndef LD_SWITCH_MACHINE |
| 1398 | #define LD_SWITCH_MACHINE | 1415 | #define LD_SWITCH_MACHINE |
| 1399 | #endif | 1416 | #endif |
| @@ -1422,7 +1439,7 @@ configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}' | |||
| 1422 | 1439 | ||
| 1423 | /* Get the CFLAGS for real compilation. */ | 1440 | /* Get the CFLAGS for real compilation. */ |
| 1424 | #ifdef __GNUC__ | 1441 | #ifdef __GNUC__ |
| 1425 | configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}' | 1442 | configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH '${SPECIFIED_CFLAGS}' |
| 1426 | #else | 1443 | #else |
| 1427 | configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}' | 1444 | configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}' |
| 1428 | #endif | 1445 | #endif |