From: Gurusamy Sarathy Date: Sat, 20 Jun 1998 23:15:41 +0000 (+0000) Subject: tweaks to allow both mingw32{gcc-2.8.1,egcs-1.0.2} build and test X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fa4efe8e185f853b396be995a5d8d97c8d245e03;p=p5sagit%2Fp5-mst-13.2.git tweaks to allow both mingw32{gcc-2.8.1,egcs-1.0.2} build and test p4raw-id: //depot/perl@1163 --- diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index a4fd52e..41c6ba3 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -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 diff --git a/win32/Makefile b/win32/Makefile index d315882..60eda26 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -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)" \ diff --git a/win32/makefile.mk b/win32/makefile.mk index d41d588..68f2180 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -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)" \