aboutsummaryrefslogtreecommitdiff
path: root/gprof/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'gprof/configure.in')
-rw-r--r--gprof/configure.in10
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,