diff options
author | Nick Clifton <nickc@redhat.com> | 2005-04-01 12:56:29 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2005-04-01 12:56:29 +0000 |
commit | 56f366632f0e421203234f1958ae114180790776 (patch) | |
tree | e47c6bd28ce23cd97ab182cdb42164c891e132ad /gas/configure.in | |
parent | 8a75718cb7f23c07475908ba2cb05aa06d757b6d (diff) | |
download | gdb-56f366632f0e421203234f1958ae114180790776.zip gdb-56f366632f0e421203234f1958ae114180790776.tar.gz gdb-56f366632f0e421203234f1958ae114180790776.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 'gas/configure.in')
-rw-r--r-- | gas/configure.in | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gas/configure.in b/gas/configure.in index 790a8f2..1f77be3 100644 --- a/gas/configure.in +++ b/gas/configure.in @@ -716,6 +716,16 @@ GAS_CHECK_DECL_NEEDED(errno, f, int f, [ #endif ]) +AC_MSG_CHECKING(for a known getopt prototype in unistd.h) +AC_CACHE_VAL(gas_cv_decl_getopt_unistd_h, +[AC_TRY_COMPILE([#include <unistd.h>], [extern int getopt (int, char *const*, const char *);], +gas_cv_decl_getopt_unistd_h=yes, gas_cv_decl_getopt_unistd_h=no)]) +AC_MSG_RESULT($gas_cv_decl_getopt_unistd_h) +if test $gas_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 + GAS_CHECK_DECL_NEEDED(environ, f, char **f, $gas_test_headers) GAS_CHECK_DECL_NEEDED(ffs, f, int (*f)(int), $gas_test_headers) GAS_CHECK_DECL_NEEDED(free, f, void (*f)(), $gas_test_headers) |