aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2006-01-02 18:10:16 +0000
committerChong Yidong2006-01-02 18:10:16 +0000
commit01abe918fcabff234ed0cd105bd9e114fbb6a245 (patch)
tree0f944095d4f3e42e79d552a95e3971e2464e2e6b
parent7e8b9dc3cc466eec23c233b219f73f4e9181bc40 (diff)
downloademacs-01abe918fcabff234ed0cd105bd9e114fbb6a245.tar.gz
emacs-01abe918fcabff234ed0cd105bd9e114fbb6a245.zip
* configure.in: Use -Wno-pointer-sign if available.
* configure: Regenerate.
-rw-r--r--ChangeLog5
-rwxr-xr-xconfigure109
-rw-r--r--configure.in19
3 files changed, 106 insertions, 27 deletions
diff --git a/ChangeLog b/ChangeLog
index 18676cf7197..fdd821d8268 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
12006-01-02 Chong Yidong <cyd@stupidchicken.com>
2
3 * configure.in: Use -Wno-pointer-sign if available.
4 * configure: Regenerate.
5
12005-12-29 Andreas Schwab <schwab@suse.de> 62005-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.
diff --git a/configure b/configure
index 1cf5f21d0b2..a4dd346af8e 100755
--- a/configure
+++ b/configure
@@ -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"
3668fi 3669fi
3669 3670
3671### Use -Wno-pointer-sign if the compiler supports it
3672echo "$as_me:$LINENO: checking whether gcc understands -Wno-pointer-sign" >&5
3673echo $ECHO_N "checking whether gcc understands -Wno-pointer-sign... $ECHO_C" >&6
3674SAVE_CFLAGS="$CFLAGS"
3675CFLAGS="$CFLAGS -Wno-pointer-sign"
3676
3677cat >conftest.$ac_ext <<_ACEOF
3678/* confdefs.h. */
3679_ACEOF
3680cat confdefs.h >>conftest.$ac_ext
3681cat >>conftest.$ac_ext <<_ACEOF
3682/* end confdefs.h. */
3683
3684int
3685main ()
3686{
3687
3688 ;
3689 return 0;
3690}
3691_ACEOF
3692rm -f conftest.$ac_objext
3693if { (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
3714else
3715 echo "$as_me: failed program was:" >&5
3716sed 's/^/| /' conftest.$ac_ext >&5
3717
3718has_option=no
3719fi
3720rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3721if test $has_option = yes; then
3722 C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
3723fi
3724echo "$as_me:$LINENO: result: $has_option" >&5
3725echo "${ECHO_T}$has_option" >&6
3726CFLAGS="$SAVE_CFLAGS"
3727unset has_option
3728unset SAVE_CFLAGS
3729
3670#### Some other nice autoconf tests. 3730#### Some other nice autoconf tests.
3671 3731
3672echo "$as_me:$LINENO: checking whether ln -s works" >&5 3732echo "$as_me:$LINENO: checking whether ln -s works" >&5
@@ -4254,7 +4314,6 @@ fi
4254 4314
4255echo "$as_me:$LINENO: checking for -znocombreloc" >&5 4315echo "$as_me:$LINENO: checking for -znocombreloc" >&5
4256echo $ECHO_N "checking for -znocombreloc... $ECHO_C" >&6 4316echo $ECHO_N "checking for -znocombreloc... $ECHO_C" >&6
4257
4258cat >conftest.$ac_ext <<_ACEOF 4317cat >conftest.$ac_ext <<_ACEOF
4259main(){return 0;} 4318main(){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__
4456configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}' 4519configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH '${SPECIFIED_CFLAGS}'
4457#else 4520#else
4458configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}' 4521configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
4459#endif 4522#endif
@@ -8009,7 +8072,7 @@ _ACEOF
8009cat confdefs.h >>conftest.$ac_ext 8072cat confdefs.h >>conftest.$ac_ext
8010cat >>conftest.$ac_ext <<_ACEOF 8073cat >>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
8014if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 8077if { (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
8036sed 's/^/| /' conftest.$ac_ext >&5 8099sed '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
8057cat confdefs.h >>conftest.$ac_ext 8120cat confdefs.h >>conftest.$ac_ext
8058cat >>conftest.$ac_ext <<_ACEOF 8121cat >>conftest.$ac_ext <<_ACEOF
8059/* end confdefs.h. */ 8122/* end confdefs.h. */
8060#include <X11/Xlib.h> 8123#include <X11/Intrinsic.h>
8061int 8124int
8062main () 8125main ()
8063{ 8126{
8064XrmInitialize () 8127XtMalloc (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`
8099do 8162do
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
21709else 21772else
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>
21713cat confdefs.h >>conftest.$ac_ext 21776 #if HAVE_UNISTD_H
21714cat >>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() */
21717int 21780 int main ()
21718main () 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
21730rm -f conftest$ac_exeext 21787rm -f conftest$ac_exeext
21731if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 21788if { (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"
1262fi 1262fi
1263 1263
1264### Use -Wno-pointer-sign if the compiler supports it
1265AC_MSG_CHECKING([whether gcc understands -Wno-pointer-sign])
1266SAVE_CFLAGS="$CFLAGS"
1267CFLAGS="$CFLAGS -Wno-pointer-sign"
1268AC_TRY_COMPILE([], [], has_option=yes, has_option=no,)
1269if test $has_option = yes; then
1270 C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
1271fi
1272AC_MSG_RESULT($has_option)
1273CFLAGS="$SAVE_CFLAGS"
1274unset has_option
1275unset SAVE_CFLAGS
1276
1264#### Some other nice autoconf tests. 1277#### Some other nice autoconf tests.
1265 1278
1266dnl checks for programs 1279dnl 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__
1425configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}' 1442configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH '${SPECIFIED_CFLAGS}'
1426#else 1443#else
1427configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}' 1444configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
1428#endif 1445#endif