Browse Source

check for getopt.h

David Rose 22 years ago
parent
commit
5c45230137

+ 3 - 0
dtool/Config.Irix.pp

@@ -39,6 +39,9 @@
 #define HAVE_GETOPT 1
 #define HAVE_GETOPT 1
 #define HAVE_GETOPT_LONG_ONLY
 #define HAVE_GETOPT_LONG_ONLY
 
 
+// Are the above getopt() functions defined in getopt.h, or somewhere else?
+#define HAVE_GETOPT_H 1
+
 // Can we determine the terminal width by making an ioctl(TIOCGWINSZ) call?
 // Can we determine the terminal width by making an ioctl(TIOCGWINSZ) call?
 #define IOCTL_TERMINAL_WIDTH 1
 #define IOCTL_TERMINAL_WIDTH 1
 
 

+ 3 - 0
dtool/Config.Linux.pp

@@ -42,6 +42,9 @@
 #define HAVE_GETOPT 1
 #define HAVE_GETOPT 1
 #define HAVE_GETOPT_LONG_ONLY 1
 #define HAVE_GETOPT_LONG_ONLY 1
 
 
+// Are the above getopt() functions defined in getopt.h, or somewhere else?
+#define HAVE_GETOPT_H 1
+
 // Can we determine the terminal width by making an ioctl(TIOCGWINSZ) call?
 // Can we determine the terminal width by making an ioctl(TIOCGWINSZ) call?
 #define IOCTL_TERMINAL_WIDTH 1
 #define IOCTL_TERMINAL_WIDTH 1
 
 

+ 3 - 0
dtool/Config.Win32.pp

@@ -42,6 +42,9 @@
 #define HAVE_GETOPT
 #define HAVE_GETOPT
 #define HAVE_GETOPT_LONG_ONLY
 #define HAVE_GETOPT_LONG_ONLY
 
 
+// Are the above getopt() functions defined in getopt.h, or somewhere else?
+#define HAVE_GETOPT_H
+
 // Can we determine the terminal width by making an ioctl(TIOCGWINSZ) call?
 // Can we determine the terminal width by making an ioctl(TIOCGWINSZ) call?
 #define IOCTL_TERMINAL_WIDTH
 #define IOCTL_TERMINAL_WIDTH
 
 

+ 3 - 0
dtool/LocalSetup.pp

@@ -173,6 +173,9 @@ $[cdefine HAVE_GETOPT]
 /* Define if you have the getopt_long_only function.  */
 /* Define if you have the getopt_long_only function.  */
 $[cdefine HAVE_GETOPT_LONG_ONLY]
 $[cdefine HAVE_GETOPT_LONG_ONLY]
 
 
+/* Define if getopt appears in getopt.h.  */
+$[cdefine HAVE_GETOPT_H]
+
 /* Define if you have ioctl(TIOCGWINSZ) to determine terminal width. */
 /* Define if you have ioctl(TIOCGWINSZ) to determine terminal width. */
 $[cdefine IOCTL_TERMINAL_WIDTH]
 $[cdefine IOCTL_TERMINAL_WIDTH]
 
 

+ 0 - 1
dtool/src/dtoolbase/dtoolbase.h

@@ -113,7 +113,6 @@
 #include <sys/time.h>
 #include <sys/time.h>
 #endif
 #endif
 
 
-
 #ifdef CPPPARSER
 #ifdef CPPPARSER
 #include <stdtypedefs.h>
 #include <stdtypedefs.h>
 #endif
 #endif

+ 7 - 5
dtool/src/interrogate/interrogate.cxx

@@ -19,17 +19,19 @@
 #include "interrogate.h"
 #include "interrogate.h"
 #include "interrogateBuilder.h"
 #include "interrogateBuilder.h"
 
 
-#include <interrogateDatabase.h>
-#include <cppGlobals.h>
-#include <notify.h>
+#include "interrogateDatabase.h"
+#include "cppGlobals.h"
+#include "notify.h"
 #include <time.h>
 #include <time.h>
 
 
 // If our system getopt() doesn't come with getopt_long_only(), then use
 // If our system getopt() doesn't come with getopt_long_only(), then use
 // the GNU flavor that we've got in tool for this purpose.
 // the GNU flavor that we've got in tool for this purpose.
 #ifndef HAVE_GETOPT_LONG_ONLY
 #ifndef HAVE_GETOPT_LONG_ONLY
-#include <gnu_getopt.h>
+#include "gnu_getopt.h"
 #else
 #else
-#include <getopt.h>
+  #ifdef HAVE_GETOPT_H
+    #include <getopt.h>
+  #endif
 #endif
 #endif
 
 
 CPPParser parser;
 CPPParser parser;

+ 4 - 4
dtool/src/interrogate/interrogate.h

@@ -19,11 +19,11 @@
 #ifndef INTERROGATE_H
 #ifndef INTERROGATE_H
 #define INTERROGATE_H
 #define INTERROGATE_H
 
 
-#include <dtoolbase.h>
+#include "dtoolbase.h"
 
 
-#include <cppParser.h>
-#include <cppVisibility.h>
-#include <filename.h>
+#include "cppParser.h"
+#include "cppVisibility.h"
+#include "filename.h"
 
 
 extern CPPParser parser;
 extern CPPParser parser;
 
 

+ 1 - 1
ppremake/configure.in

@@ -42,7 +42,7 @@ AC_SUBST(libm)
 
 
 dnl Checks for header files.
 dnl Checks for header files.
 AC_HEADER_STDC
 AC_HEADER_STDC
-AC_CHECK_HEADERS(malloc.h alloca.h unistd.h utime.h io.h minmax.h dirent.h sys/types.h sys/time.h sys/utime.h sys/wait.h string.h regex.h)
+AC_CHECK_HEADERS(malloc.h alloca.h unistd.h utime.h io.h minmax.h dirent.h sys/types.h sys/time.h sys/utime.h sys/wait.h string.h regex.h getopt.h)
 
 
 dnl Checks for typedefs, structures, and compiler characteristics.
 dnl Checks for typedefs, structures, and compiler characteristics.
 
 

+ 3 - 1
ppremake/ppremake.cxx

@@ -11,10 +11,12 @@
 #include "sedProcess.h"
 #include "sedProcess.h"
 
 
 #ifdef HAVE_GETOPT
 #ifdef HAVE_GETOPT
+#ifdef HAVE_GETOPT_H
 #include <getopt.h>
 #include <getopt.h>
+#endif  // HAVE_GETOPT_H
 #else
 #else
 #include "gnu_getopt.h"
 #include "gnu_getopt.h"
-#endif
+#endif  // HAVE_GETOPT
 
 
 #ifdef HAVE_UNISTD_H
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #include <unistd.h>