diff options
author | Nick Clifton <nickc@redhat.com> | 2005-04-04 11:27:16 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2005-04-04 11:27:16 +0000 |
commit | 34875e6487738a81c2b09979b804556bc8ea885b (patch) | |
tree | 35f8536360eb5884dbf3706d1a550ee0f933acdf /gprof/configure.in | |
parent | 661f7c357e34dee7936489da7a385c29a1343d02 (diff) | |
download | gdb-34875e6487738a81c2b09979b804556bc8ea885b.zip gdb-34875e6487738a81c2b09979b804556bc8ea885b.tar.gz gdb-34875e6487738a81c2b09979b804556bc8ea885b.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 'gprof/configure.in')
-rw-r--r-- | gprof/configure.in | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gprof/configure.in b/gprof/configure.in index 01dd81f..e130b0d 100644 --- a/gprof/configure.in +++ b/gprof/configure.in @@ -32,6 +32,16 @@ AC_EXEEXT AC_CHECK_HEADERS(sys/gmon_out.h) +AC_MSG_CHECKING(for a known getopt prototype in unistd.h) +AC_CACHE_VAL(gprof_cv_decl_getopt_unistd_h, +[AC_TRY_COMPILE([#include <unistd.h>], [extern int getopt (int, char *const*, const char *);], +gprof_cv_decl_getopt_unistd_h=yes, gprof_cv_decl_getopt_unistd_h=no)]) +AC_MSG_RESULT($gprof_cv_decl_getopt_unistd_h) +if test $gprof_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 + build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" AC_ARG_ENABLE(werror, |