aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1999-07-18 21:02:56 +0000
committerBruce Momjian <bruce@momjian.us>1999-07-18 21:02:56 +0000
commitcb08547646072db415e9ccd99bac5c02fff63784 (patch)
tree8fbb92f2e2b270b8043f4c43c03da395ec1395b6
parent0b976ec1d8b8d96122a3a4aef026965f7adee3c1 (diff)
downloadpostgresql-cb08547646072db415e9ccd99bac5c02fff63784.tar.gz
postgresql-cb08547646072db415e9ccd99bac5c02fff63784.zip
Add getopt test.
-rw-r--r--src/configure.in1
-rw-r--r--src/include/config.h.in3
-rw-r--r--src/interfaces/ecpg/preproc/ecpg.c2
3 files changed, 6 insertions, 0 deletions
diff --git a/src/configure.in b/src/configure.in
index 1cdb1476067..89bbaaa81fe 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -582,6 +582,7 @@ AC_CHECK_HEADERS(dld.h)
AC_CHECK_HEADERS(endian.h)
AC_CHECK_HEADERS(float.h)
AC_CHECK_HEADERS(fp_class.h)
+AC_CHECK_HEADERS(getopt.h)
AC_CHECK_HEADERS(history.h)
AC_CHECK_HEADERS(ieeefp.h)
AC_CHECK_HEADERS(limits.h)
diff --git a/src/include/config.h.in b/src/include/config.h.in
index 6bb03462c83..5bf092c2220 100644
--- a/src/include/config.h.in
+++ b/src/include/config.h.in
@@ -235,6 +235,9 @@
/* Set to 1 if you have <fp_class.h> */
#undef HAVE_FP_CLASS_H
+/* Set to 1 if you have <fp_class.h> */
+#undef HAVE_GETOPT
+
/* Set to 1 if you have <history.h> */
#undef HAVE_HISTORY_H
diff --git a/src/interfaces/ecpg/preproc/ecpg.c b/src/interfaces/ecpg/preproc/ecpg.c
index 968293aaf65..7d1978c8341 100644
--- a/src/interfaces/ecpg/preproc/ecpg.c
+++ b/src/interfaces/ecpg/preproc/ecpg.c
@@ -4,7 +4,9 @@
#include "postgres.h"
+#ifdef HAVE_GETOPT_H
#include <getopt.h>
+#endif
#include <unistd.h>
extern int optind;
extern char *optarg;