Don't build getopt at all if it's not needed.
diff --git a/libs/port/getopt.c b/libs/port/getopt.c index cfc1a8f..949389a 100644 --- a/libs/port/getopt.c +++ b/libs/port/getopt.c
@@ -33,6 +33,10 @@ # include <config.h> #endif +#ifdef HAVE_GETOPT_LONG +#define ELIDE_CODE +#endif + #if !defined __STDC__ || !__STDC__ /* This is a separate conditional since some stdc systems reject `defined (const)'. */
diff --git a/libs/port/getopt1.c b/libs/port/getopt1.c index 5a629ef..be4b1d1 100644 --- a/libs/port/getopt1.c +++ b/libs/port/getopt1.c
@@ -24,6 +24,10 @@ #include <config.h> #endif +#ifdef HAVE_GETOPT_LONG +#define ELIDE_CODE +#endif + #ifdef _LIBC # include <getopt.h> #else