diff options
author | Nick Clifton <nickc@redhat.com> | 2005-03-31 14:40:41 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2005-03-31 14:40:41 +0000 |
commit | bd4f7a8f3985986b4f3d9df49310053a92eaa81f (patch) | |
tree | b26c5ce3ead3be03a9050f3db35f8f7318c8a8a0 /binutils/configure.in | |
parent | 8b12f024350c7a1413ae1b1e09cff892dd62c6e3 (diff) | |
download | binutils-redhat-bd4f7a8f3985986b4f3d9df49310053a92eaa81f.tar.gz |
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.in | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/binutils/configure.in b/binutils/configure.in index 767d237f9b..0a03811272 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]) |