Simplify nmake configuration for building port directory. Now there

is only one boolean setting to enable building strtoll() and strtoull()
port functions.  The boolean setting enables the necessary port files
to be built, but the remainder of the logic is via pre-processor code
in the common tif_config.h, which was prepared before entering the
port directory to do a build.
This commit is contained in:
Bob Friesenhahn 2020-01-29 08:03:39 -06:00
parent ed3b07c4e2
commit 7a335a32eb
3 changed files with 18 additions and 11 deletions

View File

@ -110,12 +110,9 @@ CHECK_JPEG_YCBCR_SUBSAMPLING = 1
#
# Indicate if the compiler provides strtol/strtoul/strtoll/strtoull.
# Users of MSVC++ 14.0 ("Visual Studio 2015") and later should set all of these to 1
HAVE_STRTOL = 1
HAVE_STRTOUL = 1
HAVE_STRTOLL = 0
HAVE_STRTOULL = 0
# Indicate if the compiler provides strtoll/strtoull (default 1)
# Users of MSVC++ 14.0 ("Visual Studio 2015") and later should set this to 1
HAVE_STRTOLL = 1
#
# Pick debug or optimized build flags. We default to an optimized build
@ -148,7 +145,7 @@ LD = link /nologo
CFLAGS = $(OPTFLAGS) $(INCL) $(EXTRAFLAGS)
CXXFLAGS = $(OPTFLAGS) $(INCL) $(EXTRAFLAGS)
EXTRAFLAGS =
EXTRAFLAGS = -DHAVE_CONFIG_H
LIBS =
# Name of the output shared library

View File

@ -27,30 +27,36 @@
!INCLUDE ..\nmake.opt
HAVE_STRTOL = 1
HAVE_STRTOUL = 1
# strtoul()/strtoull() are provided together
!IF $(HAVE_STRTOLL)
HAVE_STRTOULL = 1
!ELSE
HAVE_STRTOULL = 0
!endif
!IF $(HAVE_STRTOL)
STRTOL_OBJ =
EXTRAFLAGS = -DHAVE_STRTOL $(EXTRAFLAGS)
!ELSE
STRTOL_OBJ = strtol.obj
!ENDIF
!IF $(HAVE_STRTOUL)
STRTOUL_OBJ =
EXTRAFLAGS = -DHAVE_STRTOUL $(EXTRAFLAGS)
!ELSE
STRTOUL_OBJ = strtoul.obj
!ENDIF
!IF $(HAVE_STRTOLL)
STRTOLL_OBJ =
EXTRAFLAGS = -DHAVE_STRTOLL $(EXTRAFLAGS)
!ELSE
STRTOLL_OBJ = strtoll.obj
!ENDIF
!IF $(HAVE_STRTOULL)
STRTOULL_OBJ =
EXTRAFLAGS = -DHAVE_STRTOULL $(EXTRAFLAGS)
!ELSE
STRTOULL_OBJ = strtoull.obj
!ENDIF

View File

@ -24,6 +24,10 @@
#ifndef _LIBPORT_
#define _LIBPORT_
#if defined(HAVE_CONFIG_H)
# include <tif_config.h>
#endif
int getopt(int argc, char * const argv[], const char *optstring);
extern char *optarg;
extern int opterr;