* as.h [NEED_DECLARATION_FFS] (ffs): Prototype and alphabetize.
[deliverable/binutils-gdb.git] / gas / configure
index 9092d4bd997751e7ee4548eddea63fcd28cf8012..62c3df725f902358092121394c71f4407288c590 100755 (executable)
@@ -859,6 +859,7 @@ Optional Features:
   --enable-bfd-assembler  use BFD back end for writing object files
     targets            alternative target configurations besides the primary
   --enable-commonbfdlib   build shared BFD/opcodes/libiberty library
+  --enable-werror    treat compile warnings as errors
   --enable-build-warnings Enable build-time compiler warnings if gcc is used
   --disable-nls           do not use Native Language Support
   --enable-maintainer-mode  enable make rules and dependencies not useful
@@ -3811,7 +3812,7 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
 case $host in
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 3814 "configure"' > conftest.$ac_ext
+  echo '#line 3815 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -4088,6 +4089,26 @@ fi;
 using_cgen=no
 
 build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
+
+# Check whether --enable-werror or --disable-werror was given.
+if test "${enable_werror+set}" = set; then
+  enableval="$enable_werror"
+  case "${enableval}" in
+     yes | y) ERROR_ON_WARNING="yes" ;;
+     no | n)  ERROR_ON_WARNING="no" ;;
+     *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-werror" >&5
+echo "$as_me: error: bad value ${enableval} for --enable-werror" >&2;}
+   { (exit 1); exit 1; }; } ;;
+   esac
+fi;
+
+# Enable -Werror by default, suppressing it only for --disable-werror
+# or --disable-build-warnings.
+if test "${ERROR_ON_WARNING}" != no
+then
+  build_warnings="$build_warnings -Werror"
+fi
+
 # Check whether --enable-build-warnings or --disable-build-warnings was given.
 if test "${enable_build_warnings+set}" = set; then
   enableval="$enable_build_warnings"
@@ -4462,7 +4483,7 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
        ;;
-      ppc-*-linux-gnu*)
+      ppc-*-linux-*)
        case "$endian" in
          big)  ;;
          *)    { { echo "$as_me:$LINENO: error: GNU/Linux must be configured big endian" >&5
@@ -4967,11 +4988,6 @@ _ACEOF
       som)
 cat >>confdefs.h <<\_ACEOF
 #define OBJ_MAYBE_SOM 1
-_ACEOF
-     ;;
-      vms)
-cat >>confdefs.h <<\_ACEOF
-#define OBJ_MAYBE_VMS 1
 _ACEOF
      ;;
     esac
@@ -10428,9 +10444,84 @@ gas_test_headers="
 #endif
 "
 
-echo "$as_me:$LINENO: checking whether declaration is required for strstr" >&5
-echo $ECHO_N "checking whether declaration is required for strstr... $ECHO_C" >&6
-if test "${gas_cv_decl_needed_strstr+set}" = set; then
+# Does errno.h declare errno, or do we have to add a separate declaration
+# for it?
+
+echo "$as_me:$LINENO: checking whether declaration is required for errno" >&5
+echo $ECHO_N "checking whether declaration is required for errno... $ECHO_C" >&6
+if test "${gas_cv_decl_needed_errno+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
+int
+main ()
+{
+
+typedef int f;
+f x;
+x = (f) errno;
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  gas_cv_decl_needed_errno=no
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gas_cv_decl_needed_errno=yes
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $gas_cv_decl_needed_errno" >&5
+echo "${ECHO_T}$gas_cv_decl_needed_errno" >&6
+if test $gas_cv_decl_needed_errno = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define NEED_DECLARATION_ERRNO 1
+_ACEOF
+
+fi
+
+
+
+echo "$as_me:$LINENO: checking whether declaration is required for environ" >&5
+echo $ECHO_N "checking whether declaration is required for environ... $ECHO_C" >&6
+if test "${gas_cv_decl_needed_environ+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -10444,9 +10535,9 @@ int
 main ()
 {
 
-typedef char *(*f)();
+typedef char **f;
 f x;
-x = (f) strstr;
+x = (f) environ;
 
   ;
   return 0;
@@ -10474,30 +10565,30 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  gas_cv_decl_needed_strstr=no
+  gas_cv_decl_needed_environ=no
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-gas_cv_decl_needed_strstr=yes
+gas_cv_decl_needed_environ=yes
 fi
 rm -f conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $gas_cv_decl_needed_strstr" >&5
-echo "${ECHO_T}$gas_cv_decl_needed_strstr" >&6
-if test $gas_cv_decl_needed_strstr = yes; then
+echo "$as_me:$LINENO: result: $gas_cv_decl_needed_environ" >&5
+echo "${ECHO_T}$gas_cv_decl_needed_environ" >&6
+if test $gas_cv_decl_needed_environ = yes; then
 
 cat >>confdefs.h <<\_ACEOF
-#define NEED_DECLARATION_STRSTR 1
+#define NEED_DECLARATION_ENVIRON 1
 _ACEOF
 
 fi
 
 
-echo "$as_me:$LINENO: checking whether declaration is required for malloc" >&5
-echo $ECHO_N "checking whether declaration is required for malloc... $ECHO_C" >&6
-if test "${gas_cv_decl_needed_malloc+set}" = set; then
+echo "$as_me:$LINENO: checking whether declaration is required for ffs" >&5
+echo $ECHO_N "checking whether declaration is required for ffs... $ECHO_C" >&6
+if test "${gas_cv_decl_needed_ffs+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -10511,9 +10602,9 @@ int
 main ()
 {
 
-typedef char *(*f)();
+typedef int (*f)(int);
 f x;
-x = (f) malloc;
+x = (f) ffs;
 
   ;
   return 0;
@@ -10541,22 +10632,22 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  gas_cv_decl_needed_malloc=no
+  gas_cv_decl_needed_ffs=no
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-gas_cv_decl_needed_malloc=yes
+gas_cv_decl_needed_ffs=yes
 fi
 rm -f conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $gas_cv_decl_needed_malloc" >&5
-echo "${ECHO_T}$gas_cv_decl_needed_malloc" >&6
-if test $gas_cv_decl_needed_malloc = yes; then
+echo "$as_me:$LINENO: result: $gas_cv_decl_needed_ffs" >&5
+echo "${ECHO_T}$gas_cv_decl_needed_ffs" >&6
+if test $gas_cv_decl_needed_ffs = yes; then
 
 cat >>confdefs.h <<\_ACEOF
-#define NEED_DECLARATION_MALLOC 1
+#define NEED_DECLARATION_FFS 1
 _ACEOF
 
 fi
@@ -10629,9 +10720,9 @@ _ACEOF
 fi
 
 
-echo "$as_me:$LINENO: checking whether declaration is required for sbrk" >&5
-echo $ECHO_N "checking whether declaration is required for sbrk... $ECHO_C" >&6
-if test "${gas_cv_decl_needed_sbrk+set}" = set; then
+echo "$as_me:$LINENO: checking whether declaration is required for malloc" >&5
+echo $ECHO_N "checking whether declaration is required for malloc... $ECHO_C" >&6
+if test "${gas_cv_decl_needed_malloc+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -10647,7 +10738,7 @@ main ()
 
 typedef char *(*f)();
 f x;
-x = (f) sbrk;
+x = (f) malloc;
 
   ;
   return 0;
@@ -10675,30 +10766,30 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  gas_cv_decl_needed_sbrk=no
+  gas_cv_decl_needed_malloc=no
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-gas_cv_decl_needed_sbrk=yes
+gas_cv_decl_needed_malloc=yes
 fi
 rm -f conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $gas_cv_decl_needed_sbrk" >&5
-echo "${ECHO_T}$gas_cv_decl_needed_sbrk" >&6
-if test $gas_cv_decl_needed_sbrk = yes; then
+echo "$as_me:$LINENO: result: $gas_cv_decl_needed_malloc" >&5
+echo "${ECHO_T}$gas_cv_decl_needed_malloc" >&6
+if test $gas_cv_decl_needed_malloc = yes; then
 
 cat >>confdefs.h <<\_ACEOF
-#define NEED_DECLARATION_SBRK 1
+#define NEED_DECLARATION_MALLOC 1
 _ACEOF
 
 fi
 
 
-echo "$as_me:$LINENO: checking whether declaration is required for environ" >&5
-echo $ECHO_N "checking whether declaration is required for environ... $ECHO_C" >&6
-if test "${gas_cv_decl_needed_environ+set}" = set; then
+echo "$as_me:$LINENO: checking whether declaration is required for sbrk" >&5
+echo $ECHO_N "checking whether declaration is required for sbrk... $ECHO_C" >&6
+if test "${gas_cv_decl_needed_sbrk+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -10712,9 +10803,9 @@ int
 main ()
 {
 
-typedef char **f;
+typedef char *(*f)();
 f x;
-x = (f) environ;
+x = (f) sbrk;
 
   ;
   return 0;
@@ -10742,33 +10833,30 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  gas_cv_decl_needed_environ=no
+  gas_cv_decl_needed_sbrk=no
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-gas_cv_decl_needed_environ=yes
+gas_cv_decl_needed_sbrk=yes
 fi
 rm -f conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $gas_cv_decl_needed_environ" >&5
-echo "${ECHO_T}$gas_cv_decl_needed_environ" >&6
-if test $gas_cv_decl_needed_environ = yes; then
+echo "$as_me:$LINENO: result: $gas_cv_decl_needed_sbrk" >&5
+echo "${ECHO_T}$gas_cv_decl_needed_sbrk" >&6
+if test $gas_cv_decl_needed_sbrk = yes; then
 
 cat >>confdefs.h <<\_ACEOF
-#define NEED_DECLARATION_ENVIRON 1
+#define NEED_DECLARATION_SBRK 1
 _ACEOF
 
 fi
 
 
-# Does errno.h declare errno, or do we have to add a separate declaration
-# for it?
-
-echo "$as_me:$LINENO: checking whether declaration is required for errno" >&5
-echo $ECHO_N "checking whether declaration is required for errno... $ECHO_C" >&6
-if test "${gas_cv_decl_needed_errno+set}" = set; then
+echo "$as_me:$LINENO: checking whether declaration is required for strstr" >&5
+echo $ECHO_N "checking whether declaration is required for strstr... $ECHO_C" >&6
+if test "${gas_cv_decl_needed_strstr+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -10777,18 +10865,14 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
-
+$gas_test_headers
 int
 main ()
 {
 
-typedef int f;
+typedef char *(*f)();
 f x;
-x = (f) errno;
+x = (f) strstr;
 
   ;
   return 0;
@@ -10816,22 +10900,22 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  gas_cv_decl_needed_errno=no
+  gas_cv_decl_needed_strstr=no
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-gas_cv_decl_needed_errno=yes
+gas_cv_decl_needed_strstr=yes
 fi
 rm -f conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $gas_cv_decl_needed_errno" >&5
-echo "${ECHO_T}$gas_cv_decl_needed_errno" >&6
-if test $gas_cv_decl_needed_errno = yes; then
+echo "$as_me:$LINENO: result: $gas_cv_decl_needed_strstr" >&5
+echo "${ECHO_T}$gas_cv_decl_needed_strstr" >&6
+if test $gas_cv_decl_needed_strstr = yes; then
 
 cat >>confdefs.h <<\_ACEOF
-#define NEED_DECLARATION_ERRNO 1
+#define NEED_DECLARATION_STRSTR 1
 _ACEOF
 
 fi
This page took 0.106493 seconds and 4 git commands to generate.