summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorTom Lane2010-12-16 04:50:41 +0000
committerTom Lane2010-12-16 04:50:41 +0000
commit5cdd65f3241ce10c66953228daef60df7b3966d1 (patch)
treeea8cab37764b7a3eed1a5d9ae5946e145fc35527 /configure
parent2a6ebe70fb2f7ec97a08dc07214fe2ca571d2780 (diff)
Fix up getopt() reset management so it works on recent mingw.
The mingw people don't appear to care about compatibility with non-GNU versions of getopt, so force use of our own copy of getopt on Windows. Also, ensure that we make use of optreset when using our own copy. Per report from Andrew Dunstan. Back-patch to all versions supported on Windows.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure25
1 files changed, 21 insertions, 4 deletions
diff --git a/configure b/configure
index 08fd1c8443a..51d27d8c7d0 100755
--- a/configure
+++ b/configure
@@ -20758,6 +20758,23 @@ esac
fi
+# mingw has adopted a GNU-centric interpretation of optind/optreset,
+# so always use our version on Windows.
+if test "$PORTNAME" = "win32"; then
+ case " $LIBOBJS " in
+ *" getopt.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
+ ;;
+esac
+
+ case " $LIBOBJS " in
+ *" getopt_long.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
+ ;;
+esac
+
+fi
+
# Cygwin's erand48() is broken (always returns zero) in some releases,
# so force use of ours.
if test "$PORTNAME" = "cygwin"; then
@@ -20880,25 +20897,25 @@ fi
done
-case " $LIBOBJS " in
+ case " $LIBOBJS " in
*" kill.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS kill.$ac_objext"
;;
esac
-case " $LIBOBJS " in
+ case " $LIBOBJS " in
*" open.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS open.$ac_objext"
;;
esac
-case " $LIBOBJS " in
+ case " $LIBOBJS " in
*" win32env.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS win32env.$ac_objext"
;;
esac
-case " $LIBOBJS " in
+ case " $LIBOBJS " in
*" win32error.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS win32error.$ac_objext"
;;