tweaks to allow both mingw32{gcc-2.8.1,egcs-1.0.2} build and test
Gurusamy Sarathy [Sat, 20 Jun 1998 23:15:41 +0000 (23:15 +0000)]
p4raw-id: //depot/perl@1163

ext/POSIX/POSIX.xs
win32/Makefile
win32/makefile.mk

index a4fd52e..41c6ba3 100644 (file)
@@ -275,7 +275,7 @@ unsigned long strtoul _((const char *, char **, int));
 extern char *tzname[];
 #  endif
 #else
-#if !defined(__GNUC__) && !defined(tzname)
+#if !defined(WIN32) || (defined(__MINGW32__) && !defined(tzname))
 char *tzname[] = { "" , "" };
 #endif
 #endif
index d315882..60eda26 100644 (file)
@@ -67,6 +67,11 @@ CCINCDIR     = $(CCHOME)\include
 CCLIBDIR       = $(CCHOME)\lib
 
 #
+# specify space-separated list of extra directories to look for libraries
+#
+EXTRALIBDIRS   =
+
+#
 # set this to your email address (perl will guess a value from
 # from your loginname and your hostname, which may not be right)
 #EMAIL         = 
@@ -468,7 +473,7 @@ CFG_VARS    =                                       \
                "libs=$(LIBFILES)"                      \
                "incpath=$(CCINCDIR)"                   \
                "libperl=$(PERLIMPLIB)"                 \
-               "libpth=$(CCLIBDIR)"                    \
+               "libpth=$(CCLIBDIR) $(EXTRALIBDIRS)"    \
                "libc=$(LIBC)"                          \
                "make=nmake"                            \
                "static_ext=$(STATIC_EXT)"              \
index d41d588..68f2180 100644 (file)
@@ -74,6 +74,11 @@ CCINCDIR     *= $(CCHOME)\include
 CCLIBDIR       *= $(CCHOME)\lib
 
 #
+# specify space-separated list of extra directories to look for libraries
+#
+EXTRALIBDIRS   *=
+
+#
 # set this to point to cmd.exe (only needed if you use some
 # alternate shell that doesn't grok cmd.exe style commands)
 #SHELL         *= g:\winnt\system32\cmd.exe
@@ -155,15 +160,15 @@ LINK_DBG  =
 
 CFLAGS         = -w -d -tWM -tWD $(INCLUDES) $(DEFINES) $(LOCDEFS) \
                $(PCHFLAGS) $(OPTIMIZE)
-LINK_FLAGS     = $(LINK_DBG) -L$(CCLIBDIR)
+LINK_FLAGS     = $(LINK_DBG) -L$(CCLIBDIR) $(EXTRALIBDIRS:^"-L")
 OBJOUT_FLAG    = -o
 EXEOUT_FLAG    = -e
 LIBOUT_FLAG    = 
 
 .ELIF "$(CCTYPE)" == "GCC"
 
-CC             = gcc 
-LINK32         = gcc 
+CC             = gcc -pipe
+LINK32         = gcc -pipe
 LIB32          = ar rc
 IMPLIB         = dlltool
 
@@ -193,7 +198,7 @@ LINK_DBG    =
 .ENDIF
 
 CFLAGS         = $(INCLUDES) $(DEFINES) $(LOCDEFS) $(OPTIMIZE)
-LINK_FLAGS     = $(LINK_DBG) -L$(CCLIBDIR)
+LINK_FLAGS     = $(LINK_DBG) -L$(CCLIBDIR) $(EXTRALIBDIRS:^"-L")
 OBJOUT_FLAG    = -o
 EXEOUT_FLAG    = -o
 LIBOUT_FLAG    = 
@@ -578,7 +583,7 @@ CFG_VARS    =                                       \
                "libs=$(LIBFILES:f)"                    \
                "incpath=$(CCINCDIR)"                   \
                "libperl=$(PERLIMPLIB:f)"               \
-               "libpth=$(strip $(CCLIBDIR) $(LIBFILES:d))" \
+               "libpth=$(strip $(CCLIBDIR) $(EXTRALIBDIRS) $(LIBFILES:d))" \
                "libc=$(LIBC)"                          \
                "make=dmake"                            \
                "_o=$(o)" "obj_ext=$(o)"                \