aboutsummaryrefslogtreecommitdiff
path: root/binutils/configure.in
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2005-03-31 14:40:41 +0000
committerNick Clifton <nickc@redhat.com>2005-03-31 14:40:41 +0000
commite46eba98aea90cf780f66f7633c2e3417a2a6a76 (patch)
tree900100573fb8f51fda9d16b32f47e780a2ea4d23 /binutils/configure.in
parent0f2d00bca88a013fcd12d7a09ddb3a5bde378322 (diff)
downloadfsf-binutils-gdb-e46eba98aea90cf780f66f7633c2e3417a2a6a76.zip
fsf-binutils-gdb-e46eba98aea90cf780f66f7633c2e3417a2a6a76.tar.gz
fsf-binutils-gdb-e46eba98aea90cf780f66f7633c2e3417a2a6a76.tar.bz2
Add a check for <unistd.h> providing a prototype for getopt() which is compatible
with the one in include/getopt.h. If so then define HAVE_DECL_GETOPT.
Diffstat (limited to 'binutils/configure.in')
-rw-r--r--binutils/configure.in10
1 files changed, 10 insertions, 0 deletions
diff --git a/binutils/configure.in b/binutils/configure.in
index 767d237..0a03811 100644
--- a/binutils/configure.in
+++ b/binutils/configure.in
@@ -180,6 +180,16 @@ if test $bu_cv_decl_time_t_types_h = yes; then
[Is the type time_t defined in <sys/types.h>?])
fi
+AC_MSG_CHECKING(for a known getopt prototype in unistd.h)
+AC_CACHE_VAL(bu_cv_decl_getopt_unistd_h,
+[AC_TRY_COMPILE([#include <unistd.h>], [extern int getopt (int, char *const*, const char *);],
+bu_cv_decl_getopt_unistd_h=yes, bu_cv_decl_getopt_unistd_h=no)])
+AC_MSG_RESULT($bu_cv_decl_getopt_unistd_h)
+if test $bu_cv_decl_getopt_unistd_h = yes; then
+ AC_DEFINE([HAVE_DECL_GETOPT], 1,
+ [Is the prototype for getopt in <unistd.h> in the expected format?])
+fi
+
# Under Next 3.2 <utime.h> apparently does not define struct utimbuf
# by default.
AC_MSG_CHECKING([for utime.h])