diff --git a/GDALmake.opt.in b/GDALmake.opt.in deleted file mode 100644 index 3709f44ff8a7..000000000000 --- a/GDALmake.opt.in +++ /dev/null @@ -1,656 +0,0 @@ -# -*- Makefile -*- for emacs. -GDAL_ROOT = @abs_top_builddir@ -top_builddir = $(GDAL_ROOT) - -# -# the library can be built by the native build or with the help of libtool -# - -SHELL = @SHELL@ -HAVE_LIBTOOL = @HAVE_LIBTOOL@ -LIBTOOL = @LIBTOOL@ -ifeq ($(HAVE_LIBTOOL),yes) -LIBTOOL_COMPILE_CC = $(LIBTOOL) --mode=compile --silent --tag=CC -LIBTOOL_COMPILE_CXX = $(LIBTOOL) --mode=compile --silent --tag=CXX -LIBTOOL_LINK = $(LIBTOOL) --mode=link --silent -LIBTOOL_INSTALL = $(LIBTOOL) --mode=install --silent -LIBTOOL_FINISH = $(LIBTOOL) --mode=finish --silent -LIBTOOL_CLEAN = $(LIBTOOL) --mode=clean --silent -OBJ_EXT = lo -else -LIBTOOL_FINISH = @BINTRUE@ -OBJ_EXT = o -endif - -CC = $(LIBTOOL_COMPILE_CC) @CC@ -CXX = $(LIBTOOL_COMPILE_CXX) @CXX@ -LD = $(LIBTOOL_LINK) @CXX@ -RM = $(LIBTOOL_CLEAN) /bin/rm -f *.lo -INSTALL = $(LIBTOOL_INSTALL) $(GDAL_ROOT)/install-sh -c -INSTALL_LIB = $(LIBTOOL_INSTALL) $(GDAL_ROOT)/install-sh -c -INSTALL_DATA = $(GDAL_ROOT)/install-sh -c -m 0644 -INSTALL_DIR = $(GDAL_ROOT)/install-sh -d - -LIBS = @LIBS@ $(KAK_LIBS) $(DWG_LIBS) $(CURL_LIB) \ - $(MRSID_LIBS) $(ECW_LIBS) \ - $(PCIDSK_LIB) $(RASDAMAN_LIB) $(SOSI_LIB) $(BRUNSLI_LIB) \ - $(OPENCL_LIB) $(LIBICONV) $(FGDB_LIB) $(LIBXML2_LIB) $(QB3_LIB) \ - $(MONGOCXXV3_LIBS) $(JNI_LIB) $(HDFS_LIB) - -SSEFLAGS = @SSEFLAGS@ -SSSE3FLAGS = @SSSE3FLAGS@ -AVXFLAGS = @AVXFLAGS@ - -PYTHON = @PYTHON@ -PY_HAVE_SETUPTOOLS=@PY_HAVE_SETUPTOOLS@ - -# Next Generation SWIG bindings -BINDINGS = @BINDINGS@ - -HAVE_OGDI = @HAVE_OGDI@ -OGR_ENABLED = yes -GNM_ENABLED = @GNM_ENABLED@ - -OSX_FRAMEWORK_PREFIX = /Library/Frameworks/GDAL.framework -OSX_VERSION_FRAMEWORK_PREFIX = ${OSX_FRAMEWORK_PREFIX}/Versions/@GDAL_VERSION_MAJOR@.@GDAL_VERSION_MINOR@ - -PACKAGE = @PACKAGE@ - -prefix = @prefix@ -exec_prefix = @exec_prefix@ -datarootdir = @datarootdir@ -docdir = @docdir@ -htmldir = @htmldir@ -sysconfdir = @sysconfdir@ -INST_PREFIX = @exec_prefix@ -INST_INCLUDE = @includedir@ -INST_DATA = @datadir@/gdal -INST_LIB = @libdir@ -INST_BIN = @bindir@ -INST_BASH_COMPLETION = @bashcompdir@ -INST_PYMOD = @pymoddir@ -INST_DOCS = @htmldir@ -INST_MAN = @mandir@ -INST_WEB = $(HOME)/www/gdal - -CPPFLAGS := @CPPFLAGS@ -iquote $(GDAL_ROOT)/port -iquote $(GDAL_ROOT)/generated_headers @EXTRA_INCLUDES@ -DGDAL_COMPILATION -CFLAGS = @CFLAGS@ @C_WFLAGS@ $(USER_DEFS) -CXXFLAGS = @CXXFLAGS@ @CXX_WFLAGS@ $(USER_DEFS) -CFLAGS_NOFTRAPV = @CFLAGS_NOFTRAPV@ @C_WFLAGS@ $(USER_DEFS) -CXXFLAGS_NOFTRAPV = @CXXFLAGS_NOFTRAPV@ @CXX_WFLAGS@ $(USER_DEFS) -CXXFLAGS_NO_LTO_IF_SSSE3_NONDEFAULT = @CXXFLAGS_NO_LTO_IF_SSSE3_NONDEFAULT@ @CXX_WFLAGS@ $(USER_DEFS) -CXXFLAGS_NO_LTO_IF_AVX_NONDEFAULT = @CXXFLAGS_NO_LTO_IF_AVX_NONDEFAULT@ @CXX_WFLAGS@ $(USER_DEFS) - -NO_UNUSED_PARAMETER_FLAG = @NO_UNUSED_PARAMETER_FLAG@ -NO_SIGN_COMPARE = @NO_SIGN_COMPARE@ -NO_NON_VIRTUAL_DTOR_FLAG = @NO_NON_VIRTUAL_DTOR_FLAG@ -NO_LOGICAL_OP_FLAG = @NO_LOGICAL_OP_FLAG@ -WARN_OLD_STYLE_CAST = @WARN_OLD_STYLE_CAST@ -WARN_EFFCPLUSPLUS = @WARN_EFFCPLUSPLUS@ - -# Also available -DAFL_FRIENDLY for strcmp(), etc.. variants that will -# work better with American Fuzzy Lop branch examination logic - -# TODO(schwehr): Make these be configure flags. -# CFLAGS += -Werror -# CFLAGS += -std=c11 -# CFLAGS += -fsanitize=address -# CFLAGS += -D_FORTIFY_SOURCE=2 -# CFLAGS += -fPIE -pie -# CFLAGS += -fstack-protector-all - -# CXXFLAGS += -Werror -# CXXFLAGS += -std=c++11 -# CXXFLAGS += -fsanitize=address -# CXXFLAGS += -D_FORTIFY_SOURCE=2 -# CXXFLAGS += -fPIE -pie -# CXXFLAGS += -fstack-protector-all - -LDFLAGS = @LDFLAGS@ -# LDFLAGS += -fsanitize=address - -RANLIB = @RANLIB@ -SO_EXT = @SO_EXT@ -LD_SHARED = @LD_SHARED@ -EXE = @EXE_EXT@ - -ifeq ($(notdir $(LD_SHARED)),true) -HAVE_LD_SHARED = no -else -HAVE_LD_SHARED = yes -endif - -GDAL_INCLUDE = -iquote $(GDAL_ROOT)/port -iquote $(GDAL_ROOT)/generated_headers -iquote $(GDAL_ROOT)/gcore \ - -iquote $(GDAL_ROOT)/alg \ - -iquote $(GDAL_ROOT)/ogr -iquote $(GDAL_ROOT)/ogr/ogrsf_frmts \ - -iquote $(GDAL_ROOT)/gnm -iquote $(GDAL_ROOT)/apps - -# libtool targets and help variables -LIBGDAL := libgdal.la -LIBGDAL_CURRENT := 31 -LIBGDAL_REVISION := 0 -LIBGDAL_AGE := 0 - -# native build targets and variables -GDAL_VER = @GDAL_VER@ - -# version info -GDAL_VERSION_MAJOR = @GDAL_VERSION_MAJOR@ -GDAL_VERSION_MINOR = @GDAL_VERSION_MINOR@ -GDAL_VERSION_REV = @GDAL_VERSION_REV@ - -GDAL_LIB = $(GDAL_ROOT)/libgdal.a -GDAL_SLIB = $(GDAL_ROOT)/libgdal.$(SO_EXT) -GDAL_SLIB_LINK = -L$(GDAL_ROOT) -lgdal -#GDAL_SLIB_SONAME = -Wl,-soname,libgdal.$(SO_EXT).@GDAL_VERSION_MAJOR@ - -# Mac OS X Framework definition -MACOSX_FRAMEWORK = @MACOSX_FRAMEWORK@ - -# -# GDAL/OGR PostgreSQL support. -# -HAVE_OGR_PG = @HAVE_PG@ -HAVE_POSTGISRASTER = @HAVE_PG@ -PG_INC = @PG_INC@ - -# -# MySQL support. -# -HAVE_MYSQL = @HAVE_MYSQL@ -MYSQL_LIB = @MYSQL_LIB@ -MYSQL_INC = @MYSQL_INC@ -LIBS += $(MYSQL_LIB) - -# -# SAP HANA support -# -HAVE_HANA = @HAVE_HANA@ -ODBCCPP_LIB = @ODBCCPP_LIB@ -ODBCCPP_INC = @ODBCCPP_INC@ -LIBS += $(ODBCCPP_LIB) - -# -# HDF4 Support. -# -HAVE_HDF4 = @HAVE_HDF4@ -HDF4_INCLUDE = @HDF4_INCLUDE@ -iquote $(GDAL_ROOT)/ogr -HDF4_HAS_MAXOPENFILES = @HDF4_HAS_MAXOPENFILES@ -ifeq ($(HDF4_HAS_MAXOPENFILES),yes) -HDF4_FLAGS=-DHDF4_HAS_MAXOPENFILES -endif - -# -# HDF5 Support. -# -HAVE_HDF5 = @HAVE_HDF5@ -HDF5_INCLUDE = @HDF5_INCLUDE@ - -# -# KEA Support. -# -HAVE_KEA = @HAVE_KEA@ -KEA_INC = @KEA_INC@ -KEA_LIB = @KEA_LIB@ -LIBS += $(KEA_LIB) - -# -# NetCDF Support. -# -NETCDF_MEM = @NETCDF_MEM@ -NETCDF_ROOT = @NETCDF_ROOT@ -NETCDF_HAS_NC4 = @NETCDF_HAS_NC4@ -NETCDF_HAS_HDF4 = @NETCDF_HAS_HDF4@ - -# -# DODS Include file location -# -DODS_INC = @DODS_INC@ -ifeq ($(DODS_INC),) -HAVE_DODS = no -else -HAVE_DODS = yes -endif - -# -# SQLite -# -SQLITE_INC = @SQLITE_INC@ -SQLITE_HAS_COLUMN_METADATA = @SQLITE_HAS_COLUMN_METADATA@ -HAVE_SQLITE = @HAVE_SQLITE@ -HAVE_SPATIALITE = @HAVE_SPATIALITE@ -SPATIALITE_SONAME = @SPATIALITE_SONAME@ -SPATIALITE_INC = @SPATIALITE_INC@ -SPATIALITE_412_OR_LATER = @SPATIALITE_412_OR_LATER@ -HAVE_PCRE = @HAVE_PCRE@ -HAVE_PCRE2 = @HAVE_PCRE2@ -HAVE_RASTERLITE2 = @HAVE_RASTERLITE2@ -RASTERLITE2_CFLAGS = @RASTERLITE2_CFLAGS@ - -# -# JPEG2000 via Kakadu Support. -# -KAKDIR = @KAKDIR@ - -ifneq ($(KAKDIR),) -ifeq ($(HAVE_LIBTOOL),yes) -include $(GDAL_ROOT)/frmts/jp2kak/jp2kak.lst -KAK_LIBS = $(KAK_OBJ) -endif -endif - -# -# MrSID support via LizardTech's DSDK -# -MRSID_FLAGS = @MRSID_FLAGS@ -MRSID_INCLUDE = @MRSID_INCLUDE@ -MRSID_LIBS = @MRSID_LIBS@ - -# -# ECW Related -# -ECW_FLAGS = @ECW_FLAGS@ -ECW_INCLUDE = @ECW_INCLUDE@ -ECW_LIBS = @ECW_LIBS@ - -# -# JP2Lura Related -# -JP2LURA_INCLUDE = @JP2LURA_INCLUDE@ - -# Xerces C++ XML Parser for GML and ILI -# -HAVE_XERCES = @HAVE_XERCES@ -XERCES_INCLUDE = @XERCES_INCLUDE@ -ifeq ($(HAVE_XERCES),yes) -CPPFLAGS += -DHAVE_XERCES $(XERCES_INCLUDE) $(CPPFLAGS) -endif - -# -# Expat XML Parser for KML, GPX, GeoRSS (and GML if no Xerces C++) -# -HAVE_EXPAT = @HAVE_EXPAT@ -EXPAT_INCLUDE = @EXPAT_INCLUDE@ - -# -# Google libkml for the new OGR KML driver written by Brian Case -# -HAVE_LIBKML = @HAVE_LIBKML@ -LIBKML_INCLUDE = @LIBKML_INCLUDE@ - -# -# Oracle Spatial Support -# -HAVE_OCI = @HAVE_OCI@ -OCI_INCLUDE = @OCI_INCLUDE@ - -# GEOS Support - -HAVE_GEOS = @HAVE_GEOS@ -GEOS_CFLAGS = @GEOS_CFLAGS@ - -# SFCGAL Support - -HAVE_SFCGAL = @HAVE_SFCGAL@ -SFCGAL_CFLAGS = @SFCGAL_CFLAGS@ - -# QHull Support - -QHULL_SETTING = @QHULL_SETTING@ - -# GRASS Support - -GRASS_SETTING = @GRASS_SETTING@ -GRASS_INCLUDE = @GRASS_INCLUDE@ -GRASS_GISBASE = @GRASS_GISBASE@ -HAVE_GRASS = @HAVE_GRASS@ - -# -# FileGDB -# -HAVE_FGDB = @FGDB_ENABLED@ -FGDB_LIB = @FGDB_LIB@ -FGDB_INC = @FGDB_INC@ - -# -# MongoCXX v3 -# -HAVE_MONGOCXXV3 = @MONGOCXXV3_ENABLED@ -MONGOCXXV3_LIBS = @MONGOCXXV3_LIBS@ -MONGOCXXV3_CFLAGS = @MONGOCXXV3_CFLAGS@ - -# -# ArcObjects -# -HAVE_ARCOBJECTS = @ARCOBJECTS_ENABLED@ -ARCOBJECTS_LIB = @ARCOBJECTS_LIB@ -ARCOBJECTS_INC = @ARCOBJECTS_INC@ - -# -# Curl -# -CURL_SETTING = @CURL_SETTING@ -CURL_LIB = @CURL_LIB@ -CURL_INC = @CURL_INC@ - -# -# libjson-c -# -LIBJSONC_SETTING = @LIBJSONC_SETTING@ -JSON_INCLUDE = @JSON_INCLUDE@ - -# -# OpenCL support -# -OPENCL_LIB = @OPENCL_LIB@ -OPENCL_FLAGS = @OPENCL_FLAGS@ - -# -# SOSI support -# -SOSI_INC = @SOSI_INC@ -SOSI_LIB = @SOSI_LIB@ -HAVE_SOSI = @SOSI_ENABLED@ - -# -# PCIDSK SDK -# -PCIDSK_SETTING = @PCIDSK_SETTING@ -PCIDSK_LIB = @PCIDSK_LIB@ -PCIDSK_INCLUDE = @PCIDSK_INCLUDE@ - -# -# Iconv -# -LIBICONV = @LIBICONV@ - -# -# LIBXML2 -# - -HAVE_LIBXML2 = @HAVE_LIBXML2@ -LIBXML2_INC = @LIBXML2_INC@ -LIBXML2_LIB = @LIBXML2_LIB@ - -# -# Informix DataBlade support -# -HAVE_IDB = @HAVE_IDB@ -IDB_INC = @IDB_INC@ -IDB_LIB = @IDB_LIB@ -ifeq ($(HAVE_IDB),yes) -LIBS += $(IDB_LIB) -endif - -# -# FMEObjects -# -ifeq (@X_FME_HOME@,) -HAVE_FME = no -FME_INCLUDE = -else -HAVE_FME = yes -FME_INCLUDE = -I@X_FME_HOME@/fmeobjects/cpp -endif - -# PCRaster support -PCRASTER_SETTING = @PCRASTER_SETTING@ - -# -# LERC support. -# -HAVE_LERC = @HAVE_LERC@ -LERC_INCLUDE = @LERC_INCLUDE@ - -OGDI_INCLUDE = @OGDI_INCLUDE@ - -PNG_SETTING = @PNG_SETTING@ -RENAME_INTERNAL_PNG_SYMBOLS = @RENAME_INTERNAL_PNG_SYMBOLS@ -JPEG_SETTING = @JPEG_SETTING@ -RENAME_INTERNAL_LIBJPEG_SYMBOLS = @RENAME_INTERNAL_LIBJPEG_SYMBOLS@ -JPEG12_ENABLED = @JPEG12_ENABLED@ -TIFF_JPEG12_ENABLED = @TIFF_JPEG12_ENABLED@ -TIFF_SETTING = @TIFF_SETTING@ -RENAME_INTERNAL_LIBTIFF_SYMBOLS = @RENAME_INTERNAL_LIBTIFF_SYMBOLS@ -GEOTIFF_SETTING = @GEOTIFF_SETTING@ -GEOTIFF_INCLUDE = @GEOTIFF_INCLUDE@ -RENAME_INTERNAL_LIBGEOTIFF_SYMBOLS = @RENAME_INTERNAL_LIBGEOTIFF_SYMBOLS@ -RENAME_INTERNAL_SHAPELIB_SYMBOLS = @RENAME_INTERNAL_SHAPELIB_SYMBOLS@ -GIF_SETTING = @GIF_SETTING@ -FITS_SETTING = @FITS_SETTING@ -OGDI_SETTING = @HAVE_OGDI@ -ODBC_SETTING = @ODBC_SETTING@ -NETCDF_SETTING = @NETCDF_SETTING@ -LIBZ_SETTING = @LIBZ_SETTING@ -LIBDEFLATE_SETTING = @LIBDEFLATE_SETTING@ -LIBLZMA_SETTING = @LIBLZMA_SETTING@ -WEBP_SETTING = @WEBP_SETTING@ -ZSTD_SETTING = @ZSTD_SETTING@ -TILEDB_SETTING = @TILEDB_SETTING@ -TILEDB_CFLAGS = @TILEDB_CFLAGS@ -RDB_SETTING = @RDB_SETTING@ -HAVE_BLOSC = @HAVE_BLOSC@ -HAVE_LZ4 = @HAVE_LZ4@ - -# -# DDS via Crunch Support. -# -CRUNCHDIR = @CRUNCHDIR@ - -# -# Rasdaman stuff -# -RASDAMAN_ENABLED = @RASDAMAN_ENABLED@ -RASDAMAN_INC = @RASDAMAN_INC@ -RASDAMAN_LIB = @RASDAMAN_LIB@ - - -# -# BRUNSLI (JPEG XL) -# -BRUNSLI_ENABLED = @BRUNSLI_ENABLED@ -BRUNSLI_INCLUDE = @BRUNSLI_INCLUDE@ -BRUNSLI_LIB = @BRUNSLI_LIB@ - -# -# QB3 -# -QB3_ENABLED = @QB3_ENABLED@ -QB3_INCLUDE = @QB3_INCLUDE@ -QB3_LIB = @QB3_LIB@ - -# -# PDF stuff -# -PDF_PLUGIN = @PDF_PLUGIN@ - -# -# Poppler stuff -# - -HAVE_POPPLER = @HAVE_POPPLER@ -POPPLER_MAJOR_VERSION = @POPPLER_MAJOR_VERSION@ -POPPLER_MINOR_VERSION = @POPPLER_MINOR_VERSION@ -POPPLER_INC = @POPPLER_CFLAGS@ -POPPLER_PLUGIN_LIB = @POPPLER_PLUGIN_LIB@ - -# -# Podofo stuff -# - -HAVE_PODOFO = @HAVE_PODOFO@ -PODOFO_INC = @PODOFO_INC@ -PODOFO_PLUGIN_LIB = @PODOFO_PLUGIN_LIB@ - -# -# Pdfium stuff -# - -HAVE_PDFIUM = @HAVE_PDFIUM@ -PDFIUM_INC = @PDFIUM_INC@ -PDFIUM_PLUGIN_LIB = @PDFIUM_PLUGIN_LIB@ - -# -# Teigha stuff -# -HAVE_TEIGHA = @HAVE_TEIGHA@ -TEIGHA_DIR = @TEIGHA_DIR@ -TEIGHA_CPPFLAGS = @TEIGHA_CPPFLAGS@ - -# -# PROJ stuff -# -PROJ_INCLUDE = @PROJ_INCLUDE@ - -PAM_SETTING = @PAM_SETTING@ - -GDAL_LIBS := $(GDAL_LIB) $(OCI_LIB) $(GDAL_LIBS) - -ifeq ($(GNM_ENABLED),yes) -CPPFLAGS := -DGNM_ENABLED $(CPPFLAGS) -endif - -HAVE_ARMADILLO = @HAVE_ARMADILLO@ - -# -# userfaultfd -# -ENABLE_UFFD = @ENABLE_UFFD@ - -# -# HDFS -# -HDFS_LIB = @HDFS_LIB@ -HDFS_INC = @HDFS_INC@ -HDFS_ENABLED = @HDFS_ENABLED@ -JNI_LIB = @JNI_LIB@ - -# -# freexl stuff -# - -HAVE_FREEXL = @HAVE_FREEXL@ -FREEXL_INCLUDE = @FREEXL_INCLUDE@ - -# -# EXR stuff -# - -EXR_CFLAGS = @EXR_CFLAGS@ - -# -# HEIF stuff -# - -HEIF_CFLAGS = @HEIF_CFLAGS@ - -# -# JXL support -# - -HAVE_JXL = @HAVE_JXL@ -JXL_CFLAGS = @JXL_CFLAGS@ - -# -# cryptopp stuff -# -HAVE_CRYPTOPP = @HAVE_CRYPTOPP@ -USE_ONLY_CRYPTODLL_ALG = @USE_ONLY_CRYPTODLL_ALG@ - -# -# crypto/openssl stuff -# -HAVE_OPENSSL_CRYPTO = @HAVE_OPENSSL_CRYPTO@ - -# -# Note these codes have to exactly match the format directory names, -# and their uppercase form should be the format portion of the -# format registration entry point. eg. gdb -> GDALRegister_GTiff(). -# -GDAL_FORMATS := derived gtiff hfa mem vrt @GDALFORMATS_ENABLED@ @OPT_GDAL_FORMATS@ -OGR_FORMATS := @OGRFORMATS_ENABLED@ -OGR_FORMATS_ENABLED_CFLAGS := @OGRFORMATS_ENABLED_CFLAGS@ - -ifneq ($(PCIDSK_SETTING),no) -GDAL_FORMATS += pcidsk -endif - -ifeq ($(HAVE_POSTGISRASTER),yes) -GDAL_FORMATS := $(GDAL_FORMATS) postgisraster -endif - -ifeq ($(HAVE_CHARLS),yes) -GDAL_FORMATS := $(GDAL_FORMATS) jpegls -endif - - -# -# CONFIG_LIBS is what local program should link against, and CONFIG_LIBS_INS -# is what will be emitted into the gdal-config script that is installed -# globally. -# - -ifeq ($(HAVE_LIBTOOL), yes) - -CONFIG_LIBS = $(GDAL_ROOT)/$(LIBGDAL) -ifeq ($(MACOSX_FRAMEWORK),yes) -CONFIG_LIBS_INS = -L$(INST_LIB)/unix/lib -lgdal -else -CONFIG_LIBS_INS = -L$(INST_LIB) -lgdal -endif # MACOSX_FRAMEWORK - -EXE_DEP_LIBS = $(GDAL_ROOT)/$(LIBGDAL) -SO_EXT = la - -else # HAVE_LIBTOOL - -ifeq ($(HAVE_LD_SHARED),yes) -CONFIG_LIBS = $(GDAL_SLIB_LINK) -ifeq ($(MACOSX_FRAMEWORK),yes) -CONFIG_LIBS_INS = -L$(INST_LIB)/unix/lib -lgdal -else -CONFIG_LIBS_INS = -L$(INST_LIB) -lgdal -endif -EXE_DEP_LIBS = $(GDAL_SLIB) -else -CONFIG_LIBS = $(GDAL_LIBS) $(LIBS) -CONFIG_LIBS_INS = $(foreach LF,$(GDAL_LIBS),$(INST_LIB)/$(notdir $(LF)))\ - $(LIBS) -EXE_DEP_LIBS = $(GDAL_LIB) -endif - -endif # HAVE_LIBTOOL - - -# -# generic library rules -# - -# -# gdal and ogr low level drivers use the following default rules in order to -# populate the ../o/ directory with all object and library object files -# - -O_OBJ = $(foreach file,$(OBJ),../o/$(file)) - -../o/%.$(OBJ_EXT): %.c - $(CC) $(GDAL_INCLUDE) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< - -../o/%.$(OBJ_EXT): %.cpp - $(CXX) $(GDAL_INCLUDE) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< - -%.$(OBJ_EXT): %.c - $(CC) $(GDAL_INCLUDE) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< - -%.$(OBJ_EXT): %.cpp - $(CXX) $(GDAL_INCLUDE) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< - -# -# default rules for handling subdirectories -# - -%-target: - $(MAKE) -C $* - -%-clean: - $(MAKE) -C $* clean diff --git a/GNUmakefile b/GNUmakefile deleted file mode 100644 index 87bff91b4023..000000000000 --- a/GNUmakefile +++ /dev/null @@ -1,309 +0,0 @@ -include GDALmake.opt - -GDAL_OBJ = frmts/o/*.o \ - gcore/*.o \ - port/*.o \ - alg/*.o \ - apps/commonutils.o \ - apps/gdalinfo_lib.o \ - apps/gdalmdiminfo_lib.o \ - apps/gdal_translate_lib.o \ - apps/gdalmdimtranslate_lib.o \ - apps/gdalwarp_lib.o \ - apps/ogr2ogr_lib.o \ - apps/gdaldem_lib.o \ - apps/nearblack_lib.o \ - apps/gdal_grid_lib.o \ - apps/gdal_rasterize_lib.o \ - apps/gdalbuildvrt_lib.o - -GDAL_OBJ += ogr/ogrsf_frmts/o/*.o - -ifeq ($(GNM_ENABLED),yes) - GDAL_OBJ += gnm/*.o gnm/gnm_frmts/o/*.o -endif - -ifeq ($(HAVE_LERC),internal) - GDAL_OBJ += third_party/o/*.o -endif - -include ./ogr/file.lst -GDAL_OBJ += $(addprefix ./ogr/,$(OBJ)) - -LIBGDAL-yes := $(GDAL_LIB) -LIBGDAL-$(HAVE_LD_SHARED) += $(GDAL_SLIB) -# override if we are using libtool -LIBGDAL-$(HAVE_LIBTOOL) := $(LIBGDAL) - -default: configure lib-target apps-target swig-target gdal.pc -ifeq ($(PDF_PLUGIN),yes) - (cd frmts/pdf; $(MAKE) plugin) -endif - -configure: configure.ac - ./autogen.sh - -lib-target: check-lib; - -force-lib: - $(AR) r $(GDAL_LIB) $(GDAL_OBJ) - $(RANLIB) $(GDAL_LIB) - $(LD_SHARED) $(GDAL_SLIB_SONAME) $(GDAL_OBJ) $(GDAL_LIBS) $(LDFLAGS) $(LIBS) \ - -o $(GDAL_SLIB) - -static-lib: lib-dependencies GDALmake.opt - $(MAKE) static-lib-stage2 - -static-lib-stage2: $(GDAL_OBJ) - rm -f libgdal.a - $(AR) r $(GDAL_LIB) $(GDAL_OBJ) - -$(GDAL_LIB): $(GDAL_OBJ) GDALmake.opt - rm -f libgdal.a - $(AR) r $(GDAL_LIB) $(GDAL_OBJ) - $(RANLIB) $(GDAL_LIB) - -$(GDAL_SLIB): $(GDAL_OBJ) $(GDAL_LIB) - $(LD_SHARED) $(GDAL_SLIB_SONAME) $(GDAL_OBJ) $(GDAL_LIBS) $(LDFLAGS) $(LIBS) \ - -o $(GDAL_SLIB) - -# split potentially long lines -SORTED := $(sort $(wildcard $(GDAL_OBJ:.o=.lo))) -NSORTED := $(words $(SORTED)) -# mid left and right indices -MIDL := $(shell echo $$(( $(NSORTED) / 2 )) ) -MIDR := $(shell echo $$(( $(MIDL) + 1 )) ) - -$(LIBGDAL): $(GDAL_OBJ:.o=.lo) - $(LD) $(LDFLAGS) $(LIBS) -o $@ \ - $(wordlist 1,$(MIDL),$(SORTED)) \ - $(wordlist $(MIDR),$(words $(SORTED)),$(SORTED)) \ - -rpath $(INST_LIB) \ - -no-undefined \ - -version-info $(LIBGDAL_CURRENT):$(LIBGDAL_REVISION):$(LIBGDAL_AGE) -ifeq ($(MACOSX_FRAMEWORK),yes) - install_name_tool -id ${OSX_VERSION_FRAMEWORK_PREFIX}/GDAL .libs/libgdal.dylib -endif - -lib-dependencies: port-target core-target frmts-target third-party-target ogr-target gnm-target appslib-target - -check-lib: lib-dependencies - $(MAKE) $(LIBGDAL-yes) - -generate_gdal_version_h: - (cd gcore; $(MAKE) generate_gdal_version_h) - -appslib-target: generate_gdal_version_h - (cd apps; $(MAKE) appslib) - -port-target: - (cd port; $(MAKE)) - -ogr-target: generate_gdal_version_h - (cd ogr; $(MAKE) lib ) - -ifeq ($(GNM_ENABLED),yes) -gnm-target: generate_gdal_version_h - (cd gnm; $(MAKE) lib ) -else -gnm-target: ; -endif - -core-target: generate_gdal_version_h - (cd gcore; $(MAKE)) - (cd alg; $(MAKE)) - -frmts-target: generate_gdal_version_h - (cd frmts; $(MAKE)) - -third-party-target: generate_gdal_version_h - (cd third_party; $(MAKE)) - -apps-target: lib-target - (cd apps; $(MAKE)) - -ifeq ($(BINDINGS),) -swig-target: ; -else -swig-target: swig-modules; -endif - -# Python bindings needs gdal-config, hence apps-target -swig-modules: apps-target - (cd swig; $(MAKE) build) - -clean: lclean - (cd port; $(MAKE) clean) - (cd generated_headers; $(MAKE) clean) - (cd ogr; $(MAKE) clean) - (cd gnm; $(MAKE) clean) - (cd gcore; $(MAKE) clean) - (cd frmts; $(MAKE) clean) - (cd third_party; $(MAKE) clean) - (cd alg; $(MAKE) clean) - (cd apps; $(MAKE) clean) -ifneq ($(BINDINGS),) - (cd swig; $(MAKE) clean) -endif -ifeq ($(PDF_PLUGIN),yes) - (cd frmts/pdf; $(MAKE) clean) -endif - - -lclean: - rm -f *.a *.so config.log config.cache html/*.* - $(RM) *.la - -distclean: dist-clean - -dist-clean: clean - rm -f GDALmake.opt generated_headers/cpl_config.h config.cache config.status - rm -f libtool - rm -rf autom4te.cache - -config: configure - ./configure - -GDALmake.opt: GDALmake.opt.in config.status - ./config.status - -config.status: configure - ./config.status --recheck - -doxygen: - doxygen - -docs: - (cd doc; make html) - -.PHONY: man - -man: - (cd doc; make man) - mkdir -p man/man1 - cp doc/build/man/*.1 man/man1 - -all: default - -install-docs: - $(INSTALL_DIR) $(DESTDIR)$(INST_DOCS) - cp -r doc/build/html/* $(DESTDIR)$(INST_DOCS) - -install-man: - $(INSTALL_DIR) $(DESTDIR)$(INST_MAN)/man1 - for f in $(wildcard man/man1/*.1) ; do $(INSTALL_DATA) $$f $(DESTDIR)$(INST_MAN)/man1 ; done - -install: install-actions - -install-static-lib: static-lib gdal.pc - $(INSTALL_LIB) $(GDAL_LIB) $(DESTDIR)$(INST_LIB) - $(INSTALL_DIR) $(DESTDIR)$(INST_DATA) - $(INSTALL_DIR) $(DESTDIR)$(INST_INCLUDE) - (cd port; $(MAKE) install) - (cd gcore; $(MAKE) install) - (cd generated_headers; $(MAKE) install) - (cd frmts; $(MAKE) install) - (cd alg; $(MAKE) install) - (cd ogr; $(MAKE) install) - (cd gnm; $(MAKE) install) - for f in LICENSE.TXT data/*.* ; do $(INSTALL_DATA) $$f $(DESTDIR)$(INST_DATA) ; done - $(LIBTOOL_FINISH) $(DESTDIR)$(INST_LIB) - $(INSTALL_DIR) $(DESTDIR)$(INST_LIB)/pkgconfig - $(INSTALL_DATA) gdal.pc $(DESTDIR)$(INST_LIB)/pkgconfig/gdal.pc - -install-actions: install-lib - $(INSTALL_DIR) $(DESTDIR)$(INST_BIN) - $(INSTALL_DIR) $(DESTDIR)$(INST_DATA) - $(INSTALL_DIR) $(DESTDIR)$(INST_INCLUDE) -ifeq ($(MACOSX_FRAMEWORK),yes) - $(INSTALL_DIR) $(DESTDIR)${OSX_VERSION_FRAMEWORK_PREFIX}/PlugIns - $(INSTALL_DIR) $(DESTDIR)${OSX_VERSION_FRAMEWORK_PREFIX}/unix/lib - ln -sfh Versions/Current/unix $(DESTDIR)${OSX_FRAMEWORK_PREFIX}/unix - ln -sfh ../Programs $(DESTDIR)${OSX_VERSION_FRAMEWORK_PREFIX}/unix/bin - ln -sfh ../Headers $(DESTDIR)${OSX_VERSION_FRAMEWORK_PREFIX}/unix/include - ln -sf ../../GDAL $(DESTDIR)${OSX_VERSION_FRAMEWORK_PREFIX}/unix/lib/libgdal.dylib - ln -sfh $(GDAL_VERSION_MAJOR).$(GDAL_VERSION_MINOR) $(DESTDIR)${OSX_FRAMEWORK_PREFIX}/Versions/Current - ln -sfh Versions/Current/Headers $(DESTDIR)${OSX_FRAMEWORK_PREFIX}/Headers - ln -sfh Versions/Current/Programs $(DESTDIR)${OSX_FRAMEWORK_PREFIX}/Programs - ln -sfh Versions/Current/Resources $(DESTDIR)${OSX_FRAMEWORK_PREFIX}/Resources - ln -sfh Versions/Current/GDAL $(DESTDIR)${OSX_FRAMEWORK_PREFIX}/GDAL -endif - (cd port; $(MAKE) install) - (cd gcore; $(MAKE) install) - (cd generated_headers; $(MAKE) install) - (cd frmts; $(MAKE) install) - (cd alg; $(MAKE) install) - (cd ogr; $(MAKE) install) - (cd gnm; $(MAKE) install) - (cd apps; $(MAKE) install) -ifneq ($(BINDINGS),) - (cd swig; $(MAKE) install) -endif -ifdef INST_BASH_COMPLETION - (cd scripts; $(MAKE) install) -endif - for f in LICENSE.TXT data/*.* ; do $(INSTALL_DATA) $$f $(DESTDIR)$(INST_DATA) ; done - $(LIBTOOL_FINISH) $(DESTDIR)$(INST_LIB) - $(INSTALL_DIR) $(DESTDIR)$(INST_LIB)/pkgconfig - $(INSTALL_DATA) gdal.pc $(DESTDIR)$(INST_LIB)/pkgconfig/gdal.pc - -ifeq ($(HAVE_LIBTOOL),yes) - -install-lib: default - $(INSTALL_DIR) $(DESTDIR)$(INST_LIB) - for f in $(LIBGDAL-yes) ; do $(INSTALL_LIB) $$f $(DESTDIR)$(INST_LIB) ; done -ifeq ($(MACOSX_FRAMEWORK),yes) - if [ -f "$(DESTDIR)$(INST_LIB)/libgdal.$(GDAL_VERSION_MAJOR).$(LIBGDAL_AGE).$(LIBGDAL_REVISION).dylib" ] ; then mv -f $(DESTDIR)$(INST_LIB)/libgdal.$(GDAL_VERSION_MAJOR).$(LIBGDAL_AGE).$(LIBGDAL_REVISION).dylib $(DESTDIR)${OSX_VERSION_FRAMEWORK_PREFIX}/GDAL ; fi - if [ -f "$(DESTDIR)$(INST_LIB)/libgdal.$(GDAL_VERSION_MAJOR).$(LIBGDAL_AGE).dylib" ] ; then mv -f $(DESTDIR)$(INST_LIB)/libgdal.$(GDAL_VERSION_MAJOR).$(LIBGDAL_AGE).dylib $(DESTDIR)${OSX_VERSION_FRAMEWORK_PREFIX}/GDAL ; fi - if [ -f "$(DESTDIR)$(INST_LIB)/libgdal.$(GDAL_VERSION_MAJOR).dylib" ] ; then mv -f $(DESTDIR)$(INST_LIB)/libgdal.$(GDAL_VERSION_MAJOR).dylib $(DESTDIR)${OSX_VERSION_FRAMEWORK_PREFIX}/GDAL ; fi - if [ -f "$(DESTDIR)$(INST_LIB)/libgdal.dylib" ] ; then mv -f $(DESTDIR)$(INST_LIB)/libgdal.dylib $(DESTDIR)${OSX_VERSION_FRAMEWORK_PREFIX}/GDAL ; fi - rm -f $(DESTDIR)$(INST_LIB)/libgdal.$(GDAL_VERSION_MAJOR).$(LIBGDAL_AGE).$(LIBGDAL_REVISION).dylib - rm -f $(DESTDIR)$(INST_LIB)/libgdal.$(GDAL_VERSION_MAJOR).$(LIBGDAL_AGE).dylib - rm -f $(DESTDIR)$(INST_LIB)/libgdal.$(GDAL_VERSION_MAJOR).dylib - rm -f $(DESTDIR)$(INST_LIB)/libgdal.dylib - rm -f $(DESTDIR)$(INST_LIB)/libgdal.la -else - $(INSTALL_DIR) $(DESTDIR)$(INST_LIB)/gdalplugins -endif - -else - -ifeq ($(HAVE_LD_SHARED),yes) - -GDAL_SLIB_B = $(notdir $(GDAL_SLIB)) - -install-lib: default - - $(INSTALL_DIR) $(DESTDIR)$(INST_LIB) -ifeq ($(MACOSX_FRAMEWORK),yes) - $(INSTALL_LIB) $(GDAL_SLIB) $(DESTDIR)$(INST_LIB)/GDAL -else - rm -f $(DESTDIR)$(INST_LIB)/$(GDAL_SLIB_B) - rm -f $(DESTDIR)$(INST_LIB)/$(GDAL_SLIB_B).$(GDAL_VERSION_MAJOR) - rm -f $(DESTDIR)$(INST_LIB)/$(GDAL_SLIB_B).$(GDAL_VER) - $(INSTALL_LIB) $(GDAL_SLIB) $(DESTDIR)$(INST_LIB)/$(GDAL_SLIB_B).$(GDAL_VER) - (cd $(DESTDIR)$(INST_LIB) ; \ - ln -s $(GDAL_SLIB_B).$(GDAL_VER) $(GDAL_SLIB_B).$(GDAL_VERSION_MAJOR)) - (cd $(DESTDIR)$(INST_LIB) ; \ - ln -s $(GDAL_SLIB_B).$(GDAL_VERSION_MAJOR) $(GDAL_SLIB_B)) - $(INSTALL_DIR) $(DESTDIR)$(INST_LIB)/gdalplugins -endif - -else - -install-lib: default - $(INSTALL_DIR) $(DESTDIR)$(INST_LIB) - $(INSTALL_LIB) $(GDAL_LIB) $(DESTDIR)$(INST_LIB) - -endif # HAVE_LD_SHARED=no - -endif # HAVE_LIBTOOL=no - -gdal.pc: gdal.pc.in GDALmake.opt ./GNUmakefile VERSION - rm -f gdal.pc - echo 'CONFIG_VERSION='`cat ./VERSION`'' >> gdal.pc - echo 'CONFIG_INST_PREFIX=$(INST_PREFIX)' >> gdal.pc - echo 'CONFIG_INST_LIBS=$(CONFIG_LIBS_INS)' >> gdal.pc - echo 'CONFIG_INST_CFLAGS=-I$(INST_INCLUDE)' >> gdal.pc - echo 'CONFIG_INST_DATA=$(INST_DATA)' >> gdal.pc - cat gdal.pc.in >> gdal.pc diff --git a/alg/GNUmakefile b/alg/GNUmakefile deleted file mode 100644 index bb15a94b5256..000000000000 --- a/alg/GNUmakefile +++ /dev/null @@ -1,64 +0,0 @@ - -include ../GDALmake.opt - -OBJ = gdalmediancut.o gdaldither.o gdal_crs.o gdaltransformer.o \ - gdalsimplewarp.o gdalwarper.o gdalwarpkernel.o \ - gdalwarpoperation.o gdalchecksum.o gdal_rpc.o gdal_tps.o \ - thinplatespline.o llrasterize.o gdalrasterize.o gdalgeoloc.o \ - gdalgeolocquadtree.o \ - gdalgrid.o gdalcutline.o gdalproximity.o rasterfill.o \ - gdalrasterpolygonenumerator.o \ - gdalsievefilter.o gdalwarpkernel_opencl.o polygonize.o \ - contour.o gdaltransformgeolocs.o gdallinearsystem.o \ - gdal_octave.o gdal_simplesurf.o gdalmatching.o delaunay.o \ - gdalpansharpen.o gdalapplyverticalshiftgrid.o viewshed.o - -ifeq ($(HAVE_GEOS),yes) -CPPFLAGS := -DHAVE_GEOS=1 $(GEOS_CFLAGS) $(CPPFLAGS) -endif - -ifeq ($(HAVE_ARMADILLO),yes) -CPPFLAGS := -DHAVE_ARMADILLO $(CPPFLAGS) -endif - -ifeq ($(QHULL_SETTING),external) -CPPFLAGS := -DEXTERNAL_QHULL $(CPPFLAGS) -endif -ifeq ($(QHULL_SETTING),internal) -CPPFLAGS := -DINTERNAL_QHULL $(CPPFLAGS) -endif - -CPPFLAGS := -iquote ../frmts/vrt -iquote ../frmts/mem $(CPPFLAGS) $(OPENCL_FLAGS) $(PROJ_FLAGS) $(PROJ_INCLUDE) -iquote marching_squares - -CXXFLAGS := $(WARN_EFFCPLUSPLUS) $(WARN_OLD_STYLE_CAST) $(CXXFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) gdalgridavx.$(OBJ_EXT) gdalgridsse.$(OBJ_EXT) - -# We use CXXFLAGS_NO_LTO_IF_AVX_NONDEFAULT to avoid the whole library to be compiled with -mavx -# if -mavx is not the default -gdalgridavx.$(OBJ_EXT): gdalgridavx.cpp - $(CXX) $(GDAL_INCLUDE) $(CXXFLAGS_NO_LTO_IF_AVX_NONDEFAULT) $(WARN_OLD_STYLE_CAST) $(AVXFLAGS) $(CPPFLAGS) -c -o $@ $< - -gdalgridsse.$(OBJ_EXT): gdalgridsse.cpp - $(CXX) $(GDAL_INCLUDE) $(CXXFLAGS) $(WARN_OLD_STYLE_CAST) $(SSEFLAGS) $(CPPFLAGS) -c -o $@ $< - -clean: - $(RM) *.o $(O_OBJ) - -docs: - (cd ..; $(MAKE) docs) - -INST_H_FILES = \ - gdal_alg.h \ - gdal_alg_priv.h \ - gdalgrid.h \ - gdalgrid_priv.h \ - gdalpansharpen.h \ - gdal_simplesurf.h \ - gdalwarper.h - -install: - for f in $(INST_H_FILES) ; do $(INSTALL_DATA) $$f $(DESTDIR)$(INST_INCLUDE) ; done - -lib: $(OBJ:.o=.$(OBJ_EXT)) - (cd .. ; $(MAKE) force-lib) diff --git a/alg/makefile.vc b/alg/makefile.vc deleted file mode 100644 index 502b5b1e897f..000000000000 --- a/alg/makefile.vc +++ /dev/null @@ -1,52 +0,0 @@ - -# -# Algorithms -# - -GDAL_ROOT = .. - -EXTRAFLAGS = -I../frmts/vrt -I../frmts/mem -I../ogr/ogrsf_frmts $(GEOS_CFLAGS) $(PROJ_FLAGS) $(PROJ_INCLUDE) -Imarching_squares - -!INCLUDE ..\nmake.opt - -!IFDEF QHULL_SETTING -!IF "$(QHULL_SETTING)" == "INTERNAL" -EXTRAFLAGS = $(EXTRAFLAGS) -DINTERNAL_QHULL -!ELSE -!IF "$(QHULL_SETTING)" == "EXTERNAL" -EXTRAFLAGS = $(EXTRAFLAGS) -DEXTERNAL_QHULL $(QHULL_INC) -!ENDIF -!ENDIF -!ENDIF - -OBJ = gdaldither.obj gdalmediancut.obj gdal_crs.obj gdaltransformer.obj \ - gdalsimplewarp.obj gdalwarper.obj gdalwarpkernel.obj \ - thinplatespline.obj gdal_tps.obj gdalrasterize.obj llrasterize.obj \ - gdalwarpoperation.obj gdalchecksum.obj gdal_rpc.obj gdalgeoloc.obj \ - gdalgeolocquadtree.obj \ - gdalgrid.obj gdalcutline.obj gdalproximity.obj rasterfill.obj \ - gdalsievefilter.obj gdalrasterpolygonenumerator.obj polygonize.obj \ - contour.obj viewshed.obj gdallinearsystem.obj \ - gdal_octave.obj gdal_simplesurf.obj gdalmatching.obj \ - gdaltransformgeolocs.obj delaunay.obj gdalpansharpen.obj \ - gdalapplyverticalshiftgrid.obj - -!IF "$(SSEFLAGS)" == "/DHAVE_SSE_AT_COMPILE_TIME" -SSE_OBJ = gdalgridsse.obj -!ENDIF - -!IF "$(AVXFLAGS)" == "/DHAVE_AVX_AT_COMPILE_TIME" -AVX_OBJ = gdalgridavx.obj -!ENDIF - -default: $(OBJ) $(SSE_OBJ) $(AVX_OBJ) - -gdalgridsse.obj: $*.cpp - $(CC) $(CPPFLAGS) $(SSE_ARCH_FLAGS) /c $*.cpp - -gdalgridavx.obj: $*.cpp - $(CC) $(CPPFLAGS) $(AVX_ARCH_FLAGS) /c $*.cpp - -clean: - -del *.obj - diff --git a/apps/GNUmakefile b/apps/GNUmakefile deleted file mode 100644 index 8a4e1e5fb6f2..000000000000 --- a/apps/GNUmakefile +++ /dev/null @@ -1,234 +0,0 @@ -# We get a full absolute path to the tree in this case so that when we -# generate the various paths in the local gdal-config file they will work -# from anywhere in the filesystem. - -include ../GDALmake.opt - -CPPFLAGS := -iquote $(GDAL_ROOT)/frmts/vrt $(CPPFLAGS) $(JSON_INCLUDE) $(PROJ_INCLUDE) -iquote $(GDAL_ROOT)/ogr/ogrsf_frmts/geojson -iquote $(GDAL_ROOT)/ogr/ogrsf_frmts/generic -g -LNK_FLAGS := $(LDFLAGS) -DEP_LIBS = $(EXE_DEP_LIBS) $(XTRAOBJ) - -BIN_LIST = gdalinfo$(EXE) gdal_translate$(EXE) \ - gdaladdo$(EXE) gdalwarp$(EXE) nearblack$(EXE) gdalmanage$(EXE) \ - gdalenhance$(EXE) gdaltransform$(EXE) gdaldem$(EXE) \ - gdallocationinfo$(EXE) gdalsrsinfo$(EXE) gdalmdiminfo$(EXE) \ - gdalmdimtranslate$(EXE) gdal_viewshed$(EXE) gdal_create$(EXE) - -OBJ = commonutils.o gdalinfo_lib.o gdal_translate_lib.o gdalwarp_lib.o ogr2ogr_lib.o \ - gdaldem_lib.o nearblack_lib.o gdal_grid_lib.o gdal_rasterize_lib.o gdalbuildvrt_lib.o \ - gdalmdiminfo_lib.o gdalmdimtranslate_lib.o - -BIN_LIST += gdal_contour$(EXE) \ - gdaltindex$(EXE) \ - gdal_rasterize$(EXE) \ - gdal_grid$(EXE) \ - ogrinfo$(EXE) \ - ogr2ogr$(EXE) \ - ogrtindex$(EXE) \ - ogrlineref$(EXE) \ - gdalbuildvrt$(EXE) - -ifeq ($(GNM_ENABLED),yes) -BIN_LIST += gnmmanage$(EXE) gnmanalyse$(EXE) -CPPFLAGS += -iquote $(GDAL_ROOT)/gnm -endif - -ifeq ($(HAVE_GEOS),yes) -CPPFLAGS := $(CPPFLAGS) -DHAVE_GEOS=1 -endif - -NON_DEFAULT_LIST = multireadtest$(EXE) dumpoverviews$(EXE) \ - gdalwarpsimple$(EXE) gdalflattenmask$(EXE) \ - gdaltorture$(EXE) gdal2ogr$(EXE) \ - gdalasyncread$(EXE) testreprojmulti$(EXE) - -default: gdal-config-inst gdal-config $(BIN_LIST) test_ogrsf$(EXE) - -all: default $(NON_DEFAULT_LIST) - -lib-depend: - (cd ../gcore ; $(MAKE) ) - (cd ../port ; $(MAKE) ) - -appslib: $(OBJ:.o=.$(OBJ_EXT)) - -gdalinfo_lib.$(OBJ_EXT): gdalinfo_lib.cpp - $(CXX) -c $(GDAL_INCLUDE) $(CPPFLAGS) $(CXXFLAGS) $< -o $@ - -gdal_translate_lib.$(OBJ_EXT): gdal_translate_lib.cpp - $(CXX) -c $(GDAL_INCLUDE) $(CPPFLAGS) $(CXXFLAGS) $< -o $@ - -gdalwarp_lib.$(OBJ_EXT): gdalwarp_lib.cpp - $(CXX) -c $(GDAL_INCLUDE) $(CPPFLAGS) $(CXXFLAGS) $< -o $@ - -ogr2ogr_lib.$(OBJ_EXT): ogr2ogr_lib.cpp - $(CXX) -c $(GDAL_INCLUDE) $(CPPFLAGS) $(CXXFLAGS) $< -o $@ - -gdaldem_lib.$(OBJ_EXT): gdaldem_lib.cpp - $(CXX) -c $(GDAL_INCLUDE) $(CPPFLAGS) $(CXXFLAGS) $< -o $@ - -nearblack_lib.$(OBJ_EXT): nearblack_lib.cpp - $(CXX) -c $(GDAL_INCLUDE) $(CPPFLAGS) $(CXXFLAGS) $< -o $@ - -gdal_grid_lib.$(OBJ_EXT): gdal_grid_lib.cpp - $(CXX) -c $(GDAL_INCLUDE) $(CPPFLAGS) $(CXXFLAGS) $< -o $@ - -gdal_rasterize_lib.$(OBJ_EXT): gdal_rasterize_lib.cpp - $(CXX) -c $(GDAL_INCLUDE) $(CPPFLAGS) $(CXXFLAGS) $< -o $@ - -gdalbuildvrt_lib.$(OBJ_EXT): gdalbuildvrt_lib.cpp - $(CXX) -c $(GDAL_INCLUDE) $(CPPFLAGS) $(CXXFLAGS) $< -o $@ - -gdalmdiminfo_lib.$(OBJ_EXT): gdalmdiminfo_lib.cpp - $(CXX) -c $(GDAL_INCLUDE) $(CPPFLAGS) $(CXXFLAGS) $< -o $@ - -gdalmdimtranslate_lib.$(OBJ_EXT): gdalmdimtranslate_lib.cpp - $(CXX) -c $(GDAL_INCLUDE) $(CPPFLAGS) $(CXXFLAGS) $< -o $@ - -gdalinfo$(EXE): gdalinfo_bin.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) $(CONFIG_LIB_UTILS) -o $@ - -gdalmdiminfo$(EXE): gdalmdiminfo_bin.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) $(CONFIG_LIB_UTILS) -o $@ - -gdalmdimtranslate$(EXE): gdalmdimtranslate_bin.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) $(CONFIG_LIB_UTILS) -o $@ - -gdal_translate$(EXE): gdal_translate_bin.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -gdaladdo$(EXE): gdaladdo.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -gdalwarp$(EXE): gdalwarp_bin.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -gdal_contour$(EXE): gdal_contour.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -nearblack$(EXE): nearblack_bin.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -gdalmanage$(EXE): gdalmanage.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -gdal_rasterize$(EXE): gdal_rasterize_bin.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -gdaltindex$(EXE): gdaltindex.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -gdalbuildvrt$(EXE): gdalbuildvrt_bin.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -multireadtest$(EXE): multireadtest.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -dumpoverviews$(EXE): dumpoverviews.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -gdalenhance$(EXE): gdalenhance.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -gdaldem$(EXE): gdaldem_bin.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -gdal_grid$(EXE): gdal_grid_bin.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -gdalwarpsimple$(EXE): gdalwarpsimple.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -gdaltransform$(EXE): gdaltransform.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -gdallocationinfo$(EXE): gdallocationinfo.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -gdalsrsinfo$(EXE): gdalsrsinfo.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -gdalflattenmask$(EXE): gdalflattenmask.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -gdaltorture$(EXE): gdaltorture.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -gdal2ogr$(EXE): gdal2ogr.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -ogrinfo$(EXE): ogrinfo.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -ogrlineref$(EXE): ogrlineref.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -ogr2ogr$(EXE): ogr2ogr_bin.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -ogrtindex$(EXE): ogrtindex.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -test_ogrsf$(EXE): test_ogrsf.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -gdalasyncread$(EXE): gdalasyncread.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -testreprojmulti$(EXE): testreprojmulti.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -gnmmanage$(EXE): gnmmanage.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -gnmanalyse$(EXE): gnmanalyse.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -gdal_viewshed$(EXE): gdal_viewshed.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -gdal_create$(EXE): gdal_create.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -clean: - $(RM) *.o $(BIN_LIST) $(NON_DEFAULT_LIST) core gdal-config gdal-config-inst - -$(DEP_LIBS): - - -gdal-config: gdal-config.in ../GDALmake.opt ./GNUmakefile ../VERSION - rm -f gdal-config - echo '#!/bin/sh' > gdal-config - echo 'CONFIG_LIBS="$(CONFIG_LIBS)"' >> gdal-config - echo 'CONFIG_DEP_LIBS="$(LIBS)"' >> gdal-config - echo 'CONFIG_PREFIX="$(GDAL_ROOT)"' >> gdal-config - echo 'CONFIG_CFLAGS="-I$(GDAL_ROOT)/port -I$(GDAL_ROOT)/generated_headers -I$(GDAL_ROOT)/gcore -I$(GDAL_ROOT)/alg -I$(GDAL_ROOT)/gnm -I$(GDAL_ROOT)/ogr -I$(GDAL_ROOT)/ogr/ogrsf_frmts -I$(GDAL_ROOT)/frmts/vrt -I$(GDAL_ROOT)/apps"' >> gdal-config - echo 'CONFIG_DATA="$(GDAL_ROOT)/data"' >> gdal-config - echo 'CONFIG_VERSION="'`cat ../VERSION`'"' >> gdal-config - echo 'CONFIG_OGR_ENABLED=yes' >> gdal-config # Deprecated. Always true. - echo 'CONFIG_GNM_ENABLED=$(GNM_ENABLED)' >> gdal-config - echo 'CONFIG_FORMATS="$(GDAL_FORMATS)"' >> gdal-config - cat gdal-config.in >> gdal-config - chmod a+x gdal-config - -gdal-config-inst: gdal-config.in ../GDALmake.opt ./GNUmakefile ../VERSION - rm -f gdal-config-inst - echo '#!/bin/sh' > gdal-config-inst - echo 'CONFIG_LIBS="$(CONFIG_LIBS_INS)"' >> gdal-config-inst - echo 'CONFIG_DEP_LIBS="$(LIBS)"' >> gdal-config-inst - echo 'CONFIG_PREFIX="$(INST_PREFIX)"' >> gdal-config-inst - echo 'CONFIG_CFLAGS="-I$(INST_INCLUDE)"' >> gdal-config-inst - echo 'CONFIG_DATA="$(INST_DATA)"' >> gdal-config-inst - echo 'CONFIG_VERSION="'`cat ../VERSION`'"' >> gdal-config-inst - echo 'CONFIG_OGR_ENABLED=yes' >> gdal-config-inst # Deprecated. Always true. - echo 'CONFIG_GNM_ENABLED=$(GNM_ENABLED)' >> gdal-config-inst - echo 'CONFIG_FORMATS="$(GDAL_FORMATS)"' >> gdal-config-inst - cat gdal-config.in >> gdal-config-inst - chmod a+x gdal-config-inst - - -install: default - for f in $(BIN_LIST) ; do $(INSTALL) $$f $(DESTDIR)$(INST_BIN) ; done - $(INSTALL_DATA) gdal_utils.h $(DESTDIR)$(INST_INCLUDE) - $(INSTALL) gdal-config-inst $(DESTDIR)$(INST_BIN)/gdal-config - diff --git a/apps/gdal-config.in b/apps/gdal-config.in deleted file mode 100644 index 024dcd132498..000000000000 --- a/apps/gdal-config.in +++ /dev/null @@ -1,64 +0,0 @@ -usage() -{ - cat <&2 -fi - -case $1 in - --libs) - echo $CONFIG_LIBS - ;; - - --dep-libs) - echo $CONFIG_DEP_LIBS - ;; - - --cflags) - echo $CONFIG_CFLAGS - ;; - - --datadir) - echo $CONFIG_DATA - ;; - - --prefix) - echo $CONFIG_PREFIX - ;; - - --version) - echo $CONFIG_VERSION - ;; - - --ogr-enabled) - echo yes - ;; - - --gnm-enabled) - echo $CONFIG_GNM_ENABLED - ;; - - --formats) - echo $CONFIG_FORMATS - ;; - - *) - usage 1 1>&2 - ;; - -esac diff --git a/apps/makefile.vc b/apps/makefile.vc deleted file mode 100644 index 2e33b4d6bda6..000000000000 --- a/apps/makefile.vc +++ /dev/null @@ -1,222 +0,0 @@ - -GDAL_ROOT = .. - -XTRAOBJ = $(SETARGV) - -EXTRAFLAGS = -I..\frmts\vrt -I..\ogr\ogrsf_frmts\geojson\libjson -I..\ogr\ogrsf_frmts\geojson -I..\ogr\ogrsf_frmts\generic $(GEOS_CFLAGS) $(PROJ_INCLUDE) - -!INCLUDE ..\nmake.opt - -LIBS = $(GDALLIB) - -!IFDEF INCLUDE_OGR_FRMTS -OGR_PROGRAMS = gdal_contour.exe gdaltindex.exe gdal_rasterize.exe \ - gdal_grid.exe ogrinfo.exe ogr2ogr.exe ogrtindex.exe ogrlineref.exe\ - gdalbuildvrt.exe -!ENDIF - -!IFDEF INCLUDE_GNM_FRMTS -GNM_PROGRAMS = gnmmanage.exe gnmanalyse.exe -!ENDIF - - -default: gdal_translate.exe gdalinfo.exe gdaladdo.exe gdalwarp.exe \ - nearblack.exe gdalmanage.exe gdalenhance.exe gdaltransform.exe\ - gdaldem.exe gdallocationinfo.exe gdalsrsinfo.exe gdalmdiminfo.exe \ - gdalmdimtranslate.exe gdal_viewshed.exe gdal_create.exe $(OGR_PROGRAMS) $(GNM_PROGRAMS) - -all: default multireadtest.exe \ - dumpoverviews.exe gdalwarpsimple.exe gdalflattenmask.exe \ - gdaltorture.exe gdal2ogr.exe test_ogrsf.exe -OBJ = commonutils.obj gdalinfo_lib.obj gdal_translate_lib.obj gdalwarp_lib.obj ogr2ogr_lib.obj \ - gdaldem_lib.obj nearblack_lib.obj gdal_grid_lib.obj gdal_rasterize_lib.obj gdalbuildvrt_lib.obj \ - gdalmdiminfo_lib.obj gdalmdimtranslate_lib.obj - -appslib: $(OBJ) - -gdalinfo.exe: gdalinfo_bin.cpp $(GDALLIB) $(XTRAOBJ) - $(CC) $(CFLAGS) gdalinfo_bin.cpp $(XTRAOBJ) $(LIBS) \ - /Fe$@ /link $(LINKER_FLAGS) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - -gdalmdiminfo.exe: gdalmdiminfo_bin.cpp $(GDALLIB) $(XTRAOBJ) - $(CC) $(CFLAGS) gdalmdiminfo_bin.cpp $(XTRAOBJ) $(LIBS) \ - /Fe$@ /link $(LINKER_FLAGS) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - -gdalmdimtranslate.exe: gdalmdimtranslate_bin.cpp $(GDALLIB) $(XTRAOBJ) - $(CC) $(CFLAGS) gdalmdimtranslate_bin.cpp $(XTRAOBJ) $(LIBS) \ - /Fe$@ /link $(LINKER_FLAGS) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - -gdal_translate.exe: gdal_translate_bin.cpp $(GDALLIB) $(XTRAOBJ) - $(CC) $(CFLAGS) gdal_translate_bin.cpp $(XTRAOBJ) $(LIBS) \ - /Fe$@ /link $(LINKER_FLAGS) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - -gdaladdo.exe: gdaladdo.cpp $(GDALLIB) $(XTRAOBJ) - $(CC) $(CFLAGS) gdaladdo.cpp $(XTRAOBJ) $(LIBS) \ - /link $(LINKER_FLAGS) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - -gdalwarpsimple.exe: gdalwarpsimple.c $(GDALLIB) $(XTRAOBJ) - $(CC) $(CFLAGS) gdalwarpsimple.c $(XTRAOBJ) $(LIBS) \ - /link $(LINKER_FLAGS) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - -gdaltransform.exe: gdaltransform.cpp $(GDALLIB) $(XTRAOBJ) - $(CC) $(CFLAGS) gdaltransform.cpp $(XTRAOBJ) $(LIBS) \ - /link $(LINKER_FLAGS) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - -gdallocationinfo.exe: gdallocationinfo.cpp $(GDALLIB) $(XTRAOBJ) - $(CC) $(CFLAGS) gdallocationinfo.cpp $(XTRAOBJ) $(LIBS) \ - /link $(LINKER_FLAGS) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - -gdalsrsinfo.exe: gdalsrsinfo.cpp $(GDALLIB) $(XTRAOBJ) - $(CC) $(CFLAGS) gdalsrsinfo.cpp $(XTRAOBJ) $(LIBS) \ - /link $(LINKER_FLAGS) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - -gdalwarp.exe: gdalwarp_bin.cpp $(GDALLIB) $(XTRAOBJ) - $(CC) $(CFLAGS) gdalwarp_bin.cpp $(XTRAOBJ) $(LIBS) \ - /Fe$@ /link $(LINKER_FLAGS) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - -gdal_contour.exe: gdal_contour.cpp $(GDALLIB) $(XTRAOBJ) - $(CC) $(CFLAGS) gdal_contour.cpp $(XTRAOBJ) $(LIBS) \ - /link $(LINKER_FLAGS) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - -gdal_viewshed.exe: gdal_viewshed.cpp $(GDALLIB) $(XTRAOBJ) - $(CC) $(CFLAGS) gdal_viewshed.cpp $(XTRAOBJ) $(LIBS) \ - /link $(LINKER_FLAGS) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - -gdal_create.exe: gdal_create.cpp $(GDALLIB) $(XTRAOBJ) - $(CC) $(CFLAGS) gdal_create.cpp $(XTRAOBJ) $(LIBS) \ - /link $(LINKER_FLAGS) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - -nearblack.exe: nearblack_bin.cpp $(GDALLIB) $(XTRAOBJ) - $(CC) $(CFLAGS) nearblack_bin.cpp $(XTRAOBJ) $(LIBS) \ - /Fe$@ /link $(LINKER_FLAGS) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - -gdalenhance.exe: gdalenhance.cpp $(GDALLIB) $(XTRAOBJ) - $(CC) $(CFLAGS) gdalenhance.cpp $(XTRAOBJ) $(LIBS) \ - /link $(LINKER_FLAGS) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - -gdaldem.exe: gdaldem_bin.cpp $(GDALLIB) $(XTRAOBJ) - $(CC) $(CFLAGS) gdaldem_bin.cpp $(XTRAOBJ) $(LIBS) \ - /Fe$@ /link $(LINKER_FLAGS) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - -gdal_grid.exe: gdal_grid_bin.cpp $(GDALLIB) $(XTRAOBJ) - $(CC) $(CFLAGS) gdal_grid_bin.cpp $(XTRAOBJ) $(LIBS) \ - /Fe$@ /link $(LINKER_FLAGS) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - -gdalmanage.exe: gdalmanage.cpp $(GDALLIB) $(XTRAOBJ) - $(CC) $(CFLAGS) gdalmanage.cpp $(XTRAOBJ) $(LIBS) \ - /link $(LINKER_FLAGS) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - -gdaltindex.exe: gdaltindex.cpp $(GDALLIB) $(XTRAOBJ) - $(CC) $(CFLAGS) gdaltindex.cpp \ - $(XTRAOBJ) $(LIBS) /link $(LINKER_FLAGS) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - -gdal_rasterize.exe: gdal_rasterize_bin.cpp $(GDALLIB) $(XTRAOBJ) - $(CC) $(CFLAGS) gdal_rasterize_bin.cpp $(XTRAOBJ) $(LIBS) \ - /Fe$@ /link $(LINKER_FLAGS) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - -multireadtest.exe: multireadtest.cpp $(GDALLIB) $(XTRAOBJ) - $(CC) $(CFLAGS) multireadtest.cpp $(XTRAOBJ) $(LIBS) \ - /link $(LINKER_FLAGS) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - -gdalasyncread.exe: gdalasyncread.cpp $(GDALLIB) $(XTRAOBJ) - $(CC) $(CFLAGS) gdalasyncread.cpp $(XTRAOBJ) $(LIBS) \ - /link $(LINKER_FLAGS) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - -testreprojmulti.exe: testreprojmulti.cpp $(GDALLIB) $(XTRAOBJ) - $(CC) $(CFLAGS) testreprojmulti.cpp $(XTRAOBJ) $(LIBS) \ - /link $(LINKER_FLAGS) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - -ogr2ogr.exe: ogr2ogr_bin.cpp $(GDALLIB) $(XTRAOBJ) - $(CC) $(CFLAGS) ogr2ogr_bin.cpp $(XTRAOBJ) $(LIBS) \ - /Fe$@ /link $(LINKER_FLAGS) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - -ogrinfo.exe: ogrinfo.cpp $(GDALLIB) $(XTRAOBJ) - $(CC) $(CFLAGS) ogrinfo.cpp $(XTRAOBJ) $(LIBS) \ - /link $(LINKER_FLAGS) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - -ogrtindex.exe: ogrtindex.cpp $(GDALLIB) $(XTRAOBJ) - $(CC) $(CFLAGS) ogrtindex.cpp $(XTRAOBJ) $(LIBS) \ - /link $(LINKER_FLAGS) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - -ogrlineref.exe: ogrlineref.cpp $(GDALLIB) $(XTRAOBJ) - $(CC) $(CFLAGS) ogrlineref.cpp $(XTRAOBJ) $(LIBS) \ - /link $(LINKER_FLAGS) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - -test_ogrsf.exe: test_ogrsf.cpp $(GDALLIB) $(XTRAOBJ) - $(CC) $(CFLAGS) test_ogrsf.cpp $(XTRAOBJ) $(LIBS) \ - /link $(LINKER_FLAGS) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - -gdalbuildvrt.exe: gdalbuildvrt_bin.cpp $(GDALLIB) $(XTRAOBJ) - $(CC) $(CFLAGS) gdalbuildvrt_bin.cpp $(XTRAOBJ) $(LIBS) \ - /Fe$@ /link $(LINKER_FLAGS) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - -dumpoverviews.exe: dumpoverviews.cpp $(GDALLIB) $(XTRAOBJ) - $(CC) $(CFLAGS) dumpoverviews.cpp $(XTRAOBJ) $(LIBS) \ - /link $(LINKER_FLAGS) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - -gdalflattenmask.exe: gdalflattenmask.c $(GDALLIB) $(XTRAOBJ) - $(CC) $(CFLAGS) gdalflattenmask.c $(XTRAOBJ) $(LIBS) \ - /link $(LINKER_FLAGS) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - -gdaltorture.exe: gdaltorture.cpp $(GDALLIB) $(XTRAOBJ) - $(CC) $(CFLAGS) gdaltorture.cpp $(XTRAOBJ) $(LIBS) \ - /link $(LINKER_FLAGS) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - -gdal2ogr.exe: gdal2ogr.c $(GDALLIB) $(XTRAOBJ) - $(CC) $(CFLAGS) gdal2ogr.c $(XTRAOBJ) $(LIBS) \ - /link $(LINKER_FLAGS) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - -gnmmanage.exe: gnmmanage.cpp $(GDALLIB) $(XTRAOBJ) - $(CC) $(CFLAGS) gnmmanage.cpp $(XTRAOBJ) $(LIBS) \ - /link $(LINKER_FLAGS) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - -gnmanalyse.exe: gnmanalyse.cpp $(GDALLIB) $(XTRAOBJ) - $(CC) $(CFLAGS) gnmanalyse.cpp $(XTRAOBJ) $(LIBS) \ - /link $(LINKER_FLAGS) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - -clean: - -del *.obj - -del *.exe - -del *.pdb - -del *.ilk - -del *.lib - -del *.manifest - -del *.exp - -install: default - copy *.exe $(BINDIR) diff --git a/autogen.sh b/autogen.sh deleted file mode 100755 index 9ae39e49445a..000000000000 --- a/autogen.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -set -x - -if test -f CMakeCache.txt; then - echo "ERROR: mixing autoconf builds and in-tree CMake builds is not supported" - exit 1 -fi - -#libtoolize --force --copy -aclocal -I ./m4 -# We deliberately do not use autoheader, since it introduces PACKAGE junk -# that conflicts with other packages in cpl_config.h.in (FrankW) -#autoheader -autoconf diff --git a/autotest/GNUmakefile b/autotest/GNUmakefile deleted file mode 100644 index 61e42ea9a772..000000000000 --- a/autotest/GNUmakefile +++ /dev/null @@ -1,26 +0,0 @@ -all: - @echo "Run 'make -j test'" - -gcore-test: - pytest gcore - -gdrivers-test: - pytest gdrivers - -alg-test: - pytest alg - -osr-test: - pytest osr - -ogr-test: - pytest ogr - -utilities-test: - pytest utilities - -pyscripts-test: - pytest pyscripts - -test check: - @$(MAKE) $(MFLAGS) gcore-test gdrivers-test alg-test ogr-test osr-test utilities-test pyscripts-test diff --git a/autotest/cpp/GNUmakefile b/autotest/cpp/GNUmakefile deleted file mode 100644 index 0159832a5540..000000000000 --- a/autotest/cpp/GNUmakefile +++ /dev/null @@ -1,182 +0,0 @@ -# This Makefile requires GNU Make. - -include ../../GDALmake.opt -CXXFLAGS += -I. -Itut $(GDAL_INCLUDE) -CPPFLAGS:=$(filter-out -DGDAL_COMPILATION,$(CPPFLAGS)) - -CFLAGS += -I. -Itut $(GDAL_INCLUDE) - -PROGS = gdal_unit_test testperfcopywords testcopywords testclosedondestroydm testthreadcond testvirtualmem testblockcache testblockcachewrite testblockcachelimits testdestroy testmultithreadedwriting test_include_from_c_file test_include_from_cpp_file test_include_from_cpp_file_with_extern_c test_osr_set_proj_search_paths bug1488 proj_with_fork testlog - -all: $(PROGS) - -test check: all - make quick_test - ./testperfcopywords - -quick_test: gdal_unit_test testcopywords testclosedondestroydm testthreadcond testvirtualmem testblockcache testblockcachewrite testblockcachelimits testmultithreadedwriting testdestroy test_osr_set_proj_search_paths bug1488 proj_with_fork - ./gdal_unit_test - ./testcopywords - ./testclosedondestroydm - ./testthreadcond - ./testvirtualmem - ./testblockcache -check -co TILED=YES --debug TEST,LOCK -loops 3 --config GDAL_RB_LOCK_DEBUG_CONTENTION YES --config GDAL_CACHEMAX 100 - ./testblockcache -check -co TILED=YES --debug TEST,LOCK -loops 3 --config GDAL_RB_LOCK_DEBUG_CONTENTION YES --config GDAL_RB_LOCK_TYPE SPIN --config GDAL_CACHEMAX 100 - ./testblockcache -check -co TILED=YES -migrate --config GDAL_CACHEMAX 100 - ./testblockcache -check -memdriver --config GDAL_CACHEMAX 100 - ./testblockcachewrite --debug ON - ./testblockcache --config GDAL_BAND_BLOCK_CACHE HASHSET -check -co TILED=YES --debug TEST,LOCK -loops 3 --config GDAL_RB_LOCK_DEBUG_CONTENTION YES --config GDAL_CACHEMAX 100 - ./testblockcache --config GDAL_BAND_BLOCK_CACHE HASHSET -check -co TILED=YES --debug TEST,LOCK,GDAL -loops 3 --config GDAL_RB_LOCK_DEBUG_CONTENTION YES -threads 2 --config GDAL_CACHEMAX 100 - ./testblockcache --config GDAL_BAND_BLOCK_CACHE HASHSET -check -co TILED=YES --debug TEST,LOCK -loops 3 --config GDAL_RB_LOCK_DEBUG_CONTENTION YES --config GDAL_RB_LOCK_TYPE SPIN --config GDAL_CACHEMAX 100 - ./testblockcachelimits --debug ON - ./testmultithreadedwriting - ./testdestroy - ./test_osr_set_proj_search_paths - ./bug1488 - ./proj_with_fork - ./testlog - -testsse2: - $(CXX) -g -O2 testsse.cpp -o testsse -I../../port -I../../gcore - ./testsse - $(CXX) -g -O2 -DUSE_SSE2_EMULATION -DNO_WARN_USE_SSE2_EMULATION testsse.cpp -o testsse -I../../port -I../../gcore - ./testsse - -testavx2: testsse2 - $(CXX) -g -O2 -mssse3 testsse.cpp -o testsse -I../../port -I../../gcore - ./testsse - $(CXX) -g -O2 -mssse3 -msse4.1 testsse.cpp -o testsse -I../../port -I../../gcore - ./testsse - $(CXX) -g -O2 -mavx2 testsse.cpp -o testsse -I../../port -I../../gcore - ./testsse - -OBJ = \ - gdal_unit_test.o \ - test_alg.o \ - test_cpl.o \ - test_gdal.o \ - test_gdal_aaigrid.o \ - test_gdal_dted.o \ - test_gdal_gtiff.o \ - test_gdal_pixelfn.o \ - test_triangulation.o \ - test_ogr.o \ - test_ogr_geometry_stealing.o \ - test_ogr_lgpl.o \ - test_ogr_geos.o \ - test_ogr_shape.o \ - test_osr.o \ - test_osr_ct.o \ - test_osr_pci.o \ - test_osr_proj4.o \ - test_marching_squares_square.o \ - test_marching_squares_tile.o \ - test_marching_squares_contour.o \ - test_marching_squares_polygon.o \ - tut/tut_gdal.o - -gdal_unit_test: $(OBJ) - $(LD) $(LDFLAGS) $^ $(CONFIG_LIBS) -o $@ - -testperfcopywords.o: testperfcopywords.cpp - $(CXX) $(CXXFLAGS) -O2 -c $< - -testperfcopywords: testperfcopywords.o - $(LD) $(LDFLAGS) $< $(CONFIG_LIBS) -o $@ - -testcopywords.o: testcopywords.cpp - $(CXX) $(CXXFLAGS) -O2 -c $< - -testcopywords: testcopywords.o - $(LD) $(LDFLAGS) $< $(CONFIG_LIBS) -o $@ - -testclosedondestroydm: testclosedondestroydm.o - $(LD) $(LDFLAGS) $< $(CONFIG_LIBS) -o $@ - -testthreadcond: testthreadcond.o - $(LD) $(LDFLAGS) $< $(CONFIG_LIBS) -o $@ - -testvirtualmem: testvirtualmem.o - $(LD) $(LDFLAGS) $< $(CONFIG_LIBS) -o $@ - -testblockcache.o: testblockcache.cpp - $(CXX) $(CXXFLAGS) -O2 -c $< - -testblockcache: testblockcache.o - $(LD) $(LDFLAGS) $< $(CONFIG_LIBS) -o $@ - -testblockcachewrite.o: testblockcachewrite.cpp - $(CXX) $(CXXFLAGS) -O2 -c $< - -testblockcachewrite: testblockcachewrite.o - $(LD) $(LDFLAGS) $< $(CONFIG_LIBS) -o $@ - -testmultithreadedwriting.o: testmultithreadedwriting.cpp - $(CXX) $(CXXFLAGS) -O2 -c $< - -testmultithreadedwriting: testmultithreadedwriting.o - $(LD) $(LDFLAGS) $< $(CONFIG_LIBS) -o $@ - -testblockcachelimits.o: testblockcachelimits.cpp - $(CXX) $(CXXFLAGS) -O2 -c $< - -testblockcachelimits: testblockcachelimits.o - $(LD) $(LDFLAGS) $< $(CONFIG_LIBS) -o $@ - -testdestroy: testdestroy.o - $(LD) $(LDFLAGS) $< $(CONFIG_LIBS) -o $@ - -test_osr_set_proj_search_paths.o: test_osr_set_proj_search_paths.cpp - $(CXX) $(CXXFLAGS) $(PROJ_INCLUDE) $(PROJ_CFLAGS) -c $< - -test_osr_set_proj_search_paths: test_osr_set_proj_search_paths.o - $(LD) $(LDFLAGS) $< $(CONFIG_LIBS) -o $@ - -bug1488: bug1488.o - $(LD) $(LDFLAGS) $< $(CONFIG_LIBS) -o $@ - -proj_with_fork: proj_with_fork.o - $(LD) $(LDFLAGS) $< $(CONFIG_LIBS) -o $@ - -testlog: testlog.o - $(LD) $(LDFLAGS) $< $(CONFIG_LIBS) -o $@ - -vsipreload.so: ../../port/vsipreload.o - $(CXX) -fPIC -g $(CXXFLAGS) $< $(CONFIG_LIBS) $(LDFLAGS) -shared -o $@ - -test_include_from_c_file: - for HEADER_FILE in cpl_atomic_ops.h cpl_conv.h cpl_csv.h cpl_error.h cpl_hash_set.h cpl_list.h cpl_minixml.h cpl_port.h cpl_progress.h cpl_quad_tree.h cpl_vsi.h gdal_alg.h gdal_version.h gdal.h gdal_utils.h ogr_api.h ogr_core.h ogr_srs_api.h; do \ - echo "#include \"$$HEADER_FILE\"" > tmp_include_from_c_file.c; \ - $(CC) $(CFLAGS) -c tmp_include_from_c_file.c; \ - rm -f tmp_include_from_c_file.*; \ - rm -f .libs/tmp_include_from_c_file.*; \ - done; \ - $(CC) $(CFLAGS) -c test_include_from_c_file.c - -test_include_from_cpp_file: - for HEADER_FILE in cpl_atomic_ops.h cpl_conv.h cpl_csv.h cpl_error.h cpl_hash_set.h cpl_list.h cpl_minixml.h cpl_port.h cpl_progress.h cpl_quad_tree.h cpl_vsi.h gdal_alg.h gdal_version.h gdal.h gdal_utils.h ogr_api.h ogr_core.h ogr_srs_api.h ogr_feature.h ogr_geometry.h ogrsf_frmts.h ogr_spatialref.h; do \ - echo "#include \"$$HEADER_FILE\"" > tmp_include_from_cpp_file.cpp; \ - $(CXX) $(CXXFLAGS) -c tmp_include_from_cpp_file.cpp; \ - rm -f tmp_include_from_cpp_file.*; \ - rm -f .libs/tmp_include_from_cpp_file.*; \ - done; \ - $(CXX) $(CXXFLAGS) -c test_c_include_from_cpp_file.cpp - -test_include_from_cpp_file_with_extern_c: - for HEADER_FILE in cpl_atomic_ops.h cpl_conv.h cpl_csv.h cpl_error.h cpl_hash_set.h cpl_list.h cpl_minixml.h cpl_port.h cpl_progress.h cpl_quad_tree.h cpl_vsi.h gdal_alg.h gdal_version.h gdal.h gdal_utils.h ogr_api.h ogr_core.h ogr_srs_api.h; do \ - echo "extern \"C\" {" > test_include_from_cpp_file_with_extern_c.cpp; \ - echo "#include \"$$HEADER_FILE\"" >> test_include_from_cpp_file_with_extern_c.cpp; \ - echo "}" >> test_include_from_cpp_file_with_extern_c.cpp; \ - $(CXX) $(CXXFLAGS) -c test_include_from_cpp_file_with_extern_c.cpp; \ - rm -f test_include_from_cpp_file_with_extern_c.*; \ - rm -f .libs/test_include_from_cpp_file_with_extern_c.*; \ - done - -clean: - $(RM) $(PROGS) testsse - $(RM) $(OBJ) - $(RM) *.o - $(RM) *.a - $(RM) *.out - $(RM) *~ - diff --git a/autotest/cpp/makefile.vc b/autotest/cpp/makefile.vc deleted file mode 100644 index 3e4788ae6e9f..000000000000 --- a/autotest/cpp/makefile.vc +++ /dev/null @@ -1,184 +0,0 @@ -# $Id: makefile.vc,v 1.5 2006/12/06 15:38:16 mloskot Exp $ -# -# Makefile to build GDAL C++ Unit Tests (subset of Python tests) -# -# These tests are dedicated to Windows CE platform and cover features -# supported by Windows CE port of GDAL. -# Also, compatible and runnable on Windows 2000/XP. -# -############################################################################# -# CONFIGURATION - -# GDAL library - -!IFNDEF GDAL_ROOT -!IF EXIST("..\..\nmake.opt") -GDAL_ROOT = ..\.. -!ENDIF -!ENDIF - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -# Specification of enabled GDAL drivers -#GDAL_SUPPORT = \ -# -DHAVE_GEOS \ -# -DOGR_ENABLED \ -# -DSHAPE_ENABLED \ -# -DFRMT_aaigrid \ -# -DFRMT_dted \ -# -DFRMT_gtiff -GDAL_SUPPORT = \ - -DOGR_ENABLED \ - -DSHAPE_ENABLED \ - -DFRMT_aaigrid \ - -DFRMT_dted \ - -DFRMT_gtiff - -# END OF CONFIGURATION -############################################################################# - -GDAL_LIB = $(GDAL_ROOT)\gdal_i.lib - -INCLUDE_DIR = \ - -I. \ - -Itut \ - -I$(PROJ4_ROOT)\src - -OBJ = \ - test_cpl.obj \ - test_alg.obj \ - test_gdal.obj \ - test_gdal_aaigrid.obj \ - test_gdal_dted.obj \ - test_gdal_gtiff.obj \ - test_gdal_pixelfn.obj \ - test_triangulation.obj \ - test_ogr.obj \ - test_ogr_geometry_stealing.obj \ - test_ogr_lgpl.obj \ - test_ogr_geos.obj \ - test_ogr_shape.obj \ - test_osr.obj \ - test_osr_ct.obj \ - test_osr_pci.obj \ - test_osr_proj4.obj \ - test_marching_squares_square.obj \ - test_marching_squares_tile.obj \ - test_marching_squares_contour.obj \ - test_marching_squares_polygon.obj \ - tut/tut_gdal.obj - -# Commands -RM = -del - -# Complete set of compilation flags -CFLAGS = $(CFLAGS) $(INCLUDE_DIR) -CPPFLAGS = $(CFLAGS) - -GDAL_TEST_EXE = gdal_unit_test.exe - -default: $(GDAL_TEST_EXE) testcopywords.exe testperfcopywords.exe testclosedondestroydm.exe testthreadcond.exe testblockcache.exe testblockcachewrite.exe testblockcachelimits.exe testdestroy.exe testmultithreadedwriting.exe test_include_from_c_file.exe test_c_include_from_cpp_file.exe bug1488.exe - -check: $(GDAL_TEST_EXE) testblockcache.exe testblockcachewrite.exe testblockcachelimits.exe testmultithreadedwriting.exe bug1488.exe testlog.exe - $(GDAL_TEST_EXE) - testblockcache.exe -check -co TILED=YES --debug TEST,LOCK -loops 3 --config GDAL_RB_LOCK_DEBUG_CONTENTION YES - testblockcache.exe -check -co TILED=YES --debug TEST,LOCK -loops 3 --config GDAL_RB_LOCK_DEBUG_CONTENTION YES --config GDAL_RB_LOCK_TYPE SPIN - testblockcache.exe -check -co TILED=YES -migrate - testblockcache.exe -check -memdriver - testblockcachewrite.exe --debug ON - testblockcachelimits.exe --debug ON - testdestroy.exe - testmultithreadedwriting.exe - bug1488.exe - testlog.exe - -check-all: check testcopywords.exe testperfcopywords.exe testclosedondestroydm.exe testthreadcond.exe - testcopywords.exe - testperfcopywords.exe - testclosedondestroydm.exe - testthreadcond.exe - -$(GDAL_TEST_EXE): gdal_unit_test.cpp $(GDAL_DLL) $(OBJ) - $(CC) gdal_unit_test.cpp $(CFLAGS) $(OBJ) $(GDAL_LIB) $(GEOS_LIB) $(PROJ4_LIB) - if exist $(GDAL_TEST_EXE).manifest mt -manifest $(GDAL_TEST_EXE).manifest -outputresource:$(GDAL_TEST_EXE);1 - -testcopywords.exe: testcopywords.cpp - $(CC) testcopywords.cpp $(CFLAGS) $(GDAL_LIB) - if exist testcopywords.exe.manifest mt -manifest testcopywords.exe.manifest -outputresource:testcopywords.exe;1 - -testperfcopywords.exe: testperfcopywords.cpp - $(CC) testperfcopywords.cpp $(CFLAGS) $(GDAL_LIB) - if exist testperfcopywords.exe.manifest mt -manifest testperfcopywords.exe.manifest -outputresource:testperfcopywords.exe;1 - -testclosedondestroydm.exe: testclosedondestroydm.cpp - $(CC) testclosedondestroydm.cpp $(CFLAGS) $(GDAL_LIB) - if exist testclosedondestroydm.exe.manifest mt -manifest testclosedondestroydm.exe.manifest -outputresource:testclosedondestroydm.exe;1 - -testthreadcond.exe: testthreadcond.cpp - $(CC) testthreadcond.cpp $(CFLAGS) $(GDAL_LIB) - if exist testthreadcond.exe.manifest mt -manifest testthreadcond.exe.manifest -outputresource:testthreadcond.exe;1 - -testblockcache.exe: testblockcache.cpp - $(CC) testblockcache.cpp $(CFLAGS) $(GDAL_LIB) - if exist testblockcache.exe.manifest mt -manifest testblockcache.exe.manifest -outputresource:testblockcache.exe;1 - -testblockcachewrite.exe: testblockcachewrite.cpp - $(CC) testblockcachewrite.cpp $(CFLAGS) $(GDAL_LIB) - if exist testblockcachewrite.exe.manifest mt -manifest testblockcachewrite.exe.manifest -outputresource:testblockcachewrite.exe;1 - -testmultithreadedwriting.exe: testmultithreadedwriting.cpp - $(CC) testmultithreadedwriting.cpp $(CFLAGS) $(GDAL_LIB) - if exist testmultithreadedwriting.exe.manifest mt -manifest testmultithreadedwriting.exe.manifest -outputresource:testmultithreadedwriting.exe;1 - -testblockcachelimits.exe: testblockcachelimits.cpp - $(CC) testblockcachelimits.cpp $(CFLAGS) $(GDAL_LIB) - if exist testblockcachelimits.exe.manifest mt -manifest testblockcachelimits.exe.manifest -outputresource:testblockcachelimits.exe;1 - -testdestroy.exe: testdestroy.cpp - $(CC) testdestroy.cpp $(CFLAGS) $(GDAL_LIB) - if exist testdestroy.exe.manifest mt -manifest testdestroy.exe.manifest -outputresource:testdestroy.exe;1 - -test_include_from_c_file.exe: test_include_from_c_file.c - $(CC) test_include_from_c_file.c $(CFLAGS) $(GDAL_LIB) - if exist test_include_from_c_file.exe.manifest mt -manifest test_include_from_c_file.exe.manifest -outputresource:test_include_from_c_file.exe;1 - -test_c_include_from_cpp_file.exe: test_c_include_from_cpp_file.cpp - $(CC) test_c_include_from_cpp_file.cpp $(CFLAGS) $(GDAL_LIB) - if exist test_c_include_from_cpp_file.exe.manifest mt -manifest test_c_include_from_cpp_file.exe.manifest -outputresource:test_c_include_from_cpp_file.exe;1 - -bug1488.exe: bug1488.cpp - $(CC) bug1488.cpp $(CFLAGS) $(GDAL_LIB) - if exist bug1488.exe.manifest mt -manifest bug1488.exe.manifest -outputresource:bug1488.exe;1 - -testlog.exe: testlog.cpp - $(CC) testlog.cpp $(CFLAGS) $(GDAL_LIB) - if exist testlog.exe.manifest mt -manifest testlog.exe.manifest -outputresource:testlog.exe;1 - -copy-gdal-dll: $(GDAL_DLL) - -$(GDAL_DLL): $(GDAL_ROOT)\$(GDAL_DLL) - copy /y $(GDAL_ROOT)\$(GDAL_DLL) . - -.cpp.obj: - $(CC) $(CFLAGS) /c $*.cpp /Fo$@ - -.c.obj: - $(CC) $(CFLAGS) /c $*.c /Fo$@ - -clean: - $(RM) *~ - $(RM) *.dll - $(RM) *.exe - $(RM) *.exp - $(RM) *.ilk - $(RM) *.lib - $(RM) *.manifest - $(RM) *.obj - $(RM) *.pdb - $(RM) tmp\*.dbf - $(RM) tmp\*.dt0 - $(RM) tmp\*.grd - $(RM) tmp\*.shp - $(RM) tmp\*.shx - $(RM) tut\*.obj - diff --git a/config.guess b/config.guess deleted file mode 100755 index f50dcdb6de2a..000000000000 --- a/config.guess +++ /dev/null @@ -1,1480 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright 1992-2018 Free Software Foundation, Inc. - -timestamp='2018-02-24' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see . -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that -# program. This Exception is an additional permission under section 7 -# of the GNU General Public License, version 3 ("GPLv3"). -# -# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. -# -# You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess -# -# Please send patches to . - - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Options: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright 1992-2018 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > "$dummy.c" ; - for c in cc gcc c89 c99 ; do - if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -case "$UNAME_SYSTEM" in -Linux|GNU|GNU/*) - # If the system lacks a compiler, then just pick glibc. - # We could probably try harder. - LIBC=gnu - - eval "$set_cc_for_build" - cat <<-EOF > "$dummy.c" - #include - #if defined(__UCLIBC__) - LIBC=uclibc - #elif defined(__dietlibc__) - LIBC=dietlibc - #else - LIBC=gnu - #endif - EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" - - # If ldd exists, use it to detect musl libc. - if command -v ldd >/dev/null && \ - ldd --version 2>&1 | grep -q ^musl - then - LIBC=musl - fi - ;; -esac - -# Note: order is significant - the case branches are not exclusive. - -case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ - "/sbin/$sysctl" 2>/dev/null || \ - "/usr/sbin/$sysctl" 2>/dev/null || \ - echo unknown)` - case "$UNAME_MACHINE_ARCH" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - earmv*) - arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` - endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` - machine="${arch}${endian}"-unknown - ;; - *) machine="$UNAME_MACHINE_ARCH"-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently (or will in the future) and ABI. - case "$UNAME_MACHINE_ARCH" in - earm*) - os=netbsdelf - ;; - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval "$set_cc_for_build" - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # Determine ABI tags. - case "$UNAME_MACHINE_ARCH" in - earm*) - expr='s/^earmv[0-9]/-eabi/;s/eb$//' - abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "$UNAME_VERSION" in - Debian*) - release='-gnu' - ;; - *) - release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "$machine-${os}${release}${abi}" - exit ;; - *:Bitrig:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" - exit ;; - *:LibertyBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" - exit ;; - *:MidnightBSD:*:*) - echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" - exit ;; - *:ekkoBSD:*:*) - echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" - exit ;; - *:SolidBSD:*:*) - echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd"$UNAME_RELEASE" - exit ;; - *:MirBSD:*:*) - echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" - exit ;; - *:Sortix:*:*) - echo "$UNAME_MACHINE"-unknown-sortix - exit ;; - *:Redox:*:*) - echo "$UNAME_MACHINE"-unknown-redox - exit ;; - mips:OSF1:*.*) - echo mips-dec-osf1 - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE=alpha ;; - "EV4.5 (21064)") - UNAME_MACHINE=alpha ;; - "LCA4 (21066/21068)") - UNAME_MACHINE=alpha ;; - "EV5 (21164)") - UNAME_MACHINE=alphaev5 ;; - "EV5.6 (21164A)") - UNAME_MACHINE=alphaev56 ;; - "EV5.6 (21164PC)") - UNAME_MACHINE=alphapca56 ;; - "EV5.7 (21164PC)") - UNAME_MACHINE=alphapca57 ;; - "EV6 (21264)") - UNAME_MACHINE=alphaev6 ;; - "EV6.7 (21264A)") - UNAME_MACHINE=alphaev67 ;; - "EV6.8CB (21264C)") - UNAME_MACHINE=alphaev68 ;; - "EV6.8AL (21264B)") - UNAME_MACHINE=alphaev68 ;; - "EV6.8CX (21264D)") - UNAME_MACHINE=alphaev68 ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE=alphaev69 ;; - "EV7 (21364)") - UNAME_MACHINE=alphaev7 ;; - "EV7.9 (21364A)") - UNAME_MACHINE=alphaev79 ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" - # Reset EXIT trap before exiting to avoid spurious non-zero exit code. - exitcode=$? - trap '' 0 - exit $exitcode ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix"$UNAME_RELEASE" - exit ;; - arm*:riscos:*:*|arm*:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - s390x:SunOS:*:*) - echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" - exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" - exit ;; - i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux"$UNAME_RELEASE" - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval "$set_cc_for_build" - SUN_ARCH=i386 - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH=x86_64 - fi - fi - echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos"$UNAME_RELEASE" - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos"$UNAME_RELEASE" - ;; - sun4) - echo sparc-sun-sunos"$UNAME_RELEASE" - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos"$UNAME_RELEASE" - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint"$UNAME_RELEASE" - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint"$UNAME_RELEASE" - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint"$UNAME_RELEASE" - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten"$UNAME_RELEASE" - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten"$UNAME_RELEASE" - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix"$UNAME_RELEASE" - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix"$UNAME_RELEASE" - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix"$UNAME_RELEASE" - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval "$set_cc_for_build" - sed 's/^ //' << EOF > "$dummy.c" -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o "$dummy" "$dummy.c" && - dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`"$dummy" "$dummyarg"` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos"$UNAME_RELEASE" - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] - then - if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ - [ "$TARGET_BINARY_INTERFACE"x = x ] - then - echo m88k-dg-dgux"$UNAME_RELEASE" - else - echo m88k-dg-dguxbcs"$UNAME_RELEASE" - fi - else - echo i586-dg-dgux"$UNAME_RELEASE" - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" - fi - echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval "$set_cc_for_build" - sed 's/^ //' << EOF > "$dummy.c" - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[4567]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/lslpp ] ; then - IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | - awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` - else - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" - fi - echo "$IBM_ARCH"-ibm-aix"$IBM_REV" - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` - case "$UNAME_MACHINE" in - 9000/31?) HP_ARCH=m68000 ;; - 9000/[34]??) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "$sc_cpu_version" in - 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 - 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "$sc_kernel_bits" in - 32) HP_ARCH=hppa2.0n ;; - 64) HP_ARCH=hppa2.0w ;; - '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "$HP_ARCH" = "" ]; then - eval "$set_cc_for_build" - sed 's/^ //' << EOF > "$dummy.c" - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ "$HP_ARCH" = hppa2.0w ] - then - eval "$set_cc_for_build" - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | - grep -q __LP64__ - then - HP_ARCH=hppa2.0w - else - HP_ARCH=hppa64 - fi - fi - echo "$HP_ARCH"-hp-hpux"$HPUX_REV" - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux"$HPUX_REV" - exit ;; - 3050*:HI-UX:*:*) - eval "$set_cc_for_build" - sed 's/^ //' << EOF > "$dummy.c" - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo "$UNAME_MACHINE"-unknown-osf1mk - else - echo "$UNAME_MACHINE"-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` - FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` - FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` - FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi"$UNAME_RELEASE" - exit ;; - *:BSD/OS:*:*) - echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" - exit ;; - *:FreeBSD:*:*) - UNAME_PROCESSOR=`/usr/bin/uname -p` - case "$UNAME_PROCESSOR" in - amd64) - UNAME_PROCESSOR=x86_64 ;; - i386) - UNAME_PROCESSOR=i586 ;; - esac - echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" - exit ;; - i*:CYGWIN*:*) - echo "$UNAME_MACHINE"-pc-cygwin - exit ;; - *:MINGW64*:*) - echo "$UNAME_MACHINE"-pc-mingw64 - exit ;; - *:MINGW*:*) - echo "$UNAME_MACHINE"-pc-mingw32 - exit ;; - *:MSYS*:*) - echo "$UNAME_MACHINE"-pc-msys - exit ;; - i*:PW*:*) - echo "$UNAME_MACHINE"-pc-pw32 - exit ;; - *:Interix*:*) - case "$UNAME_MACHINE" in - x86) - echo i586-pc-interix"$UNAME_RELEASE" - exit ;; - authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix"$UNAME_RELEASE" - exit ;; - IA64) - echo ia64-unknown-interix"$UNAME_RELEASE" - exit ;; - esac ;; - i*:UWIN*:*) - echo "$UNAME_MACHINE"-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; - *:GNU:*:*) - # the GNU system - echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" - exit ;; - i*86:Minix:*:*) - echo "$UNAME_MACHINE"-pc-minix - exit ;; - aarch64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - aarch64_be:Linux:*:*) - UNAME_MACHINE=aarch64_be - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC=gnulibc1 ; fi - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - arc:Linux:*:* | arceb:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - arm*:Linux:*:*) - eval "$set_cc_for_build" - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - else - if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_PCS_VFP - then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi - else - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf - fi - fi - exit ;; - avr32*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - cris:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; - crisv32:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; - e2k:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - frv:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - hexagon:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - i*86:Linux:*:*) - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" - exit ;; - ia64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - k1om:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - m32r*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - m68*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - mips:Linux:*:* | mips64:Linux:*:*) - eval "$set_cc_for_build" - sed 's/^ //' << EOF > "$dummy.c" - #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" - test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } - ;; - mips64el:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - openrisc*:Linux:*:*) - echo or1k-unknown-linux-"$LIBC" - exit ;; - or32:Linux:*:* | or1k*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - padre:Linux:*:*) - echo sparc-unknown-linux-"$LIBC" - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-"$LIBC" - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; - PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; - *) echo hppa-unknown-linux-"$LIBC" ;; - esac - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-"$LIBC" - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-"$LIBC" - exit ;; - ppc64le:Linux:*:*) - echo powerpc64le-unknown-linux-"$LIBC" - exit ;; - ppcle:Linux:*:*) - echo powerpcle-unknown-linux-"$LIBC" - exit ;; - riscv32:Linux:*:* | riscv64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" - exit ;; - sh64*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - sh*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - tile*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - vax:Linux:*:*) - echo "$UNAME_MACHINE"-dec-linux-"$LIBC" - exit ;; - x86_64:Linux:*:*) - if objdump -f /bin/sh | grep -q elf32-x86-64; then - echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32 - else - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" - fi - exit ;; - xtensa*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo "$UNAME_MACHINE"-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo "$UNAME_MACHINE"-unknown-stop - exit ;; - i*86:atheos:*:*) - echo "$UNAME_MACHINE"-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo "$UNAME_MACHINE"-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos"$UNAME_RELEASE" - exit ;; - i*86:*DOS:*:*) - echo "$UNAME_MACHINE"-pc-msdosdjgpp - exit ;; - i*86:*:4.*:*) - UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" - else - echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" - else - echo "$UNAME_MACHINE"-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configure will decide that - # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - NCR*:*:4.2:* | MPRAS*:*:4.2:*) - OS_REL='.3' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } - /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos"$UNAME_RELEASE" - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos"$UNAME_RELEASE" - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos"$UNAME_RELEASE" - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos"$UNAME_RELEASE" - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv"$UNAME_RELEASE" - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo "$UNAME_MACHINE"-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo "$UNAME_MACHINE"-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux"$UNAME_RELEASE" - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv"$UNAME_RELEASE" - else - echo mips-unknown-sysv"$UNAME_RELEASE" - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; - x86_64:Haiku:*:*) - echo x86_64-unknown-haiku - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux"$UNAME_RELEASE" - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux"$UNAME_RELEASE" - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux"$UNAME_RELEASE" - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux"$UNAME_RELEASE" - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux"$UNAME_RELEASE" - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux"$UNAME_RELEASE" - exit ;; - SX-ACE:SUPER-UX:*:*) - echo sxace-nec-superux"$UNAME_RELEASE" - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody"$UNAME_RELEASE" - exit ;; - *:Rhapsody:*:*) - echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - eval "$set_cc_for_build" - if test "$UNAME_PROCESSOR" = unknown ; then - UNAME_PROCESSOR=powerpc - fi - if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - case $UNAME_PROCESSOR in - i386) UNAME_PROCESSOR=x86_64 ;; - powerpc) UNAME_PROCESSOR=powerpc64 ;; - esac - fi - # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc - if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_PPC >/dev/null - then - UNAME_PROCESSOR=powerpc - fi - fi - elif test "$UNAME_PROCESSOR" = i386 ; then - # Avoid executing cc on OS X 10.9, as it ships with a stub - # that puts up a graphical alert prompting to install - # developer tools. Any system running Mac OS X 10.7 or - # later (Darwin 11 and later) is required to have a 64-bit - # processor. This is not true of the ARM version of Darwin - # that Apple uses in portable devices. - UNAME_PROCESSOR=x86_64 - fi - echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = x86; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NEO-*:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk"$UNAME_RELEASE" - exit ;; - NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk"$UNAME_RELEASE" - exit ;; - NSR-*:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk"$UNAME_RELEASE" - exit ;; - NSV-*:NONSTOP_KERNEL:*:*) - echo nsv-tandem-nsk"$UNAME_RELEASE" - exit ;; - NSX-*:NONSTOP_KERNEL:*:*) - echo nsx-tandem-nsk"$UNAME_RELEASE" - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = 386; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo "$UNAME_MACHINE"-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux"$UNAME_RELEASE" - exit ;; - *:DragonFly:*:*) - echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "$UNAME_MACHINE" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" - exit ;; - i*86:rdos:*:*) - echo "$UNAME_MACHINE"-pc-rdos - exit ;; - i*86:AROS:*:*) - echo "$UNAME_MACHINE"-pc-aros - exit ;; - x86_64:VMkernel:*:*) - echo "$UNAME_MACHINE"-unknown-esx - exit ;; - amd64:Isilon\ OneFS:*:*) - echo x86_64-unknown-onefs - exit ;; -esac - -echo "$0: unable to guess system type" >&2 - -case "$UNAME_MACHINE:$UNAME_SYSTEM" in - mips:Linux | mips64:Linux) - # If we got here on MIPS GNU/Linux, output extra information. - cat >&2 <&2 </dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = "$UNAME_MACHINE" -UNAME_RELEASE = "$UNAME_RELEASE" -UNAME_SYSTEM = "$UNAME_SYSTEM" -UNAME_VERSION = "$UNAME_VERSION" -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-functions 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/config.rpath b/config.rpath deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/config.sub b/config.sub deleted file mode 100755 index 0b218edcbee0..000000000000 --- a/config.sub +++ /dev/null @@ -1,1801 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright 1992-2018 Free Software Foundation, Inc. - -timestamp='2018-02-28' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see . -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that -# program. This Exception is an additional permission under section 7 -# of the GNU General Public License, version 3 ("GPLv3"). - - -# Please send patches to . -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS - -Canonicalize a configuration name. - -Options: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright 1992-2018 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo "$1" - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ - kopensolaris*-gnu* | cloudabi*-eabi* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - android-linux) - os=-linux-android - basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown - ;; - *) - basic_machine=`echo "$1" | sed 's/-[^-]*$//'` - if [ "$basic_machine" != "$1" ] - then os=`echo "$1" | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze*) - os= - basic_machine=$1 - ;; - -bluegene*) - os=-cnk - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*178) - os=-lynxos178 - ;; - -lynx*5) - os=-lynxos5 - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | aarch64 | aarch64_be \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arceb \ - | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ - | avr | avr32 \ - | ba \ - | be32 | be64 \ - | bfin \ - | c4x | c8051 | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | e2k | epiphany \ - | fido | fr30 | frv | ft32 \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | hexagon \ - | i370 | i860 | i960 | ia16 | ia64 \ - | ip2k | iq2000 \ - | k1om \ - | le32 | le64 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa32r6 | mipsisa32r6el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64r6 | mipsisa64r6el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipsr5900 | mipsr5900el \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nds32 | nds32le | nds32be \ - | nios | nios2 | nios2eb | nios2el \ - | ns16k | ns32k \ - | open8 | or1k | or1knd | or32 \ - | pdp10 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle \ - | pru \ - | pyramid \ - | riscv32 | riscv64 \ - | rl78 | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu \ - | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ - | visium \ - | wasm32 \ - | x86 | xc16x | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - c54x) - basic_machine=tic54x-unknown - ;; - c55x) - basic_machine=tic55x-unknown - ;; - c6x) - basic_machine=tic6x-unknown - ;; - leon|leon[3-9]) - basic_machine=sparc-$basic_machine - ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) - ;; - ms1) - basic_machine=mt-unknown - ;; - - strongarm | thumb | xscale) - basic_machine=arm-unknown - ;; - xgate) - basic_machine=$basic_machine-unknown - os=-none - ;; - xscaleeb) - basic_machine=armeb-unknown - ;; - - xscaleel) - basic_machine=armel-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | aarch64-* | aarch64_be-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | ba-* \ - | be32-* | be64-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | c8051-* | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | e2k-* | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | hexagon-* \ - | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ - | ip2k-* | iq2000-* \ - | k1om-* \ - | le32-* | le64-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ - | microblaze-* | microblazeel-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa32r6-* | mipsisa32r6el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64r6-* | mipsisa64r6el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipsr5900-* | mipsr5900el-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* | nios2eb-* | nios2el-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | open8-* \ - | or1k*-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ - | pru-* \ - | pyramid-* \ - | riscv32-* | riscv64-* \ - | rl78-* | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ - | tahoe-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile*-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ - | vax-* \ - | visium-* \ - | wasm32-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-pc - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - asmjs) - basic_machine=asmjs-unknown - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux - ;; - bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c54x-*) - basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c55x-*) - basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c6x-*) - basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16 | cr16-*) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2*) - basic_machine=m68k-bull - os=-sysv3 - ;; - e500v[12]) - basic_machine=powerpc-unknown - os=$os"spe" - ;; - e500v[12]-*) - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=$os"spe" - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; - i*86v32) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - leon-*|leon[3-9]-*) - basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze*) - basic_machine=microblaze-xilinx - ;; - mingw64) - basic_machine=x86_64-pc - os=-mingw64 - ;; - mingw32) - basic_machine=i686-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - moxiebox) - basic_machine=moxie-unknown - os=-moxiebox - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` - ;; - msys) - basic_machine=i686-pc - os=-msys - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - nacl) - basic_machine=le32-unknown - os=-nacl - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - neo-tandem) - basic_machine=neo-tandem - ;; - nse-tandem) - basic_machine=nse-tandem - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - nsv-tandem) - basic_machine=nsv-tandem - ;; - nsx-tandem) - basic_machine=nsx-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc | ppcbe) basic_machine=powerpc-unknown - ;; - ppc-* | ppcbe-*) - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos | rdos64) - basic_machine=x86_64-pc - os=-rdos - ;; - rdos32) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - strongarm-* | thumb-*) - basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tile*) - basic_machine=$basic_machine-unknown - os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - x64) - basic_machine=x86_64-pc - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - xscale-* | xscalee[bl]-*) - basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases that might get confused - # with valid system types. - # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux - ;; - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # es1800 is here to avoid being matched by es* (a different OS) - -es1800*) - os=-ose - ;; - # Now accept the basic system types. - # The portable systems comes first. - # Each alternative MUST end in a * to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* | -plan9* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* | -cloudabi* | -sortix* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \ - | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* | -hcos* \ - | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ - | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ - | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ - | -midnightbsd*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -xray | -os68k* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo "$os" | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo "$os" | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo "$os" | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4*) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -zvmoe) - os=-zvmoe - ;; - -dicos*) - os=-dicos - ;; - -pikeos*) - # Until real need of OS specific support for - # particular features comes up, bare metal - # configurations are quite functional. - case $basic_machine in - arm*) - os=-eabi - ;; - *) - os=-elf - ;; - esac - ;; - -nacl*) - ;; - -ios) - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - c8051-*) - os=-elf - ;; - hexagon-*) - os=-elf - ;; - tic54x-*) - os=-coff - ;; - tic55x-*) - os=-coff - ;; - tic6x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - pru-*) - os=-elf - ;; - *-be) - os=-beos - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -cnk*|-aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` - ;; -esac - -echo "$basic_machine$os" -exit - -# Local variables: -# eval: (add-hook 'write-file-functions 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/configure.ac b/configure.ac deleted file mode 100644 index d34413e6dac3..000000000000 --- a/configure.ac +++ /dev/null @@ -1,5803 +0,0 @@ -dnl *************************************************************************** -dnl $Id$ -dnl -dnl Project: GDAL -dnl Purpose: Configure source file. -dnl Author: Frank Warmerdam, warmerdam@pobox.com -dnl -dnl *************************************************************************** -dnl Copyright (c) 2000, Frank Warmerdam -dnl -dnl Permission is hereby granted, free of charge, to any person obtaining a -dnl copy of this software and associated documentation files (the "Software"), -dnl to deal in the Software without restriction, including without limitation -dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, -dnl and/or sell copies of the Software, and to permit persons to whom the -dnl Software is furnished to do so, subject to the following conditions: -dnl -dnl The above copyright notice and this permission notice shall be included -dnl in all copies or substantial portions of the Software. -dnl -dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -dnl DEALINGS IN THE SOFTWARE. -dnl *************************************************************************** - -dnl Disable configure caching ... it causes lots of hassles. -define([AC_CACHE_LOAD], ) -define([AC_CACHE_SAVE], ) - -dnl Process this file with autoconf to produce a configure script. -AC_INIT -AC_CONFIG_SRCDIR([GDALmake.opt.in]) -AC_SUBST(PACKAGE, gdal) -AC_CONFIG_MACRO_DIR(m4) -AC_CONFIG_HEADERS([generated_headers/cpl_config.h:port/cpl_config.h.in]) -AH_TOP([#ifndef CPL_CONFIG_H]) -AH_TOP([#define CPL_CONFIG_H]) -AH_BOTTOM([#include "cpl_config_extras.h"]) -AH_BOTTOM([#endif]) - -AC_PREREQ([2.69]) - -dnl Compute the canonical host-system (the system we are building for) -dnl type variable $host -AC_CANONICAL_HOST - -dnl Enable as much warnings as possible -AC_LANG_PUSH([C]) -AX_COMPILER_VENDOR -AC_LANG_POP([C]) -AX_CFLAGS_WARN_ALL(C_WFLAGS) -AC_LANG_PUSH([C++]) -AX_COMPILER_VENDOR -AC_LANG_POP([C++]) -AX_CXXFLAGS_WARN_ALL(CXX_WFLAGS) - -dnl Remove -Wdeclaration-after-statement that is no longer appropriate in C99 -C_WFLAGS=`echo "$C_WFLAGS " | sed "s/-Wdeclaration-after-statement //"` - -dnl For ICC: it needs -we10006 instead of -Werror to turn unknown options to errors -dnl Some gcc/clang versions might succeed on this test, so also include -Werror in ERROR_ON_UNKNOWN_OPTIONS -AX_CHECK_COMPILE_FLAG([-Werror -we10006],[ERROR_ON_UNKNOWN_OPTIONS="-Werror -we10006"],[ERROR_ON_UNKNOWN_OPTIONS="-Werror"]) - -dnl A few ICC warnings to turn off -dnl warning #188: enumerated type mixed with another type (needed on libcsf) -dnl warning #1684: conversion from pointer to same-sized integral type (potential portability problem) (needed on frmts/mrf) -dnl warning #2259: non-pointer conversion from "size_t={unsigned long}" to "int" may lose significant bits -dnl warning #2304: non-explicit constructor with single argument may cause implicit type conversion -dnl warning #3280: declaration hides member -dnl remark #11074: Inlining inhibited by limit max-size -dnl remark #11076: To get full report use -qopt-report=4 -qopt-report-phase ipo -AX_CHECK_COMPILE_FLAG([-diag-disable 188,1684,2259,2304,3280,11074,11076],[C_WFLAGS="$C_WFLAGS -diag-disable 188,1684,2259,2304,3280,11074,11076" CXX_WFLAGS="$CXX_WFLAGS -diag-disable 188,1684,2259,2304,3280,11074,11076"],,[$ERROR_ON_UNKNOWN_OPTIONS]) - -AX_CHECK_COMPILE_FLAG([-Wextra],[C_WFLAGS="$C_WFLAGS -Wextra" CXX_WFLAGS="$CXX_WFLAGS -Wextra"],,[$ERROR_ON_UNKNOWN_OPTIONS]) -AX_CHECK_COMPILE_FLAG([-Winit-self],[C_WFLAGS="$C_WFLAGS -Winit-self" CXX_WFLAGS="$CXX_WFLAGS -Winit-self"],,[$ERROR_ON_UNKNOWN_OPTIONS]) -AX_CHECK_COMPILE_FLAG([-Wunused-parameter], [C_WFLAGS="$C_WFLAGS -Wunused-parameter" CXX_WFLAGS="$CXX_WFLAGS -Wunused-parameter" NO_UNUSED_PARAMETER_FLAG="-Wno-unused-parameter"],,[$ERROR_ON_UNKNOWN_OPTIONS]) -AX_CHECK_COMPILE_FLAG([-Wmissing-prototypes], [C_WFLAGS="$C_WFLAGS -Wmissing-prototypes"],,[$ERROR_ON_UNKNOWN_OPTIONS]) -AX_CHECK_COMPILE_FLAG([-Wmissing-declarations], [C_WFLAGS="$C_WFLAGS -Wmissing-declarations"],,[$ERROR_ON_UNKNOWN_OPTIONS]) -AX_CHECK_COMPILE_FLAG([-Wformat], [C_WFLAGS="$C_WFLAGS -Wformat" CXX_WFLAGS="$CXX_WFLAGS -Wformat"],,[$ERROR_ON_UNKNOWN_OPTIONS]) -AX_CHECK_COMPILE_FLAG([-Wformat -Werror=format-security -Wno-format-nonliteral], [C_WFLAGS="$C_WFLAGS -Werror=format-security -Wno-format-nonliteral" CXX_WFLAGS="$CXX_WFLAGS -Werror=format-security -Wno-format-nonliteral"],,[$ERROR_ON_UNKNOWN_OPTIONS]) -AX_CHECK_COMPILE_FLAG([-Wshorten-64-to-32], [C_WFLAGS="$C_WFLAGS -Wshorten-64-to-32" CXX_WFLAGS="$CXX_WFLAGS -Wshorten-64-to-32"],,[$ERROR_ON_UNKNOWN_OPTIONS]) -AX_CHECK_COMPILE_FLAG([-Wlogical-op], [C_WFLAGS="$C_WFLAGS -Wlogical-op" CXX_WFLAGS="$CXX_WFLAGS -Wlogical-op" NO_LOGICAL_OP_FLAG="-Wno-logical-op"],,[$ERROR_ON_UNKNOWN_OPTIONS]) -AX_CHECK_COMPILE_FLAG([-Wshadow], [C_WFLAGS="$C_WFLAGS -Wshadow" CXX_WFLAGS="$CXX_WFLAGS -Wshadow"],,[$ERROR_ON_UNKNOWN_OPTIONS]) -AX_CHECK_COMPILE_FLAG([-Wmissing-include-dirs], [C_WFLAGS="$C_WFLAGS -Wmissing-include-dirs" CXX_WFLAGS="$CXX_WFLAGS -Wmissing-include-dirs"],,[$ERROR_ON_UNKNOWN_OPTIONS]) - -dnl Error out on things that will fail with MSVC -AX_CHECK_COMPILE_FLAG([-Werror=vla], [C_WFLAGS="$C_WFLAGS -Werror=vla" CXX_WFLAGS="$CXX_WFLAGS -Werror=vla"],,[$ERROR_ON_UNKNOWN_OPTIONS]) - -dnl -Wclobbered is not reliable on most gcc versions -dnl AX_CHECK_COMPILE_FLAG([-Wno-clobbered], [C_WFLAGS="$C_WFLAGS -Wno-clobbered" CXX_WFLAGS="$CXX_WFLAGS -Wno-clobbered"],,[$ERROR_ON_UNKNOWN_OPTIONS]) - -dnl Warn when macros __TIME__, __DATE__ or __TIMESTAMP__ are encountered as they might prevent bit-wise-identical reproducible compilations. -AX_CHECK_COMPILE_FLAG([-Wdate-time], [C_WFLAGS="$C_WFLAGS -Wdate-time" CXX_WFLAGS="$CXX_WFLAGS -Wdate-time"],,[$ERROR_ON_UNKNOWN_OPTIONS]) - -dnl GCC 6 warnings -AX_CHECK_COMPILE_FLAG([-Wnull-dereference], [C_WFLAGS="$C_WFLAGS -Wnull-dereference" CXX_WFLAGS="$CXX_WFLAGS -Wnull-dereference"],,[$ERROR_ON_UNKNOWN_OPTIONS]) -AX_CHECK_COMPILE_FLAG([-Wduplicated-cond], [C_WFLAGS="$C_WFLAGS -Wduplicated-cond" CXX_WFLAGS="$CXX_WFLAGS -Wduplicated-cond"],,[$ERROR_ON_UNKNOWN_OPTIONS]) - -dnl GCC 7 warnings -dnl Do not enable yet. Causes warning in alg/gdalthinplate.cpp due to armadillo templates -dnl AX_CHECK_COMPILE_FLAG([-Wduplicated-branches], [C_WFLAGS="$C_WFLAGS -Wduplicated-branches" CXX_WFLAGS="$CXX_WFLAGS -Wduplicated-branches"],,[$ERROR_ON_UNKNOWN_OPTIONS]) - -dnl GCC 8 warnings -AC_LANG_PUSH([C++]) -AX_CHECK_COMPILE_FLAG([-Wextra-semi], [CXX_WFLAGS="$CXX_WFLAGS -Wextra-semi"],,[$ERROR_ON_UNKNOWN_OPTIONS]) -AC_LANG_POP([C++]) - -dnl clang >= 3.9 -AX_CHECK_COMPILE_FLAG([-Wcomma], [C_WFLAGS="$C_WFLAGS -Wcomma" CXX_WFLAGS="$CXX_WFLAGS -Wcomma"],,[$ERROR_ON_UNKNOWN_OPTIONS]) - -dnl clang and gcc 5 -AX_CHECK_COMPILE_FLAG([-Wfloat-conversion], [C_WFLAGS="$C_WFLAGS -Wfloat-conversion" CXX_WFLAGS="$CXX_WFLAGS -Wfloat-conversion"],,[$ERROR_ON_UNKNOWN_OPTIONS]) - -dnl clang >= 3.2 -AX_CHECK_COMPILE_FLAG([-Wdocumentation -Wno-documentation-deprecated-sync], [C_WFLAGS="$C_WFLAGS -Wdocumentation -Wno-documentation-deprecated-sync" CXX_WFLAGS="$CXX_WFLAGS -Wdocumentation -Wno-documentation-deprecated-sync"],,[$ERROR_ON_UNKNOWN_OPTIONS]) - -dnl C++ specific stuff - -AC_LANG_PUSH([C++]) -AX_CHECK_COMPILE_FLAG([-Wunused-private-field], [CXX_WFLAGS="$CXX_WFLAGS -Wunused-private-field"],,[$ERROR_ON_UNKNOWN_OPTIONS]) -AX_CHECK_COMPILE_FLAG([-Wmissing-declarations], [CXX_WFLAGS="$CXX_WFLAGS -Wmissing-declarations"],,[$ERROR_ON_UNKNOWN_OPTIONS]) -AX_CHECK_COMPILE_FLAG([-Wnon-virtual-dtor], [CXX_WFLAGS="$CXX_WFLAGS -Wnon-virtual-dtor" NO_NON_VIRTUAL_DTOR_FLAG="-Wno-non-virtual-dtor"],,[$ERROR_ON_UNKNOWN_OPTIONS]) -AX_CHECK_COMPILE_FLAG([-Wold-style-cast], [WARN_OLD_STYLE_CAST="-Wold-style-cast"],,[$ERROR_ON_UNKNOWN_OPTIONS]) -AX_CHECK_COMPILE_FLAG([-Weffc++], [WARN_EFFCPLUSPLUS="-Weffc++"],,[$ERROR_ON_UNKNOWN_OPTIONS]) - -dnl g++-4.8 complain a bit too much with -Weffc++ -if test "$WARN_EFFCPLUSPLUS" != ""; then - SAVED_CXXFLAGS=$CXXFLAGS - CXXFLAGS="$CXXFLAGS $WARN_EFFCPLUSPLUS -Werror" - AC_MSG_CHECKING([if -Weffc++ should be enabled]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM( - [[ - class Base {}; - class A: public Base {}; - ]])], - [AC_MSG_RESULT([yes])], - [WARN_EFFCPLUSPLUS=""] - [AC_MSG_RESULT([no])]) - CXXFLAGS=$SAVED_CXXFLAGS -fi - -dnl Clang enables -Woverloaded-virtual if -Wall is defined, but not GCC -AX_CHECK_COMPILE_FLAG([-Woverloaded-virtual], [CXX_WFLAGS="$CXX_WFLAGS -Woverloaded-virtual"],,[$ERROR_ON_UNKNOWN_OPTIONS]) - -dnl Forbid use of 'or', 'and', ... alias operators -AX_CHECK_COMPILE_FLAG([-fno-operator-names], [CXX_WFLAGS="$CXX_WFLAGS -fno-operator-names"],,[$ERROR_ON_UNKNOWN_OPTIONS]) - -HAVE_GCC_WARNING_ZERO_AS_NULL_POINTER_CONSTANT=no -AX_CHECK_COMPILE_FLAG([-Wzero-as-null-pointer-constant], [CXX_WFLAGS="$CXX_WFLAGS -Wzero-as-null-pointer-constant" HAVE_GCC_WARNING_ZERO_AS_NULL_POINTER_CONSTANT=yes],,[$ERROR_ON_UNKNOWN_OPTIONS]) -if test "$HAVE_GCC_WARNING_ZERO_AS_NULL_POINTER_CONSTANT" = "yes"; then -AC_DEFINE_UNQUOTED(HAVE_GCC_WARNING_ZERO_AS_NULL_POINTER_CONSTANT, 1, - [Define to 1 if the compiler supports -Wzero-as-null-pointer-constant]) -fi - -AC_LANG_POP([C++]) - -CXX14_SUPPORT=no -AC_ARG_WITH([cpp14], - AS_HELP_STRING([--with-cpp14], - [Enable C++14 compiler options]),,) - -AC_MSG_CHECKING([if use C++14 compiler options]) -if test "$with_cpp14" = "yes"; then - dnl Check C++ compiler compatibility with C++14 - AC_MSG_CHECKING([C++ compiler compatibility with C++14]) - AX_CXX_COMPILE_STDCXX([14],[noext],[optional]) - - if [test "$HAVE_CXX14" = "1"]; then - CXX14_SUPPORT=yes - fi - AC_MSG_RESULT([enabled]) -else - AC_MSG_RESULT([disabled by user]) -fi -AC_SUBST(CXX14_SUPPORT,$CXX14_SUPPORT) - -if [test "$CXX14_SUPPORT" = "no"]; then - AX_CXX_COMPILE_STDCXX_11([noext],[mandatory]) -fi - -dnl Available in GCC 5.1 -AC_LANG_PUSH([C++]) - AX_CHECK_COMPILE_FLAG([-Wsuggest-override], [CXX_WFLAGS="$CXX_WFLAGS -Wsuggest-override"],,[$ERROR_ON_UNKNOWN_OPTIONS]) -AC_LANG_POP([C++]) - -dnl Enable -Wimplicit-fallthrough only if C++11 is enabled since CPL_FALLTHROUGH is only active then -AC_LANG_PUSH([C++]) -SAVED_CXXFLAGS=$CXXFLAGS -CXXFLAGS="$CXXFLAGS $ERROR_ON_UNKNOWN_OPTIONS -Wimplicit-fallthrough" -AC_MSG_CHECKING([if -Wimplicit-fallthrough can be enabled]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM( - [[#if !(__cplusplus >= 201103L && ( (defined(__clang__) && (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >=7))) || ((defined(__GNUC__) && __GNUC__ >= 7)) ) ) - #error "not (C++11 and (clang >= 3.7 or gcc >= 7))" - #endif]])], - [CXX_WFLAGS="$CXX_WFLAGS -Wimplicit-fallthrough"] - [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no])]) -CXXFLAGS=$SAVED_CXXFLAGS -AC_LANG_POP([C++]) - -AC_SUBST(CXX_WFLAGS,$CXX_WFLAGS) -AC_SUBST(C_WFLAGS,$C_WFLAGS) -AC_SUBST(NO_UNUSED_PARAMETER_FLAG,$NO_UNUSED_PARAMETER_FLAG) -AC_SUBST(NO_SIGN_COMPARE,$NO_SIGN_COMPARE) -AC_SUBST(NO_NON_VIRTUAL_DTOR_FLAG,$NO_NON_VIRTUAL_DTOR_FLAG) -AC_SUBST(NO_LOGICAL_OP_FLAG,$NO_LOGICAL_OP_FLAG) -AC_SUBST(WARN_OLD_STYLE_CAST,$WARN_OLD_STYLE_CAST) -AC_SUBST(WARN_EFFCPLUSPLUS,$WARN_EFFCPLUSPLUS) - -dnl Checks for programs. - -dnl AC_PROG_CC_C99 is deprecated since autoconf 2.70 -m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]), [2.70]), - [-1], [AC_PROG_CC_C99], [AC_PROG_CC]) - -AC_PROG_CXX -LT_INIT([win32-dll]) - -dnl Check that CXX is really a working compiler -AC_LANG_PUSH([C++]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM( - [[#ifndef __cplusplus - #error "broken C++" - #endif]])],, - [CXX=;]) -AC_LANG_POP([C++]) - -if test "x$CXX" = x ; then - AC_MSG_ERROR("You don't have a working C++ compiler.") -fi - -AC_MSG_CHECKING([for std::isnan]) -AC_LANG_PUSH([C++]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM( - [[#include - int CPLIsNan(float f) { return std::isnan(f); }]])], - [ - AC_MSG_RESULT([yes]) - AC_DEFINE_UNQUOTED(HAVE_STD_IS_NAN, 1, - [Define to 1 if you have the `std::isnan' function.]) - ], [ - AC_MSG_RESULT([no]) - ]) -AC_LANG_POP([C++]) - -dnl switch between libtool and native build system -AC_ARG_WITH(libtool, [ --without-libtool Don't use libtool to build the library],,) - -if test "$with_libtool" = "no"; then -AC_PROG_RANLIB - -dnl AC_COMPILER_PIC as expanded by autoconf-2.68 doesn't work for the C++ part with clang++ 3.0 that doesn't like compiling .c programs -dnl so we inline the expanded code and fix it at hand. -dnl AC_COMPILER_PIC - echo 'void f(){}' > conftest.c - if test -z "`${CC-cc} $CFLAGS -fPIC -c conftest.c 2>&1`"; then - CFLAGS="$CFLAGS -fPIC" - fi - echo 'void f(){}' > conftest.cpp - if test -z "`${CXX-g++} $CXXFLAGS -fPIC -c conftest.cpp 2>&1`"; then - CXXFLAGS="$CXXFLAGS -fPIC" - fi - rm -f conftest* - -dnl Trick so that LD_SHARED test works with sanitizer flags with clang -SAVED_CFLAGS=$CFLAGS -CFLAGS=`echo "$CFLAGS " | sed "s/-fsanitize=undefined //" | sed "s/-fsanitize=address //" | sed "s/-fsanitize=unsigned-integer-overflow //"` -AC_LD_SHARED -CFLAGS=$SAVED_CFLAGS -else -with_libtool=yes -fi -AC_SUBST(HAVE_LIBTOOL,$with_libtool) - -dnl Checks for libraries. -AC_CHECK_LIB(dl,dlopen,,,) - -dnl Needed on Solaris. -AC_CHECK_LIB(rt,nanosleep,,,) - -dnl We don't need to add math library to all targets -case "${host_os}" in - cygwin* | mingw32* | pw32* | beos* | darwin*) - ;; - *) - AC_CHECK_LIB(m,sin,,,) - ;; -esac - -dnl Checks for header files. -AC_CHECK_HEADERS(fcntl.h unistd.h dlfcn.h locale.h direct.h) - -dnl Check for userfaultfd support -AC_CHECK_HEADERS([linux/userfaultfd.h], [ENABLE_UFFD="yes"], [ENABLE_UFFD="no"], []) -AC_SUBST(ENABLE_UFFD,$ENABLE_UFFD) - -dnl cpl_vsil_unix_stdio_64.h requires linux/fs.h on Linux, and this isn't -dnl installed by default on Alpine -case "${host_os}" in - linux*) - AC_CHECK_HEADERS([linux/fs.h], [], [AC_MSG_ERROR([Unable to find linux/fs.h header])]) - ;; - *) - ;; -esac - -AC_C_BIGENDIAN - -dnl Check for 64 bit file API -AC_UNIX_STDIO_64 - -AC_CHECK_SIZEOF(int) -AC_CHECK_SIZEOF(unsigned long) -AC_CHECK_SIZEOF(void*) - -dnl Checks for library functions. -AC_CHECK_FUNCS(vsnprintf) -AC_CHECK_FUNCS(getcwd) -AC_CHECK_FUNCS(readlink) -AC_CHECK_FUNCS(lstat) -AC_CHECK_FUNCS(posix_spawnp) -AC_CHECK_FUNCS(posix_memalign) -AC_CHECK_FUNCS(vfork) -AC_CHECK_FUNCS(mmap) -AC_CHECK_FUNCS(sigaction) -AC_CHECK_FUNCS(statvfs) -AC_CHECK_FUNCS(statvfs64) -AC_CHECK_FUNCS(getrlimit) - -AC_MSG_CHECKING([for RLIMIT_AS]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include -#include - ]], [[ - return RLIMIT_AS; - ]])],[ - AC_MSG_RESULT([yes]) - AC_DEFINE_UNQUOTED(HAVE_RLIMIT_AS, 1, - [Define to 1 if you have the `RLIMIT_AS' constant.]) - ],[ - AC_MSG_RESULT([no]) -]) - - -dnl Make sure at least these are checked under C++. Prototypes missing on -dnl some platforms. - -AC_LANG_PUSH(C++) -AC_CHECK_FUNC_CUSTOM(gmtime_r,[#include ],[time_t t; struct tm ltime; t = time(0); gmtime_r( &t, <ime );]) -AC_CHECK_FUNC_CUSTOM(localtime_r,[#include ],[time_t t; struct tm ltime; t = time(0); localtime_r( &t, <ime );]) -AC_LANG_POP(C++) - -AC_CHECK_HEADERS([xlocale.h],[HAVE_XLOCALE_H=1]) -if test "$HAVE_XLOCALE_H" = "1"; then - AC_DEFINE_UNQUOTED(HAVE_XLOCALE_H, 1, - [Define if you have the header file.]) -fi - -AC_MSG_CHECKING([for uselocale]) -AC_LANG_PUSH(C++) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#define _XOPEN_SOURCE 700 -#include - ]], [[ - locale_t alocale = newlocale (LC_NUMERIC_MASK, "C", 0); - locale_t oldlocale = uselocale(alocale); - uselocale(oldlocale); - freelocale(alocale); - return 0; - ]])],[ - AC_MSG_RESULT([yes]) - AC_DEFINE_UNQUOTED(HAVE_USELOCALE, 1, - [Define to 1 if you have the `uselocale' function.]) - ],[ - AC_MSG_RESULT([no]) -]) -AC_LANG_POP(C++) - - -OPT_GDAL_FORMATS= -EXTRA_INCLUDES= - -dnl --------------------------------------------------------------------------- -dnl Check for --enable-debug -dnl --------------------------------------------------------------------------- - -AC_MSG_CHECKING([to enable debug build]) - -AC_ARG_ENABLE(debug, - AS_HELP_STRING([--enable-debug], - [enable debugging (disabled by default)]), - [HAVE_DEBUG=$enableval], [HAVE_DEBUG=yes]) - -CFLAGS_NOFTRAPV="$CFLAGS" -CXXFLAGS_NOFTRAPV="$CXXFLAGS" - -if test "x$enable_debug" = "xyes" ; then - - dnl Try to strip out optimization. - - CXXFLAGS=`echo "$CXXFLAGS " | sed "s/-O2 //"` - CFLAGS=`echo "$CFLAGS " | sed "s/-O2 //"` - CXXFLAGS=`echo "$CXXFLAGS" | sed "s/-O //"` - CFLAGS=`echo "$CFLAGS" | sed "s/-O //"` - - dnl remove existing -g to avoid duplicates. - - CXXFLAGS=`echo "$CXXFLAGS" | sed "s/-g //"` - CFLAGS=`echo "$CFLAGS" | sed "s/-g //"` - - dnl add -g and -DDEBUG - - CXXFLAGS="$CXXFLAGS -g -DDEBUG" - CFLAGS="$CFLAGS -g -DDEBUG" - - CFLAGS_NOFTRAPV="$CFLAGS" - CXXFLAGS_NOFTRAPV="$CXXFLAGS" - - AC_MSG_RESULT([yes, modified CFLAGS="$CFLAGS"]) - - # Some clang version on 32 bits have linking error with 64bit operations (undefined reference to `__mulodi4') - AC_MSG_CHECKING([whether -ftrapv can be used]) - rm -f testftrapv.c - echo 'int main(int argc, char** argv) { return (long long)argc * argc; } ' > testftrapv.c - if test -z "`${CC} ${CFLAGS} -ftrapv testftrapv.c -o testftrapv 2>&1`" ; then - AC_MSG_RESULT([yes]) - CFLAGS="$CFLAGS -ftrapv" - CXXFLAGS="$CXXFLAGS -ftrapv" - else - AC_MSG_RESULT([no]) - fi - rm -f testftrapv.* testftrapv - -else - AC_MSG_RESULT([no, CFLAGS="$CFLAGS"]) -fi - -AC_SUBST(CFLAGS_NOFTRAPV,$CFLAGS_NOFTRAPV) -AC_SUBST(CXXFLAGS_NOFTRAPV,$CXXFLAGS_NOFTRAPV) - -dnl --------------------------------------------------------------------------- -dnl Check if GCC 4.1 atomic builtins are really available -dnl (some GCC versions are broken w.r.t this on some exotic architectures...) -dnl --------------------------------------------------------------------------- - -AC_MSG_CHECKING([whether GCC 4.1 atomic builtins are available]) - -rm -f atomicbuiltins.c -echo 'int main(int argc, char** argv) { int i; __sync_add_and_fetch(&i, 1); __sync_sub_and_fetch(&i, 1); __sync_bool_compare_and_swap(&i, 0, 1); return 0; } ' > atomicbuiltins.c -if test -z "`${CC} ${CFLAGS} atomicbuiltins.c -o atomicbuiltins 2>&1`" ; then - HAVE_GCC_ATOMIC_BUILTINS=yes - AC_MSG_RESULT([yes]) - AC_DEFINE_UNQUOTED(HAVE_GCC_ATOMIC_BUILTINS,1, [Define to 1 if GCC atomic builtins are available]) -else - HAVE_GCC_ATOMIC_BUILTINS=no - AC_MSG_RESULT([no]) -fi -rm -rf atomicbuiltins.* atomicbuiltins - -AC_SUBST(HAVE_GCC_ATOMIC_BUILTINS,$HAVE_GCC_ATOMIC_BUILTINS) - -dnl --------------------------------------------------------------------------- -dnl Check if GCC bswap builtins are available -dnl --------------------------------------------------------------------------- - -AC_MSG_CHECKING([whether GCC bswap builtins are available]) - -rm -f bswapbuiltins.c -echo 'int main(int argc, char** argv) { (void)__builtin_bswap32(0); (void)__builtin_bswap64(0); return 0; } ' >> bswapbuiltins.c -if test -z "`${CC} ${CFLAGS} bswapbuiltins.c -o bswapbuiltins 2>&1`" ; then - HAVE_GCC_BSWAP=yes - AC_MSG_RESULT([yes]) - AC_DEFINE_UNQUOTED(HAVE_GCC_BSWAP,1, [Define to 1 if GCC bswap builtins are available]) -else - HAVE_GCC_BSWAP=no - AC_MSG_RESULT([no]) -fi -rm -rf bswapbuiltins.* bswapbuiltins - -AC_SUBST(HAVE_GCC_BSWAP,$HAVE_GCC_BSWAP) - -dnl --------------------------------------------------------------------------- -dnl Check if __uint128_t is available and usable -dnl --------------------------------------------------------------------------- - -AC_MSG_CHECKING([for __uint128_t]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - ]], [[ - unsigned long long v1 = 1024ULL; - unsigned long long v2 = 0x8000000000000000ULL; - __uint128_t u = ((__uint128_t)v1)*((__uint128_t)v2); - return u == 0; - ]])],[ - AC_MSG_RESULT([yes]) - AC_DEFINE_UNQUOTED(HAVE_UINT128_T, 1, - [Define to 1 if the system has the type __uint128_t]) - ],[ - AC_MSG_RESULT([no]) -]) - -dnl --------------------------------------------------------------------------- -dnl Check SSE availability -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(sse, -[ --with-sse[=ARG] Detect SSE availability for some optimized routines (ARG=yes(default), no)],,) - -AC_MSG_CHECKING([whether SSE is available at compile time]) - -if test "$with_sse" = "yes" -o "$with_sse" = ""; then - - rm -f detectsse.cpp - echo '#ifdef __SSE__' > detectsse.cpp - echo '#include ' >> detectsse.cpp - echo 'void foo() { float fEpsilon = 0.0000000000001f; __m128 xmm_small = _mm_load1_ps(&fEpsilon); } int main() { return 0; }' >> detectsse.cpp - echo '#else' >> detectsse.cpp - echo 'some_error' >> detectsse.cpp - echo '#endif' >> detectsse.cpp - if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} -o detectsse detectsse.cpp 2>&1`" ; then - AC_MSG_RESULT([yes]) - SSEFLAGS="" - HAVE_SSE_AT_COMPILE_TIME=yes - else - if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} -msse -o detectsse detectsse.cpp 2>&1`" ; then - AC_MSG_RESULT([yes]) - SSEFLAGS="-msse" - HAVE_SSE_AT_COMPILE_TIME=yes - else - AC_MSG_RESULT([no]) - if test "$with_sse" = "yes"; then - AC_MSG_ERROR([--with-sse was requested, but SSE is not available]) - fi - fi - fi - - dnl On Solaris, the presence of SSE instructions is flagged in the binary - dnl and prevent it to run on non SSE hardware even if the instructions are - dnl not executed. So if the user did not explicitly requires SSE, test that - dnl we can run SSE binaries - if test "$HAVE_SSE_AT_COMPILE_TIME" = "yes"; then - case $host_os in - solaris*) - AC_MSG_CHECKING([whether SSE is available and needed at runtime]) - if ./detectsse; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - if test "$with_sse" = "yes"; then - echo "Caution: the generated binaries will not run on this system." - else - echo "Disabling SSE as it is not explicitly required" - HAVE_SSE_AT_COMPILE_TIME="" - SSEFLAGS="" - fi - fi - ;; - esac - fi - - if test "$HAVE_SSE_AT_COMPILE_TIME" = "yes"; then - CFLAGS="-DHAVE_SSE_AT_COMPILE_TIME $CFLAGS" - CXXFLAGS="-DHAVE_SSE_AT_COMPILE_TIME $CXXFLAGS" - fi - - rm -rf detectsse* -else - AC_MSG_RESULT([no]) -fi - -AC_SUBST(SSEFLAGS,$SSEFLAGS) - -dnl --------------------------------------------------------------------------- -dnl Check SSSE3 availability -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(ssse3, -[ --with-ssse3[=ARG] Detect SSSE3 availability for some optimized routines (ARG=yes(default), no)],,) - -AC_MSG_CHECKING([whether SSSE3 is available at compile time]) - -if test "$with_ssse3" = "yes" -o "$with_ssse3" = ""; then - - rm -f detectssse3.cpp - echo '#ifdef __SSSE3__' > detectssse3.cpp - echo '#include ' >> detectssse3.cpp - echo 'void foo() { __m128i xmm_i = _mm_set1_epi16(0); xmm_i = _mm_shuffle_epi8(xmm_i, xmm_i); } int main() { return 0; }' >> detectssse3.cpp - echo '#else' >> detectssse3.cpp - echo 'some_error' >> detectssse3.cpp - echo '#endif' >> detectssse3.cpp - if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} -o detectssse3 detectssse3.cpp 2>&1`" ; then - AC_MSG_RESULT([yes]) - SSSE3FLAGS="" - HAVE_SSSE3_AT_COMPILE_TIME=yes - else - if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} -mssse3 -o detectssse3 detectssse3.cpp 2>&1`" ; then - AC_MSG_RESULT([yes]) - SSSE3FLAGS="-mssse3" - HAVE_SSSE3_AT_COMPILE_TIME=yes - else - AC_MSG_RESULT([no]) - if test "$with_ssse3" = "yes"; then - AC_MSG_ERROR([--with-ssse3 was requested, but SSSE3 is not available]) - fi - fi - fi - - dnl On Solaris, the presence of SSSE3 instructions is flagged in the binary - dnl and prevent it to run on non SSSE3 hardware even if the instructions are - dnl not executed. So if the user did not explicitly requires SSSE3, test that - dnl we can run SSSE3 binaries - if test "$HAVE_SSSE3_AT_COMPILE_TIME" = "yes"; then - case $host_os in - solaris*) - AC_MSG_CHECKING([whether SSSE3 is available and needed at runtime]) - if ./detectssse3; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - if test "$with_ssse3" = "yes"; then - echo "Caution: the generated binaries will not run on this system." - else - echo "Disabling SSSE3 as it is not explicitly required" - HAVE_SSSE3_AT_COMPILE_TIME="" - SSSE3FLAGS="" - fi - fi - ;; - esac - fi - - if test "$HAVE_SSSE3_AT_COMPILE_TIME" = "yes"; then - CFLAGS="-DHAVE_SSSE3_AT_COMPILE_TIME $CFLAGS" - CXXFLAGS="-DHAVE_SSSE3_AT_COMPILE_TIME $CXXFLAGS" - fi - - rm -rf detectssse3* -else - AC_MSG_RESULT([no]) -fi - -AC_SUBST(SSSE3FLAGS,$SSSE3FLAGS) - -dnl --------------------------------------------------------------------------- -dnl Check AVX availability -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(avx, -[ --with-avx[=ARG] Detect AVX availability for some optimized routines (ARG=yes(default), no)],,) - -AC_MSG_CHECKING([whether AVX is available at compile time]) - -if test "$with_avx" = "yes" -o "$with_avx" = ""; then - - rm -f detectavx.cpp - echo '#ifdef __AVX__' > detectavx.cpp - echo '#include ' >> detectavx.cpp - echo 'int foo() { unsigned int nXCRLow, nXCRHigh;' >> detectavx.cpp - echo '__asm__ ("xgetbv" : "=a" (nXCRLow), "=d" (nXCRHigh) : "c" (0));' >> detectavx.cpp - echo 'float fEpsilon = 0.0000000000001f;' >> detectavx.cpp - echo '__m256 ymm_small = _mm256_set_ps(fEpsilon,fEpsilon,fEpsilon,fEpsilon,fEpsilon,fEpsilon,fEpsilon,fEpsilon);' >> detectavx.cpp - echo 'return (int)nXCRLow + _mm256_movemask_ps(ymm_small); }' >> detectavx.cpp - echo 'int main(int argc, char**) { if( argc == 0 ) return foo(); return 0; }' >> detectavx.cpp - echo '#else' >> detectavx.cpp - echo 'some_error' >> detectavx.cpp - echo '#endif' >> detectavx.cpp - if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} -o detectavx detectavx.cpp 2>&1`" ; then - AC_MSG_RESULT([yes]) - AVXFLAGS="" - HAVE_AVX_AT_COMPILE_TIME=yes - else - if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} -mavx -o detectavx detectavx.cpp 2>&1`" ; then - AC_MSG_RESULT([yes]) - AVXFLAGS="-mavx" - HAVE_AVX_AT_COMPILE_TIME=yes - else - AC_MSG_RESULT([no]) - if test "$with_avx" = "yes"; then - AC_MSG_ERROR([--with-avx was requested, but AVX is not available]) - fi - fi - fi - - dnl On Solaris, the presence of AVX instructions is flagged in the binary - dnl and prevent it to run on non AVX hardware even if the instructions are - dnl not executed. So if the user did not explicitly requires AVX, test that - dnl we can run AVX binaries - if test "$HAVE_AVX_AT_COMPILE_TIME" = "yes"; then - case $host_os in - solaris*) - AC_MSG_CHECKING([whether AVX is available and needed at runtime]) - if ./detectavx; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - if test "$with_avx" = "yes"; then - echo "Caution: the generated binaries will not run on this system." - else - echo "Disabling AVX as it is not explicitly required" - AVXFLAGS="" - HAVE_AVX_AT_COMPILE_TIME="" - fi - fi - ;; - esac - fi - - if test "$HAVE_AVX_AT_COMPILE_TIME" = "yes"; then - CFLAGS="-DHAVE_AVX_AT_COMPILE_TIME $CFLAGS" - CXXFLAGS="-DHAVE_AVX_AT_COMPILE_TIME $CXXFLAGS" - fi - - rm -rf detectavx* -else - AC_MSG_RESULT([no]) -fi - -AC_SUBST(AVXFLAGS,$AVXFLAGS) - -dnl --------------------------------------------------------------------------- -dnl Check for --enable-lto -dnl --------------------------------------------------------------------------- - -AC_MSG_CHECKING([to enable LTO (link time optimization) build]) - -AC_ARG_ENABLE(lto, - AS_HELP_STRING([--enable-lto], - [enable LTO(link time optimization) (disabled by default)])) - -CXXFLAGS_NO_LTO_IF_AVX_NONDEFAULT="$CXXFLAGS" -CXXFLAGS_NO_LTO_IF_SSSE3_NONDEFAULT="$CXXFLAGS" - -if test "x$enable_lto" = "xyes" ; then - - dnl remove existing -g. - - CXXFLAGS=`echo "$CXXFLAGS" | sed "s/-g //"` - CFLAGS=`echo "$CFLAGS" | sed "s/-g //"` - - dnl add -flto - - CXXFLAGS="$CXXFLAGS -flto" - CFLAGS="$CFLAGS -flto" - LDFLAGS="$LDFLAGS -flto" - - dnl in case we have avx available by default, then we can compile everything - dnl with -flto - if test "$HAVE_AVX_AT_COMPILE_TIME" = "yes"; then - if test "$AVXFLAGS" = ""; then - CXXFLAGS_NO_LTO_IF_AVX_NONDEFAULT="$CXXFLAGS" - fi - fi - if test "$HAVE_SSSE3_AT_COMPILE_TIME" = "yes"; then - if test "$SSSE3FLAGS" = ""; then - CXXFLAGS_NO_LTO_IF_SSSE3_NONDEFAULT="$CXXFLAGS" - fi - fi - - AC_MSG_RESULT([yes]) -else - AC_MSG_RESULT([no]) -fi - -AC_SUBST(CXXFLAGS_NO_LTO_IF_AVX_NONDEFAULT,$CXXFLAGS_NO_LTO_IF_AVX_NONDEFAULT) -AC_SUBST(CXXFLAGS_NO_LTO_IF_SSSE3_NONDEFAULT,$CXXFLAGS_NO_LTO_IF_SSSE3_NONDEFAULT) - -dnl --------------------------------------------------------------------------- -dnl Check if we need -lws2_32 (mingw) -dnl --------------------------------------------------------------------------- - -echo "#include " > test_ws2_32.c -echo "#include " >> test_ws2_32.c -echo "void foo() {}" >> test_ws2_32.c - -if test -z "`${CC} -c test_ws2_32.c 2>&1`" ; then - LIBS="$LIBS -lws2_32" -fi -rm -f test_ws2_32* - -dnl --------------------------------------------------------------------------- -dnl Check if we need -lpsapi (mingw) -dnl --------------------------------------------------------------------------- - -echo "#include " > test_psapi.c -echo "#include " >> test_psapi.c -echo "void foo() {}" >> test_psapi.c - -if test -z "`${CC} -c test_psapi.c 2>&1`" ; then - LIBS="$LIBS -lpsapi" -fi -rm -f test_psapi* - - -dnl --------------------------------------------------------------------------- -dnl Check if we have getaddrinfo -dnl --------------------------------------------------------------------------- - -echo "#include " > test_getaddrinfo.c -echo "#include " >> test_getaddrinfo.c -echo "#include " >> test_getaddrinfo.c -echo "void test() { getaddrinfo(0,0,0,0); }" >> test_getaddrinfo.c - -HAVE_GETADDRINFO=NO -if test -z "`${CC} -c test_getaddrinfo.c 2>&1`" ; then - AC_DEFINE_UNQUOTED(HAVE_GETADDRINFO,1, [Define to 1 if you have the `getaddrinfo' function.]) -fi -rm -f test_getaddrinfo* - -dnl --------------------------------------------------------------------------- -dnl Check if user requests hiding internal symbols -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(hide_internal_symbols,[ --with-hide-internal-symbols[=ARG] Try to hide internal symbols (ARG=yes/no)],,) - -HAVE_HIDE_INTERNAL_SYMBOLS=no - -if test "$with_hide_internal_symbols" = "yes"; then - - AC_MSG_CHECKING([whether we should hide internal symbols]) - - rm -f hiddensymbols.c - echo 'int visible() { return 0; } __attribute__ ((visibility("default")))' >> hiddensymbols.c - echo 'int hidden() { return 0; }' >> hiddensymbols.c - if test -z "`${CC} -fvisibility=hidden -c hiddensymbols.c 2>&1`" ; then - HAVE_HIDE_INTERNAL_SYMBOLS=yes - else - HAVE_HIDE_INTERNAL_SYMBOLS=no - fi - if test "$HAVE_HIDE_INTERNAL_SYMBOLS" = "yes"; then - AC_MSG_RESULT([yes]) - CFLAGS="$CFLAGS -fvisibility=hidden" - CXXFLAGS="$CXXFLAGS -fvisibility=hidden" - CFLAGS_NOFTRAPV="$CFLAGS_NOFTRAPV -fvisibility=hidden" - CXXFLAGS_NOFTRAPV="$CXXFLAGS_NOFTRAPV -fvisibility=hidden" - CXXFLAGS_NO_LTO_IF_AVX_NONDEFAULT="$CXXFLAGS_NO_LTO_IF_AVX_NONDEFAULT -fvisibility=hidden" - CXXFLAGS_NO_LTO_IF_SSSE3_NONDEFAULT="$CXXFLAGS_NO_LTO_IF_SSSE3_NONDEFAULT -fvisibility=hidden" - else - AC_MSG_RESULT([no]) - fi - rm -f hiddensymbols.* -else - AC_MSG_CHECKING([whether we should hide internal symbols]) - AC_MSG_RESULT([no]) -fi - -if test "$HAVE_HIDE_INTERNAL_SYMBOLS" = "yes" ; then - AC_DEFINE_UNQUOTED(USE_GCC_VISIBILITY_FLAG,1, [Define to 1 if you want to use the -fvisibility GCC flag]) -fi - -AC_SUBST(HAVE_HIDE_INTERNAL_SYMBOLS,$HAVE_HIDE_INTERNAL_SYMBOLS) - -dnl --------------------------------------------------------------------------- -dnl Check if user requests renaming internal libtiff symbols -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(rename_internal_libtiff_symbols,[ --with-rename-internal-libtiff-symbols[=ARG] Prefix internal libtiff symbols with gdal_ (ARG=yes/no)],,) - -RENAME_INTERNAL_LIBTIFF_SYMBOLS=no -if test "x$with_rename_internal_libtiff_symbols" = "xyes" -o "x$with_rename_internal_libtiff_symbols" = "x"; then - RENAME_INTERNAL_LIBTIFF_SYMBOLS=yes -fi - -AC_SUBST(RENAME_INTERNAL_LIBTIFF_SYMBOLS,$RENAME_INTERNAL_LIBTIFF_SYMBOLS) - -dnl --------------------------------------------------------------------------- -dnl Check if user requests renaming internal libgeotiff symbols -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(rename_internal_libgeotiff_symbols,[ --with-rename-internal-libgeotiff-symbols[=ARG] Prefix internal libgeotiff symbols with gdal_ (ARG=yes/no)],,) - -RENAME_INTERNAL_LIBGEOTIFF_SYMBOLS=no -if test "x$with_rename_internal_libgeotiff_symbols" = "xyes" -o "x$with_rename_internal_libgeotiff_symbols" = "x"; then - RENAME_INTERNAL_LIBGEOTIFF_SYMBOLS=yes -fi - -AC_SUBST(RENAME_INTERNAL_LIBGEOTIFF_SYMBOLS,$RENAME_INTERNAL_LIBGEOTIFF_SYMBOLS) - -dnl --------------------------------------------------------------------------- -dnl Check if user requests renaming internal shapelib symbols -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(rename_internal_shapelib_symbols,[ --with-rename-internal-shapelib-symbols[=ARG] Prefix internal shapelib symbols with gdal_ (ARG=yes/no)],,) - -RENAME_INTERNAL_SHAPELIB_SYMBOLS=no -if test "x$with_rename_internal_shapelib_symbols" = "xyes" -o "x$with_rename_internal_shapelib_symbols" = "x"; then - RENAME_INTERNAL_SHAPELIB_SYMBOLS=yes -fi -AC_SUBST(RENAME_INTERNAL_SHAPELIB_SYMBOLS,$RENAME_INTERNAL_SHAPELIB_SYMBOLS) - - -dnl --------------------------------------------------------------------------- -dnl Check if user requests /usr/local to be included. -dnl --------------------------------------------------------------------------- - -AC_MSG_CHECKING([for local include/lib path]) - -AC_ARG_WITH(local,[ --with-local[=dir] Include /usr/local or other local tree for INCLUDE/LIBS],,) - -if test "$with_local" != "no" -a "$with_local" != "" ; then - - if test "$with_local" = "yes" ; then - ADD_PREFIX=/usr/local - else - ADD_PREFIX=$with_local - fi - - AC_MSG_RESULT(adding $ADD_PREFIX) - - LIBS="$LIBS -L$ADD_PREFIX/lib" - CPPFLAGS="$CPPFLAGS -I$ADD_PREFIX/include" -else - AC_MSG_RESULT([none]) -fi - -dnl --------------------------------------------------------------------- -dnl ENABLE THREADS ONLY IF REQUESTED. -dnl --------------------------------------------------------------------- - -THREAD_LIB="" -THREAD_FLAG="" -PTHREAD_ENABLED="no" - -AC_ARG_WITH(threads, -[ --with-threads[=ARG] Include thread safe support (ARG=yes(default), no or linkopt)],,) - -if test "$with_threads" = "yes" -o "$with_threads" = "" ; then - - AC_CHECK_LIB(pthread,pthread_create,THREAD_FLAG=CPL_MULTIPROC_PTHREAD,,,) - - if test -n "$THREAD_FLAG" ; then - THREAD_LIB="-lpthread" - else - # For Android, pthread_create is in Bionic libc - unset ac_cv_lib_pthread_pthread_create - AC_CHECK_LIB(c,pthread_create,THREAD_FLAG=CPL_MULTIPROC_PTHREAD,,,) - fi - - AC_MSG_CHECKING([for PTHREAD_MUTEX_RECURSIVE]) - - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#define _GNU_SOURCE -#include - ]], [[ - return (PTHREAD_MUTEX_RECURSIVE); - ]])],[ - AC_MSG_RESULT([yes]) - AC_DEFINE_UNQUOTED(HAVE_PTHREAD_MUTEX_RECURSIVE, 1, - [Define to 1 if you have the `PTHREAD_MUTEX_RECURSIVE' constant.]) - ],[ - AC_MSG_RESULT([no]) - ]) - - - - AC_MSG_CHECKING([for PTHREAD_MUTEX_ADAPTIVE_NP]) - - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#define _GNU_SOURCE -#include - ]], [[ - return PTHREAD_MUTEX_ADAPTIVE_NP; - ]])],[ - AC_MSG_RESULT([yes]) - AC_DEFINE_UNQUOTED(HAVE_PTHREAD_MUTEX_ADAPTIVE_NP, 1, - [Define to 1 if you have the `PTHREAD_MUTEX_ADAPTIVE_NP' constant.]) - ],[ - AC_MSG_RESULT([no]) - ]) - - AC_MSG_CHECKING([for pthread_spinlock_t]) - - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#define _GNU_SOURCE -#include - ]], [[ - pthread_spinlock_t spin; - return 1; - ]])],[ - AC_MSG_RESULT([yes]) - AC_DEFINE_UNQUOTED(HAVE_PTHREAD_SPINLOCK, 1, - [Define to 1 if you have the `pthread_spinlock_t' type.]) - ],[ - AC_MSG_RESULT([no]) - ]) - -elif test "$with_threads" != "no" ; then - - THREAD_FLAG=CPL_MULTIPROC_PTHREAD - THREAD_LIB="$with_threads" - - AS_MESSAGE([checking whether we should include thread/mutex support......]) - AC_MSG_RESULT([ using threads with link options "$THREAD_LIB".]) - -else - AS_MESSAGE([checking whether we should include thread/mutex support......]) - AC_MSG_RESULT([ thread safe support disabled.]) -fi - -if test "$THREAD_FLAG" = "CPL_MULTIPROC_PTHREAD" ; then - AC_DEFINE_UNQUOTED(CPL_MULTIPROC_PTHREAD,1, [Define if you want to use pthreads based multiprocessing support]) - PTHREAD_ENABLED="yes" -fi - -LIBS="$THREAD_LIB $LIBS" - -dnl --------------------------------------------------------------------------- -dnl Check if mremap() with 5 args is available -dnl --------------------------------------------------------------------------- - -AC_MSG_CHECKING([for 5 args mremap()]) - -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#define _GNU_SOURCE -#include -]], [[ -return (mremap(0,0,0,0,0)); -]])],[ -AC_MSG_RESULT([yes]) -AC_DEFINE_UNQUOTED(HAVE_5ARGS_MREMAP, 1, - [Define to 1 if you have the 5 args `mremap' function.]) -],[ -AC_MSG_RESULT([no]) -]) - -dnl --------------------------------------------------------------------------- -dnl Check if _SC_PHYS_PAGES is available -dnl --------------------------------------------------------------------------- - -AC_MSG_CHECKING([for _SC_PHYS_PAGES]) - -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include -]], [[ -return (sysconf(_SC_PHYS_PAGES)); -]])],[ -AC_MSG_RESULT([yes]) -AC_DEFINE_UNQUOTED(HAVE_SC_PHYS_PAGES, 1, - [Define to 1 if you have the _SC_PHYS_PAGES' constant.]) -],[ -AC_MSG_RESULT([no]) -]) - -dnl '--------------------------------------------------------------------------- -dnl Remove possible system library paths from a *_LIB variable to prevent other, perhaps unrelated, system libraries -dnl from shadowing custom libraries of the same name the user might have installed e.g. under /usr/local. -dnl System library paths are things like /lib, /usr/lib, /lib64, /usr/lib64, and /usr/lib/x86_64-linux-gnu. -dnl There may be others as well, that will need be addressed as they arise. We avoid wildcards such as -dnl /usr/lib/* to avoid potential cases such as /usr/lib/mysql/lib, which might not have an /etc/ld.so.conf.d -dnl entry and would not shadow any possible custom installs anyway: - -AC_DEFUN([STRIP_SYSTEM_LIBRARY_PATHS],[ - if echo "x" | sed -E "s/x/y/" >/dev/null 2>/dev/null; then - STRIPPED_LIBRARY_NAME="$(echo [$1] | sed -E 's:-L/(usr/)?(lib(64)?|lib/x86_64-linux-gnu)/*[[[:space:]]]+::')" - elif echo "x" | sed -r "s/x/y/" >/dev/null 2>/dev/null; then - dnl Compatibility with older GNU sed that doesn't support -E - STRIPPED_LIBRARY_NAME="$(echo [$1] | sed -r 's:-L/(usr/)?(lib(64)?|lib/x86_64-linux-gnu)/*[[[:space:]]]+::')" - else - STRIPPED_LIBRARY_NAME="$(echo [$1])" - fi -]) - -dnl --------------------------------------------------------------------------- -dnl Check if libz is available. -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(libz,[ --with-libz[=ARG] Include libz support (ARG=internal or libz directory)],,) - -if test "$with_libz" = "external" -o "$with_libz" = "" -o "$with_libz" = "yes" ; then - - AC_CHECK_LIB(z,deflateInit_,LIBZ_SETTING=external,LIBZ_SETTING=internal,) - - if test "$LIBZ_SETTING" = "external" ; then - AC_CHECK_LIB(z,inflateCopy,LIBZ_SETTING=external,LIBZ_SETTING=internal,) - if test "$LIBZ_SETTING" = "external" ; then - AC_MSG_RESULT([using pre-installed libz]) - else - AC_MSG_RESULT([using internal libz code as inflateCopy is missing]) - fi - else - AC_MSG_RESULT([using internal libz code as deflateInit_ is missing]) - fi - -elif test "$with_libz" != "no" -a "$with_libz" != "internal" ; then - - LIBS="-L$with_libz -L$with_libz/lib $LIBS" - - AC_CHECK_LIB(z,deflateInit_,LIBZ_SETTING=external,LIBZ_SETTING=internal,-L$with_libz -L$with_libz/lib -lz) - if test "$LIBZ_SETTING" = "external" ; then - AC_CHECK_LIB(z,inflateCopy,LIBZ_SETTING=external,LIBZ_SETTING=internal,-L$with_libz -L$with_libz/lib -lz) - if test "$LIBZ_SETTING" = "external" ; then - AC_MSG_RESULT([using libz library from $with_libz]) - else - AC_MSG_RESULT([using internal libz code as inflateCopy from $with_libz is missing]) - fi - else - AC_MSG_RESULT([using internal libz code as deflateInit_ from $with_libz is missing]) - fi - -fi - -if test "$LIBZ_SETTING" = "external" ; then - LIBS="-lz $LIBS" - if test "$with_libz" != "" -a "$with_libz" != "yes" -a "$with_libz" != "external" ; then - EXTRA_INCLUDES="-I$with_libz -I$with_libz/include $EXTRA_INCLUDES" - fi -elif test "$with_libz" = "no" ; then - LIBZ_SETTING=no - AC_MSG_RESULT([not using libz at all.]) -else - LIBZ_SETTING=internal - OPT_GDAL_FORMATS="zlib $OPT_GDAL_FORMATS" - AC_MSG_RESULT([using internal libz code.]) -fi - -AC_SUBST(LIBZ_SETTING,$LIBZ_SETTING) - -dnl --------------------------------------------------------------------------- -dnl Check for libdeflate. -dnl --------------------------------------------------------------------------- - -LIBDEFLATE_SETTING=no - -AC_ARG_WITH(libdeflate, - AS_HELP_STRING([--with-libdeflate], - [enable libdeflate usage (optional for faster Deflate support (still requires zlib) (ARG=yes/no/prefix), enabled by default)]),,) - -if test "$with_libdeflate" != "no" ; then - - if test "$with_libdeflate" != "" -a "$with_libdeflate" != "yes"; then - AC_CHECK_LIB(deflate, libdeflate_zlib_decompress, [libdeflate_lib=yes], [libdeflate_lib=no],-L$with_libdeflate/lib) - else - AC_CHECK_LIB(deflate, libdeflate_zlib_decompress, [libdeflate_lib=yes], [libdeflate_lib=no]) - fi - - if test "$libdeflate_lib" = "no" -a "$with_libdeflate" = "yes"; then - AC_MSG_ERROR([libdeflate library not found]) - fi - - if test "$with_libdeflate" != "" -a "$with_libdeflate" != "yes"; then - if test -r "$with_libdeflate/include/libdeflate.h" ; then - libdeflate_h=yes - else - libdeflate_h=no - fi - else - AC_CHECK_HEADER(libdeflate.h, [libdeflate_h=yes], [libdeflate_h=no]) - fi - if test "$libdeflate_h" = "no" -a "$with_libdeflate" = "yes"; then - AC_MSG_ERROR([libdeflate headers not found]) - fi - - if test "$libdeflate_lib" = "yes" -a "$libdeflate_h" = "yes" ; then - LIBDEFLATE_SETTING=yes - fi - -fi - -if test "$LIBDEFLATE_SETTING" = "yes" ; then - if test "$with_libdeflate" != "" -a "$with_libdeflate" != "yes"; then - EXTRA_INCLUDES="-I$with_libdeflate/include $EXTRA_INCLUDES" - LIBS="-L$with_libdeflate/lib -ldeflate $LIBS" - else - LIBS="-ldeflate $LIBS" - fi -fi - -AC_SUBST(LIBDEFLATE_SETTING,$LIBDEFLATE_SETTING) - -dnl --------------------------------------------------------------------------- -dnl Check for iconv/libiconv. -dnl A rationale for this macro is described in "GNU `gettext' utilities" -dnl manual at -dnl http://www.gnu.org/software/gettext/manual/html_node/AM_005fICONV.html -dnl --------------------------------------------------------------------------- -AM_ICONV - -dnl Extra test needed for GCC 4.5 on Solaris 11, where there is -dnl a different behavior if the tests are compiled with gcc or g++. -dnl So we introduce a ICONV_CPP_CONST that must be used instead of -dnl ICONV_CONST when used from .cpp files. -if test "$am_func_iconv" = "yes"; then - rm -f testiconv.* - echo '#include ' > testiconv.cpp - echo 'int main(int argc, char** argv) { iconv_t cd = 0; return iconv (cd, (const char **) 0, 0, 0, 0); } ' >> testiconv.cpp - if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} testiconv.cpp -c 2>&1`" ; then - AC_MSG_RESULT([using ICONV_CPP_CONST="const"]) - ICONV_CPP_CONST="const" - else - AC_MSG_RESULT([using ICONV_CPP_CONST=""]) - ICONV_CPP_CONST="" - fi - rm -f testiconv.* - - AC_DEFINE_UNQUOTED(ICONV_CPP_CONST,$ICONV_CPP_CONST, [For.cpp files, define as const if the declaration of iconv() needs const.]) -fi - -dnl --------------------------------------------------------------------------- -dnl Bash completions -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH([bash-completion], - AS_HELP_STRING([--with-bash-completion[=ARG]], - [Install Bash completions (ARG=yes or path)]),,) - -if test "x$with_bash_completion" = "xno" -o "x$with_bash_completion" = "x"; then - AC_MSG_NOTICE([Bash completions not requested]) -elif test "x$with_bash_completion" = "xyes"; then - PKG_CHECK_VAR(bashcompdir, [bash-completion], [completionsdir], , - bashcompdir="${sysconfdir}/bash_completion.d") - AC_SUBST(bashcompdir) -else - AC_SUBST(bashcompdir, $with_bash_completion) -fi - -dnl --------------------------------------------------------------------------- -dnl Select a JPEG Library to use, or disable driver. -dnl libtiff could depend on it so it must appear before. -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(jpeg,[ --with-jpeg[=ARG] Include JPEG support (ARG=internal, no or path)],,) - -if test "$with_jpeg" = "no" ; then - - JPEG_SETTING=no - - echo "jpeg support disabled." - -elif test "$with_jpeg" = "yes" -o "$with_jpeg" = "" ; then - - AC_CHECK_LIB(jpeg,jpeg_read_scanlines,JPEG_SETTING=external,JPEG_SETTING=internal,) - AC_CHECK_HEADERS(jpeglib.h) - - if test "$JPEG_SETTING" = "external" -a "$ac_cv_header_jpeglib_h" = "no" ; then - JPEG_SETTING=internal - fi - - if test "$JPEG_SETTING" = "external" -a "$TIFF_SETTING" = "internal" ; then - AC_MSG_CHECKING([for width_in_blocks in jpeglib.h]) - - rm -f conftest.c - echo '#include ' >> conftest.c - echo '#include "jpeglib.h"' >> conftest.c - echo 'int main() { jpeg_component_info *comptr=0; int i; i = comptr->width_in_blocks; }' >> conftest.c - if test -z "`${CC} ${CPPFLAGS} ${CFLAGS} -c conftest.c 2>&1`" ; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - JPEG_SETTING=internal - fi - rm -f conftest* - fi - - if test "$JPEG_SETTING" = "external" ; then - LIBS="-ljpeg $LIBS" - echo "using pre-installed libjpeg." - else - echo "using internal jpeg code." - fi - -elif test "$with_jpeg" = "internal" ; then - - JPEG_SETTING=internal - - echo "using internal jpeg code." - -else - - JPEG_SETTING=external - LIBS="-L$with_jpeg -L$with_jpeg/lib -ljpeg $LIBS" - EXTRA_INCLUDES="-I$with_jpeg -I$with_jpeg/include $EXTRA_INCLUDES" - - echo "using libjpeg from $with_jpeg." - -fi - -AC_SUBST(JPEG_SETTING,$JPEG_SETTING) - -if test "$JPEG_SETTING" != "no" ; then - OPT_GDAL_FORMATS="jpeg $OPT_GDAL_FORMATS" -fi - -dnl --------------------------------------------------------------------------- -dnl Check if user requests renaming internal libjpeg symbols -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(rename_internal_libjpeg_symbols,[ --with-rename-internal-libjpeg-symbols[=ARG] Prefix internal libjpeg symbols with gdal_ (ARG=yes/no)],,) - -RENAME_INTERNAL_LIBJPEG_SYMBOLS=no -if test "x$with_rename_internal_libjpeg_symbols" = "xyes" -o "x$with_rename_internal_libjpeg_symbols" = "x"; then - RENAME_INTERNAL_LIBJPEG_SYMBOLS=yes -fi - -AC_SUBST(RENAME_INTERNAL_LIBJPEG_SYMBOLS,$RENAME_INTERNAL_LIBJPEG_SYMBOLS) - -dnl --------------------------------------------------------------------------- -dnl Select a libtiff library to use. -dnl Proj depends on it so it must appear before. -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(libtiff,[ --with-libtiff=ARG Libtiff library to use (ARG=internal, yes or path)],,) - -AC_MSG_CHECKING([for libtiff]) - -if test "x${with_libtiff}" = "xyes" -o "x${with_libtiff}" = "x" ; then - - dnl Only automatically pick up the external libtiff if it is >= 4.0. - AC_CHECK_LIB(tiff,TIFFScanlineSize64,TIFF_SETTING=external HAVE_BIGTIFF=yes,TIFF_SETTING=internal HAVE_BIGTIFF=yes,) - - if test "$TIFF_SETTING" = "external" ; then - LIBS="-ltiff $LIBS" - AC_MSG_RESULT([using pre-installed libtiff.]) - else - AC_MSG_RESULT([using internal TIFF code.]) - fi - -elif test "x${with_libtiff}" = "xno" ; then - - AC_MSG_ERROR([libtiff is a required dependency]) - -elif test "x${with_libtiff}" = "xinternal" ; then - - TIFF_SETTING=internal - HAVE_BIGTIFF=yes - - AC_MSG_RESULT([using internal TIFF code.]) - -else - - TIFF_SETTING=external - if test -r "$with_libtiff/tiff.h" ; then - LIBS="-L$with_libtiff -ltiff $LIBS" - EXTRA_INCLUDES="-I$with_libtiff $EXTRA_INCLUDES" - else - LIBS="-L$with_libtiff/lib -ltiff $LIBS" - EXTRA_INCLUDES="-I$with_libtiff/include $EXTRA_INCLUDES" - fi - - AC_MSG_RESULT([using libtiff from ${with_libtiff}.]) - - dnl Check for the BigTIFF enabled library (libtiff >= 4.0) - AC_CHECK_LIB(tiff,TIFFScanlineSize64,HAVE_BIGTIFF=yes,HAVE_BIGTIFF=no,) - -fi - -if test "${HAVE_BIGTIFF}" != "yes" ; then - AC_MSG_ERROR([libtiff >= 4.0 is required.]) -fi - -AC_SUBST(TIFF_SETTING,${TIFF_SETTING}) - -dnl --------------------------------------------------------------------------- -dnl Check for curl (i.e. for wcs). -dnl Proj depends on it so it must appear before. -dnl --------------------------------------------------------------------------- -CURL_SETTING=no -CURL_INC= -CURL_LIB= - -AC_ARG_WITH(curl, - [ --with-curl[=ARG] Include curl (ARG=path to curl-config.)],,,) - -dnl Clear some cache variables -unset ac_cv_path_LIBCURL - -if test "`basename xx/$with_curl`" = "curl-config" ; then - LIBCURL_CONFIG="$with_curl" -elif test "$with_curl" = "no" ; then - LIBCURL_CONFIG=no -else - AC_PATH_PROG(LIBCURL_CONFIG, curl-config, no) -fi - -if test "$LIBCURL_CONFIG" != "no" ; then - - CURL_VERNUM=`$LIBCURL_CONFIG --vernum` - CURL_VER=`$LIBCURL_CONFIG --version | awk '{print $2}'` - - AC_MSG_RESULT([ found libcurl version $CURL_VER]) - - AC_CHECK_LIB(curl,curl_global_init,CURL_SETTING=yes,CURL_SETTING=no,`$LIBCURL_CONFIG --libs`) - -fi - -AC_SUBST(CURL_SETTING,$CURL_SETTING) -AC_SUBST(CURL_INC, $CURL_INC) -AC_SUBST(CURL_LIB, $CURL_LIB) - -dnl --------------------------------------------------------------------------- -dnl Check for SQLite -dnl Proj depends on it so it must appear before. -dnl --------------------------------------------------------------------------- - -SQLITE3_REQ_VERSION="3.0.0" -AX_LIB_SQLITE3($SQLITE3_REQ_VERSION) - -if test "$HAVE_SQLITE3" = "yes"; then - LIBS="$SQLITE3_LDFLAGS $LIBS" - AC_CHECK_LIB(sqlite3,sqlite3_column_table_name,SQLITE_HAS_COLUMN_METADATA=yes,SQLITE_HAS_COLUMN_METADATA=no,$LIBS) -fi - -AC_SUBST([SQLITE_INC], $SQLITE3_CFLAGS) -AC_SUBST([HAVE_SQLITE], $HAVE_SQLITE3) -AC_SUBST([SQLITE_HAS_COLUMN_METADATA], $SQLITE_HAS_COLUMN_METADATA) -HAVE_SQLITE=$HAVE_SQLITE3 - -dnl --------------------------------------------------------------------------- -dnl PROJ.6 related stuff -dnl --------------------------------------------------------------------------- - -AC_MSG_CHECKING([for PROJ >= 6 library]) - -AC_ARG_WITH(proj,[ --with-proj=ARG Compile with PROJ.x (ARG=yes or path)],,) - -AC_ARG_WITH(proj-extra-lib-for-test, - [ --with-proj-extra-lib-for-test=ARG Additional libraries to pass the detection test, but not used for libgdal linking (i.e. -lcurl -ltiff ...). Mainly for static libproj],,,) - -PROJ_INCLUDE="" -if test "x$with_proj" = "xno" ; then - - AC_MSG_ERROR([PROJ >= 6 is a required dependency.]) - -else - - if test "x$with_proj" = "xyes" -o "x$with_proj" = "x"; then - ORIG_LIBS="$LIBS" - LIBS="-lproj $with_proj_extra_lib_for_test $ORIG_LIBS" - AC_LANG_PUSH([C++]) - AC_CHECK_LIB(proj,proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,) - AC_LANG_POP([C++]) - if test "$PROJ_FOUND" = "no"; then - AC_LANG_PUSH([C++]) - AC_CHECK_LIB(proj,internal_proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,) - AC_LANG_POP([C++]) - if test "$PROJ_FOUND" = "yes"; then - PROJ_INCLUDE="-DPROJ_RENAME_SYMBOLS" - fi - fi - if test "$PROJ_FOUND" = "no"; then - LIBS="-linternalproj $ORIG_LIBS" - AC_LANG_PUSH([C++]) - AC_CHECK_LIB(internalproj,internal_proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,) - AC_LANG_POP([C++]) - if test "$PROJ_FOUND" = "yes"; then - PROJ_INCLUDE="-DPROJ_RENAME_SYMBOLS" - fi - fi - if test "$PROJ_FOUND" = "no"; then - AC_MSG_ERROR([PROJ 6 symbols not found]) - fi - AC_CHECK_HEADERS([proj.h]) - if test "$ac_cv_header_proj_h" = "yes" ; then - AC_MSG_NOTICE([proj.h found]) - else - AC_MSG_ERROR([proj.h not found]) - fi - else - ORIG_LIBS="$LIBS" - LIBS="-L$with_proj/lib -lproj $with_proj_extra_lib_for_test $ORIG_LIBS" - AC_LANG_PUSH([C++]) - AC_CHECK_LIB(proj,proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,) - AC_LANG_POP([C++]) - if test "$PROJ_FOUND" = "no"; then - LIBS="-L$with_proj/lib -lproj $with_proj_extra_lib_for_test $ORIG_LIBS" - unset ac_cv_lib_proj_proj_create_from_wkt - AC_LANG_PUSH([C++]) - AC_CHECK_LIB(proj,proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,) - AC_LANG_POP([C++]) - fi - if test "$PROJ_FOUND" = "no"; then - LIBS="-L$with_proj/lib64 -lproj $with_proj_extra_lib_for_test $ORIG_LIBS" - unset ac_cv_lib_proj_proj_create_from_wkt - AC_LANG_PUSH([C++]) - AC_CHECK_LIB(proj,proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,) - AC_LANG_POP([C++]) - fi - if test "$PROJ_FOUND" = "no"; then - LIBS="-L$with_proj/lib -lproj $with_proj_extra_lib_for_test $ORIG_LIBS" - AC_LANG_PUSH([C++]) - AC_CHECK_LIB(proj,internal_proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,) - AC_LANG_POP([C++]) - if test "$PROJ_FOUND" = "no"; then - LIBS="-L$with_proj/lib -lproj $with_proj_extra_lib_for_test $ORIG_LIBS" - unset ac_cv_lib_proj_internal_proj_create_from_wkt - AC_LANG_PUSH([C++]) - AC_CHECK_LIB(proj,internal_proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,) - AC_LANG_POP([C++]) - fi - if test "$PROJ_FOUND" = "yes"; then - PROJ_INCLUDE="-DPROJ_RENAME_SYMBOLS" - fi - fi - if test "$PROJ_FOUND" = "no"; then - LIBS="-L$with_proj/lib -linternalproj $with_proj_extra_lib_for_test $ORIG_LIBS" - AC_LANG_PUSH([C++]) - AC_CHECK_LIB(internalproj,internal_proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,) - AC_LANG_POP([C++]) - if test "$PROJ_FOUND" = "no"; then - LIBS="-L$with_proj/lib -linternalproj $with_proj_extra_lib_for_test $ORIG_LIBS" - unset ac_cv_lib_internal_proj_internal_proj_create_from_wkt - AC_LANG_PUSH([C++]) - AC_CHECK_LIB(internalproj,internal_proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,) - AC_LANG_POP([C++]) - fi - if test "$PROJ_FOUND" = "yes"; then - PROJ_INCLUDE="-DPROJ_RENAME_SYMBOLS" - fi - fi - if test "$PROJ_FOUND" = "no"; then - AC_MSG_ERROR([PROJ 6 symbols not found]) - fi - if test -r "$with_proj/include/proj.h" ; then - PROJ_INCLUDE="$PROJ_INCLUDE -I$with_proj/include" - AC_MSG_NOTICE([proj.h found]) - else - AC_MSG_ERROR([proj.h not found]) - fi - fi -fi - -AC_SUBST(PROJ_INCLUDE) - -dnl --------------------------------------------------------------------------- -dnl Check for SpatiaLite. -dnl --------------------------------------------------------------------------- - -AC_MSG_CHECKING(for spatialite) - -AC_ARG_WITH(spatialite, - [ --with-spatialite=ARG Include SpatiaLite support (ARG=no(default), yes, dlopen (only supported for Spatialite >= 4.1.2) or path)], - ,,) - -AC_ARG_WITH(spatialite-soname, - [ --with-spatialite-soname=ARG Spatialite shared object name (e.g. libspatialite.so), only used if --with-spatialite=dlopen], - ,,) - -HAVE_SPATIALITE=no - -if test -z "$with_spatialite" -o "$with_spatialite" = "no"; then - AC_MSG_RESULT(disabled) -elif test "$with_spatialite" = "yes"; then - AC_CHECK_HEADERS(sqlite3.h) - if test "$ac_cv_header_sqlite3_h" = "yes"; then - AC_MSG_CHECKING([for spatialite.h in /usr/include or /usr/local/include]) - if test -f "/usr/include/spatialite.h" -o -f "/usr/local/include/spatialite.h"; then - AC_MSG_RESULT(found) - AC_CHECK_LIB(spatialite,spatialite_init,SPATIALITE_INIT_FOUND=yes,SPATIALITE_INIT_FOUND=no,-lsqlite3) - if test "$SPATIALITE_INIT_FOUND" = "yes"; then - HAVE_SPATIALITE=yes - SPATIALITE_LIBS="-lspatialite -lsqlite3" - LIBS="$LIBS $SPATIALITE_LIBS" - HAVE_SQLITE3=yes - fi - else - AC_MSG_RESULT(not found : spatialite support disabled) - fi - fi -elif test "$with_spatialite" = "dlopen"; then - HAVE_SPATIALITE=dlopen - AC_MSG_RESULT(dlopen) - - if test "$with_spatialite_soname" != ""; then - SPATIALITE_SONAME="$with_spatialite_soname" - else - SPATIALITE_SONAME="spatialite.so" - fi -else - AC_CHECK_LIB(spatialite,spatialite_init,SPATIALITE_INIT_FOUND=yes,SPATIALITE_INIT_FOUND=no,-L$with_spatialite/lib -lspatialite) - - if test -f "$with_spatialite/include/spatialite.h" -a \ - "$SPATIALITE_INIT_FOUND" = "yes"; then - - if test "$HAVE_SQLITE3" = "yes"; then - SPATIALITE_INC="-I$with_spatialite/include" - HAVE_SPATIALITE=yes - SPATIALITE_LIBS="-L$with_spatialite/lib -lspatialite" - LIBS="$SQLITE3_LDFLAGS $LIBS $SPATIALITE_LIBS" - AC_MSG_RESULT(spatialite enabled) - else - AC_MSG_RESULT(spatialite disabled) - fi - else - AC_MSG_RESULT(disabled) - fi -fi - -if test "$HAVE_SPATIALITE" = "yes"; then - AC_CHECK_LIB(spatialite,spatialite_target_cpu,SPATIALITE_412_OR_LATER=yes,SPATIALITE_412_OR_LATER=no) -fi - -AC_SUBST([HAVE_SPATIALITE], $HAVE_SPATIALITE) -AC_SUBST([SPATIALITE_SONAME], $SPATIALITE_SONAME) -AC_SUBST([SPATIALITE_INC], $SPATIALITE_INC) -AC_SUBST([SPATIALITE_412_OR_LATER], $SPATIALITE_412_OR_LATER) - -dnl --------------------------------------------------------------------------- -dnl Check if liblzma is available. -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(liblzma,[ --with-liblzma[=ARG] Include liblzma support (ARG=yes/no)],,) - -if test "$with_liblzma" = "yes" ; then - AC_CHECK_LIB(lzma,lzma_code,LIBLZMA_SETTING=yes,LIBLZMA_SETTING=no,) - AC_CHECK_HEADERS(lzma.h) - - if test "$LIBLZMA_SETTING" = "yes" -a "$ac_cv_header_lzma_h" = "yes" ; then - LIBS="-llzma $LIBS" - else - LIBLZMA_SETTING=no - fi -else - LIBLZMA_SETTING=no -fi - -AC_SUBST(LIBLZMA_SETTING,$LIBLZMA_SETTING) - - -dnl --------------------------------------------------------------------------- -dnl Check if zstd is available. -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(zstd,[ --with-zstd[=ARG] Include zstd support (ARG=yes/no/installation_prefix)],,) - -if test "$with_zstd" = "" -o "$with_zstd" = "yes" ; then - AC_CHECK_LIB(zstd,ZSTD_decompressStream,ZSTD_SETTING=yes,ZSTD_SETTING=no,) - - if test "$ZSTD_SETTING" = "yes" ; then - LIBS="-lzstd $LIBS" - else - if test "$with_zstd" = "yes" ; then - AC_MSG_ERROR([libzstd not found]) - else - echo "libzstd not found - ZSTD support disabled" - fi - fi -elif test "$with_zstd" != "" -a "$with_zstd" != "no"; then - - AC_CHECK_LIB(zstd,ZSTD_decompressStream,ZSTD_SETTING=yes,ZSTD_SETTING=no,-L$with_zstd/lib) - - if test "$ZSTD_SETTING" = "yes" -a -f "$with_zstd/include/zstd.h" ; then - LIBS="-L$with_zstd/lib -lzstd $LIBS" - EXTRA_INCLUDES="-I$with_zstd/include $EXTRA_INCLUDES" - else - AC_MSG_ERROR([libzstd not found]) - fi - -else - ZSTD_SETTING=no -fi - -AC_SUBST(ZSTD_SETTING,$ZSTD_SETTING) - - -dnl --------------------------------------------------------------------------- -dnl Check if blosc is available. -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(blosc,[ --with-blosc[=ARG] Include blosc support (ARG=yes/no/installation_prefix)],,) - -if test "$with_blosc" = "" -o "$with_blosc" = "yes" ; then - AC_CHECK_LIB(blosc,blosc_cbuffer_validate,HAVE_BLOSC=yes,HAVE_BLOSC=no,) - - if test "$HAVE_BLOSC" = "yes" ; then - LIBS="-lblosc $LIBS" - else - if test "$with_blosc" = "yes" ; then - AC_MSG_ERROR([libblosc not found]) - else - echo "libblosc not found - BLOSC support disabled" - fi - fi -elif test "$with_blosc" != "" -a "$with_blosc" != "no"; then - - AC_CHECK_LIB(blosc,blosc_cbuffer_validate,HAVE_BLOSC=yes,HAVE_BLOSC=no,-L$with_blosc/lib) - - if test "$HAVE_BLOSC" = "yes" -a -f "$with_blosc/include/blosc.h" ; then - LIBS="-L$with_blosc/lib -lblosc $LIBS" - EXTRA_INCLUDES="-I$with_blosc/include $EXTRA_INCLUDES" - else - AC_MSG_ERROR([libblosc not found]) - fi - -else - HAVE_BLOSC=no -fi - -AC_SUBST(HAVE_BLOSC,$HAVE_BLOSC) - -dnl --------------------------------------------------------------------------- -dnl Check if lz4 is available. -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(lz4,[ --with-lz4[=ARG] Include lz4 support (ARG=yes/no/installation_prefix)],,) - -if test "$with_lz4" = "" -o "$with_lz4" = "yes" ; then - AC_CHECK_LIB(lz4,LZ4_decompress_safe,HAVE_LZ4=yes,HAVE_LZ4=no,) - - if test "$HAVE_LZ4" = "yes" ; then - LIBS="-llz4 $LIBS" - else - if test "$with_lz4" = "yes" ; then - AC_MSG_ERROR([liblz4 not found]) - else - echo "liblz4 not found - LZ4 support disabled" - fi - fi -elif test "$with_lz4" != "" -a "$with_lz4" != "no"; then - - AC_CHECK_LIB(lz4,LZ4_decompress_safe,HAVE_LZ4=yes,HAVE_LZ4=no,-L$with_lz4/lib) - - if test "$HAVE_LZ4" = "yes" -a -f "$with_lz4/include/lz4.h" ; then - LIBS="-L$with_lz4/lib -llz4 $LIBS" - EXTRA_INCLUDES="-I$with_lz4/include $EXTRA_INCLUDES" - else - AC_MSG_ERROR([liblz4 not found]) - fi - -else - HAVE_LZ4=no -fi - -AC_SUBST(HAVE_LZ4,$HAVE_LZ4) - -dnl --------------------------------------------------------------------------- -dnl Set up drivers and formats -dnl --------------------------------------------------------------------------- - -GDALFORMATS_ENABLED= -GDALFORMATS_DISABLED= -OGRFORMATS_ENABLED= -OGRFORMATS_ENABLED_CFLAGS= -OGRFORMATS_DISABLED= - -AC_DEFUN([INTERNAL_FORMATS],[aaigrid adrg aigrid airsar arg blx bmp bsb cals ceos ceos2 coasp cosar ctg dimap dted elas envisat ers esric fit gff gsg gxf hf2 idrisi ilwis iris iso8211 jaxapalsar jdem kmlsuperoverlay l1b leveller map mrf msgn ngsgeoid nitf northwood pds prf r raw rmf rs2 safe saga sdts sentinel2 sgi sigdem srtmhgt stacit stacta terragen tga til tsx usgsdem xpm xyz zarr zmap]) -AC_DEFUN([INTERNAL_OPT_FORMATS],[grib ozi pdf rik]) -AC_DEFUN([INTERNAL_DRIVERS],[avc cad csv dgn dxf edigeo flatgeobuf geoconcept georss gml gmt gpsbabel gpx jml mapml mvt ntf openfilegdb pgdump s57 selafin shape svg sxf tiger vdv wasp])dnl -AC_DEFUN([CURL_FORMATS],[eeda plmosaic wcs wms wmts daas ogcapi])dnl -AC_DEFUN([CURL_DRIVERS],[amigocloud carto csw elastic ngw plscenes wfs])dnl -AC_DEFUN([SQLITE_FORMATS],[rasterlite mbtiles])dnl -AC_DEFUN([SQLITE_DRIVERS],[gpkg vfk osm])dnl -AC_DEFUN([EXPAT_DRIVERS],[ods xlsx lvbag])dnl -AC_DEFUN([XERCES_DRIVERS],[nas ili gmlas])dnl -AC_DEFUN([ODBC_DRIVERS],[odbc pgeo mssqlspatial])dnl - -AC_ARG_ENABLE(all-optional-drivers, AS_HELP_STRING([--disable-all-optional-drivers], [disable all non-mandatory internal drivers. Individual drivers can be added with --enable-driver-XXX])) -if test "x$enable_all_optional_drivers" = "xno"; then : - all_drivers_disabled=yes -else - all_drivers_disabled=no -fi - -m4_define([ARG_DRIVER_ENABLED],[dnl -cur_driver_enabled=yes -requested=m4_join([_],[$enable_driver],$1) -if test "$all_drivers_disabled" = "yes"; then : - if test "x$requested" = "xyes"; then : - cur_driver_enabled=yes - else - cur_driver_enabled=no - fi -else - if test "x$requested" != "xno"; then : - cur_driver_enabled=yes - else - cur_driver_enabled=no - fi -fi -]) - - - -m4_foreach_w([frmt], INTERNAL_FORMATS, -[ -AC_ARG_ENABLE(driver-frmt, AS_HELP_STRING([--disable-driver-frmt], [disable frmt driver support (enabled by default)]))dnl -ARG_DRIVER_ENABLED(frmt) -if test "$cur_driver_enabled" = "yes"; then : - GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED frmt" - m4_join([_],[INTERNAL_FORMAT],frmt,[ENABLED])=yes -else - GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED frmt" - m4_join([_],[INTERNAL_FORMAT],frmt,[ENABLED])=no -fi -]) - -m4_foreach_w([frmt],INTERNAL_OPT_FORMATS, -[ -AC_ARG_ENABLE(driver-frmt, AS_HELP_STRING([--disable-driver-frmt], [disable frmt format support (enabled by default, requires dependency)]))dnl -ARG_DRIVER_ENABLED(frmt) -if test "$cur_driver_enabled" = "yes"; then : - m4_join([_],[INTERNAL_FORMAT],frmt,[ENABLED])=yes -else - GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED frmt" - m4_join([_],[INTERNAL_FORMAT],frmt,[ENABLED])=no -fi -]) - -m4_define([_OGRDEFINE],[m4_join([],[-D],m4_toupper([$1]),[_ENABLED])]) - -m4_foreach_w([frmt],INTERNAL_DRIVERS, -[ -AC_ARG_ENABLE(driver-frmt, AS_HELP_STRING([--disable-driver-frmt], [disable frmt driver support (enabled by default)]))dnl -ARG_DRIVER_ENABLED(frmt) -if test "$cur_driver_enabled" = "yes"; then : - OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED frmt" - m4_join([_],[INTERNAL_FORMAT],frmt,[ENABLED])=yes - OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS _OGRDEFINE(frmt)" -else - OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED frmt" - m4_join([_],[INTERNAL_FORMAT],frmt,[ENABLED])=no -fi -]) - -AC_DEFUN([INTERNAL_DRIVERS_WITH_SAME_NAME_AS_FORMAT],[idrisi pds sdts])dnl -m4_foreach_w([frmt],INTERNAL_DRIVERS_WITH_SAME_NAME_AS_FORMAT, -[ -driver_enabled=m4_join([_],[$INTERNAL_FORMAT],frmt,[ENABLED]) -if test "x$driver_enabled" != "xno"; then : - OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED frmt" - OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS _OGRDEFINE(frmt)" -else - OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED frmt" -fi -]) - -m4_foreach_w([frmt],CURL_FORMATS, -[ -AC_ARG_ENABLE(driver-frmt, AS_HELP_STRING([--disable-driver-frmt], [disable frmt format support (enabled by default, requires curl)]))dnl -ARG_DRIVER_ENABLED(frmt) -if test "$cur_driver_enabled" = "yes"; then : - m4_join([_],[INTERNAL_FORMAT],frmt,[ENABLED])=yes -else - GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED frmt" - m4_join([_],[INTERNAL_FORMAT],frmt,[ENABLED])=no -fi -]) - -m4_foreach_w([frmt],CURL_DRIVERS, -[ -AC_ARG_ENABLE(driver-frmt, AS_HELP_STRING([--disable-driver-frmt], [disable frmt driver support (enabled by default, requires curl)]))dnl -ARG_DRIVER_ENABLED(frmt) -if test "$cur_driver_enabled" = "yes"; then : - m4_join([_],[INTERNAL_FORMAT],frmt,[ENABLED])=yes -else - OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED frmt" - m4_join([_],[INTERNAL_FORMAT],frmt,[ENABLED])=no -fi -]) - -m4_foreach_w([frmt],SQLITE_FORMATS, -[ -AC_ARG_ENABLE(driver-frmt, AS_HELP_STRING([--disable-driver-frmt], [disable frmt format support (enabled by default, requires sqlite3)]))dnl -ARG_DRIVER_ENABLED(frmt) -if test "$cur_driver_enabled" = "yes"; then : - m4_join([_],[INTERNAL_FORMAT],frmt,[ENABLED])=yes -else - GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED frmt" - m4_join([_],[INTERNAL_FORMAT],frmt,[ENABLED])=no -fi -]) - -m4_foreach_w([frmt],SQLITE_DRIVERS, -[ -AC_ARG_ENABLE(driver-frmt, AS_HELP_STRING([--disable-driver-frmt], [disable frmt driver support (enabled by default, requires sqlite3)]))dnl -ARG_DRIVER_ENABLED(frmt) -if test "$cur_driver_enabled" = "yes"; then : - m4_join([_],[INTERNAL_FORMAT],frmt,[ENABLED])=yes -else - OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED frmt" - m4_join([_],[INTERNAL_FORMAT],frmt,[ENABLED])=no -fi -]) - -m4_foreach_w([frmt],EXPAT_DRIVERS, -[ -AC_ARG_ENABLE(driver-frmt, AS_HELP_STRING([--disable-driver-frmt], [disable frmt driver support (enabled by default, requires expat)]))dnl -ARG_DRIVER_ENABLED(frmt) -if test "$cur_driver_enabled" = "yes"; then : - m4_join([_],[INTERNAL_FORMAT],frmt,[ENABLED])=yes -else - OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED frmt" - m4_join([_],[INTERNAL_FORMAT],frmt,[ENABLED])=no -fi -]) - -m4_foreach_w([frmt],XERCES_DRIVERS, -[ -AC_ARG_ENABLE(driver-frmt, AS_HELP_STRING([--disable-driver-frmt], [disable frmt driver support (enabled by default, requires xerces-c)]))dnl -ARG_DRIVER_ENABLED(frmt) -if test "$cur_driver_enabled" = "yes"; then : - m4_join([_],[INTERNAL_FORMAT],frmt,[ENABLED])=yes -else - OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED frmt" - m4_join([_],[INTERNAL_FORMAT],frmt,[ENABLED])=no -fi -]) - -m4_foreach_w([frmt],ODBC_DRIVERS, -[ -AC_ARG_ENABLE(driver-frmt, AS_HELP_STRING([--disable-driver-frmt], [disable frmt driver support (enabled by default, requires odbc)]))dnl -ARG_DRIVER_ENABLED(frmt) -if test "$cur_driver_enabled" = "yes"; then : - m4_join([_],[INTERNAL_FORMAT],frmt,[ENABLED])=yes -else - OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED frmt" - m4_join([_],[INTERNAL_FORMAT],frmt,[ENABLED])=no -fi -]) - -AC_SUBST(OGRFORMATS_ENABLED,$OGRFORMATS_ENABLED) -AC_SUBST(OGRFORMATS_ENABLED_CFLAGS,$OGRFORMATS_ENABLED_CFLAGS) -AC_SUBST(GDALFORMATS_ENABLED,$GDALFORMATS_ENABLED) - -if test "$LIBZ_SETTING" != "no" ; then - if test "x$INTERNAL_FORMAT_rik_ENABLED" = "xyes"; then - GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED rik" - fi - if test "x$INTERNAL_FORMAT_ozi_ENABLED" = "xyes"; then - GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED ozi" - fi -fi - -if test "$CURL_SETTING" = "yes" ; then - - CURL_INC=`$LIBCURL_CONFIG --cflags` - CURL_LIB=`$LIBCURL_CONFIG --libs` -m4_foreach_w([frmt],CURL_FORMATS,[ - driver_enabled=m4_join([_],[$INTERNAL_FORMAT],frmt,[ENABLED]) - if test "x$driver_enabled" = "xyes"; then - GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED frmt" - fi -]) -m4_foreach_w([frmt],CURL_DRIVERS,[ - driver_enabled=m4_join([_],[$INTERNAL_FORMAT],frmt,[ENABLED]) - if test "x$driver_enabled" = "xyes"; then - OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED frmt" - OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS _OGRDEFINE(frmt)" - fi -]) - -fi - -if test "$HAVE_SQLITE3" = "yes"; then -m4_foreach_w([frmt],SQLITE_FORMATS,[ - driver_enabled=m4_join([_],[$INTERNAL_FORMAT],frmt,[ENABLED]) - if test "x$driver_enabled" = "xyes"; then - GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED frmt" - fi -]) - -m4_foreach_w([frmt],SQLITE_DRIVERS,[ - driver_enabled=m4_join([_],[$INTERNAL_FORMAT],frmt,[ENABLED]) - if test "x$driver_enabled" = "xyes"; then - OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED frmt" - OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS _OGRDEFINE(frmt)" - fi -]) - -fi - -dnl --------------------------------------------------------------------------- -dnl Select an PostgreSQL Library to use, or disable driver. -dnl --------------------------------------------------------------------------- - -PG_CONFIG=no - -AC_ARG_WITH(pg, - AS_HELP_STRING([--with-pg[=ARG]], - [Include PostgreSQL GDAL/OGR Support (ARG=yes,no)]),,) - -if test "x$with_pg" = "xyes" -o "x$with_pg" = "x" ; then - PG_CONFIG=yes -elif test "x$with_pg" != "xno"; then - AC_MSG_ERROR([Only --with-pg=yes/no supported]) -fi - -AC_MSG_CHECKING([for PostgreSQL]) - -if test "x$PG_CONFIG" = "xno" ; then - - HAVE_PG=no - PG_LIB= - PG_INC= - - AC_MSG_RESULT([no]) - -else - - PKG_PROG_PKG_CONFIG([0.21]) - PKG_CHECK_MODULES([PQ],[libpq > 9.1], [HAVE_PG=yes], [HAVE_PG=no]) - - if test "${HAVE_PG}" = "yes" ; then - PG_LIB="${PQ_LIBS}" - PG_INC="${PQ_CFLAGS}" - SAVED_LIBS="${LIBS}" - LIBS="${PG_LIB}" - AC_CHECK_LIB(pq,PQconnectdb,HAVE_PG=yes,HAVE_PG=no) - LIBS="${SAVED_LIBS}" - if test "${HAVE_PG}" = "yes" ; then - LIBS="${PG_LIB} ${LIBS}" - fi - else - if test "x$with_pg" = "xyes"; then - AC_MSG_ERROR([--with-pg was requested, but libpq is not available]) - fi - fi - -fi - -AC_SUBST(HAVE_PG,$HAVE_PG) -AC_SUBST(PG_INC,$PG_INC) -AC_SUBST(PG_LIB,$PG_LIB) - -dnl --------------------------------------------------------------------------- -dnl Check if cfitsio library is available. -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(cfitsio,[ --with-cfitsio[=ARG] Include FITS support (ARG=no or libcfitsio path)],,) - -if test "$with_cfitsio" = "no" ; then - - FITS_SETTING=no - - echo "FITS support disabled." - -elif test "$with_cfitsio" = "yes" -o "$with_cfitsio" = "" ; then - - AC_CHECK_LIB(cfitsio,ffopen,FITS_SETTING=external,FITS_SETTING=no,) - - if test "$FITS_SETTING" = "external" ; then - LIBS="-lcfitsio $LIBS" - echo "using pre-installed libcfitsio." - else - echo "libcfitsio not found - FITS support disabled" - fi - -dnl Fedora has cfitsio headers in /usr/include/cfitsio - if test "$FITS_SETTING" = "external" -a -d /usr/include/cfitsio ; then - EXTRA_INCLUDES="-I/usr/include/cfitsio $EXTRA_INCLUDES" - fi - -else - - FITS_SETTING=external - LIBS="-L$with_cfitsio -L$with_cfitsio/lib -lcfitsio $LIBS" - EXTRA_INCLUDES="-I$with_cfitsio -I$with_cfitsio/include $EXTRA_INCLUDES" - - echo "using libcfitsio from $with_cfitsio." -fi - -AC_SUBST(FITS_SETTING,$FITS_SETTING) - -if test "$FITS_SETTING" != "no" ; then - OPT_GDAL_FORMATS="fits $OPT_GDAL_FORMATS" -fi - -dnl --------------------------------------------------------------------------- -dnl Check if PCRaster (libcsf) library is available. -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(pcraster,[ --with-pcraster[=ARG] Include PCRaster (libcsf) support (ARG=internal, no or path)],,) - -if test "$with_pcraster" = "no" ; then - - PCRASTER_SETTING=no - - echo "PCRaster support disabled." - -elif test "$with_pcraster" = "yes" -o "$with_pcraster" = "" ; then - - AC_CHECK_LIB(csf,Mopen,PCRASTER_SETTING=external,PCRASTER_SETTING=internal,$LIBS) - AC_CHECK_HEADERS(csf.h) - - if test "$PCRASTER_SETTING" = "external" -a "$ac_cv_header_csf_h" = "no" ; then - PCRASTER_SETTING=internal - fi - - if test "$PCRASTER_SETTING" = "external" ; then - LIBS="-lcsf $LIBS" - echo "using pre-installed libcsf." - else - echo "using internal csf code." - fi - -elif test "$with_pcraster" = "internal" ; then - - PCRASTER_SETTING=internal - - echo "using internal csf code." - -else - - PCRASTER_SETTING=external - LIBS="-L$with_pcraster/lib -lcsf $LIBS" - EXTRA_INCLUDES="-I$with_pcraster/include $EXTRA_INCLUDES" - - echo "using libcsf from $with_pcraster." - -fi - -AC_SUBST(PCRASTER_SETTING,$PCRASTER_SETTING) - -if test "$PCRASTER_SETTING" != "no" ; then - OPT_GDAL_FORMATS="pcraster $OPT_GDAL_FORMATS" -fi - -dnl --------------------------------------------------------------------------- -dnl Select a PNG Library to use, or disable driver. -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH([png], [ --with-png[=ARG] Include PNG support (ARG=internal, no or path)],,) - -AC_MSG_CHECKING([for libpng]) - -if test "$with_png" = "no" ; then - - PNG_SETTING=no - - echo "png support disabled." - -elif test "$with_png" = "yes" -o "$with_png" = "" ; then - - AC_CHECK_LIB([png], [png_set_IHDR], [PNG_SETTING=external], [PNG_SETTING=internal], [$LIBS]) - AC_CHECK_HEADERS([png.h]) - - if test "$PNG_SETTING" = "external" -a "$ac_cv_header_png_h" = "no" ; then - PNG_SETTING=internal - fi - if test "$PNG_SETTING" = "external" ; then - LIBS="-lpng $LIBS" - echo "using pre-installed libpng." - else - echo "using internal png code." - fi - -elif test "$with_png" = "internal" ; then - - PNG_SETTING=internal - - echo "using internal png code." - -else - - PNG_SETTING=external - LIBS="-L$with_png -L$with_png/lib -lpng $LIBS" - EXTRA_INCLUDES="-I$with_png -I$with_png/include $EXTRA_INCLUDES" - - echo "using libpng from $with_png." - -fi - -AC_SUBST([PNG_SETTING], [$PNG_SETTING]) - -if test "$PNG_SETTING" != "no" ; then - OPT_GDAL_FORMATS="png $OPT_GDAL_FORMATS" - if test "x$INTERNAL_FORMAT_grib_ENABLED" = "xyes"; then - GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED grib" - fi -fi - -dnl --------------------------------------------------------------------------- -dnl Check if user requests renaming internal libpng symbols -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(rename_internal_libpng_symbols,[ --with-rename-internal-libpng-symbols[=ARG] Prefix internal libpng symbols with gdal_ (ARG=yes/no)],,) - -RENAME_INTERNAL_PNG_SYMBOLS=no -if test "x$with_rename_internal_libpng_symbols" = "xyes" -o "x$with_rename_internal_libpng_symbols" = "x"; then - RENAME_INTERNAL_PNG_SYMBOLS=yes -fi - -AC_SUBST(RENAME_INTERNAL_PNG_SYMBOLS,$RENAME_INTERNAL_PNG_SYMBOLS) - -dnl --------------------------------------------------------------------------- -dnl Enable DDS driver. -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH([dds], [ --with-dds[=ARG] Include DDS support (ARG=no, or path)],,) - -AC_MSG_CHECKING([for libcrunch]) - -if test "$with_dds" = "no" -o "$with_dds" = ""; then - - DDS_SETTING="no" - CRUNCHDIR="" - - echo "dds support disabled." - -else - - DDS_SETTING=yes - CRUNCHDIR="$with_dds" - LIBS="-L$with_dds/lib/ -lcrunch $LIBS" - echo "using libcrunch from $with_dds." - -fi - -AC_SUBST(CRUNCHDIR,$CRUNCHDIR) -AC_SUBST([DDS_SETTING], [$DDS_SETTING]) - -if test "$DDS_SETTING" != "no" ; then - OPT_GDAL_FORMATS="dds $OPT_GDAL_FORMATS" -fi - -dnl --------------------------------------------------------------------------- -dnl Check if GTA library is available. -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH([gta],[ --with-gta[=ARG] Include GTA support (ARG=no or libgta tree prefix)],,) - -if test "$with_gta" = "no" ; then - - GTA_SETTING=no - - echo "GTA support disabled." - -elif test "$with_gta" = "yes" -o "$with_gta" = "" ; then - - AC_CHECK_LIB([gta], [gta_version], [GTA_SETTING=yes], [GTA_SETTING=no],) - - if test "$GTA_SETTING" = "yes" ; then - LIBS="-lgta $LIBS" - echo "using pre-installed libgta." - else - echo "libgta not found - GTA support disabled" - fi - -else - - GTA_SETTING=yes - LIBS="-L$with_gta -L$with_gta/lib -lgta $LIBS" - EXTRA_INCLUDES="-I$with_gta -I$with_gta/include $EXTRA_INCLUDES" - - echo "using libgta from $with_gta." -fi - -AC_SUBST([GTA_SETTING], [$GTA_SETTING]) - -if test "$GTA_SETTING" != "no" ; then - OPT_GDAL_FORMATS="gta $OPT_GDAL_FORMATS" -fi - -dnl --------------------------------------------------------------------------- -dnl Select PCIDSK options. -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH([pcidsk], [ --with-pcidsk[=ARG] Path to external PCIDSK SDK or internal (default)],,) - -AC_MSG_CHECKING([for PCIDSK]) - -PCIDSK_LIB= -PCIDSK_INCLUDE= - -if test "$with_pcidsk" = "no" ; then - - PCIDSK_SETTING=no - - echo "pcidsk support disabled." - -elif test "$with_pcidsk" = "" -o "$with_pcidsk" = "yes" -o "$with_pcidsk" = "internal" ; then - - PCIDSK_SETTING=internal - - echo "using internal libpcidsk." - -else - - PCIDSK_SETTING=external - PCIDSK_LIB="-L$with_pcidsk/lib -lpcidsk" - PCIDSK_INCLUDE="-I$with_pcidsk/include -I$with_pcidsk/include/pcidsk" - - echo "using libpcidsk from $with_pcidsk." - -fi - -if test "$with_pcidsk" != "no" ; then - - AC_SUBST([PCIDSK_SETTING], [$PCIDSK_SETTING]) - AC_SUBST([PCIDSK_LIB], [$PCIDSK_LIB]) - AC_SUBST([PCIDSK_INCLUDE], [$PCIDSK_INCLUDE]) - -fi - -dnl --------------------------------------------------------------------------- -dnl Select a libgeotiff library to use. -dnl --------------------------------------------------------------------------- - -GEOTIFF_INCLUDE= -AC_ARG_WITH(geotiff,[ --with-geotiff=ARG Libgeotiff library to use (ARG=internal, yes or path)],,) - -if test "$with_geotiff" = "yes" -o "$with_geotiff" = "" ; then - - if test "$TIFF_SETTING" = "internal" ; then - GEOTIFF_SETTING=internal - else - dnl We now require libgeotiff 1.5.0 - AC_CHECK_LIB(geotiff,GTIFAttachPROJContext,GEOTIFF_SETTING=external,GEOTIFF_SETTING=internal) - - fi - - if test "$GEOTIFF_SETTING" = "external" ; then - - dnl Now search for headers - if test -r /usr/include/geotiff.h ; then - GEOTIFF_INCLUDE= - dnl Debian (at least some versions of it) install in /usr/include/geotiff - elif test -r /usr/include/geotiff/geotiff.h ; then - GEOTIFF_INCLUDE="-I/usr/include/geotiff" - dnl Fedora and OpenSuse in /usr/include/libgeotiff (#4706) - elif test -r /usr/include/libgeotiff/geotiff.h ; then - GEOTIFF_INCLUDE="-I/usr/include/libgeotiff" - else - AC_CHECK_HEADERS([geotiff.h]) - if test "$ac_cv_header_geotiff_h" = "no" ; then - AC_MSG_ERROR([cannot find geotiff.h]) - fi - fi - - LIBS="-lgeotiff $LIBS" - echo "using pre-installed libgeotiff." - - else - - echo "using internal GeoTIFF code." - - fi - -elif test "$with_geotiff" = "internal" ; then - - GEOTIFF_SETTING=internal - - echo "using internal GeoTIFF code." - -elif test "x${with_geotiff}" = "xno" ; then - - AC_MSG_ERROR([libgeotiff is a required dependency]) - -else - - GEOTIFF_SETTING=external - - dnl We now require libgeotiff 1.5.0 - dnl first check if $with_geotiff/lib has the library: - AC_CHECK_LIB(geotiff,GTIFAttachPROJContext,GEOTIFF_SETTING=external,GEOTIFF_SETTING=not_found,-L$with_geotiff/lib) - - if test $GEOTIFF_SETTING = "external" ; then - LIBS="-L$with_geotiff/lib -lgeotiff $LIBS" - if test -d $with_geotiff/include ; then - EXTRA_INCLUDES="-I$with_geotiff/include $EXTRA_INCLUDES" - fi - else - dnl check if $with_geotiff itself contains the header and library (e.g. as an uninstalled build directory would) - AC_CHECK_LIB(geotiff,GTIFAttachPROJContext,GEOTIFF_SETTING=external,AC_MSG_ERROR([We require at least GeoTIFF 1.5.0. Consider using the one supplied with GDAL]),-L$with_geotiff) - if test $GEOTIFF_SETTING = "external" ; then - LIBS="-L$with_geotiff -lgeotiff $LIBS" - EXTRA_INCLUDES="-I$with_geotiff $EXTRA_INCLUDES" - fi - fi - - echo "using libgeotiff from $with_geotiff." -fi - -AC_SUBST(GEOTIFF_SETTING,$GEOTIFF_SETTING) -AC_SUBST(GEOTIFF_INCLUDE,$GEOTIFF_INCLUDE) - -dnl --------------------------------------------------------------------------- -dnl Check for JPEG 12 bit -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH([jpeg12], - AS_HELP_STRING([--without-jpeg12], - [Disable JPEG 8/12bit TIFF support]),,) - -TIFF_JPEG12_ENABLED=no -AC_MSG_CHECKING([for jpeg12]) -if test "$with_jpeg12" = no ; then - JPEG12_ENABLED=no - AC_MSG_RESULT([disabled by user]) - -elif test "$JPEG_SETTING" = "no" -a "$with_jpeg12" = ""; then - JPEG12_ENABLED=no - AC_MSG_RESULT([disabled, JPEG disabled]) - -elif test "$TIFF_SETTING" = "internal" ; then - AC_MSG_RESULT([enabled]) - JPEG12_ENABLED=yes - TIFF_JPEG12_ENABLED=yes - -else - AC_MSG_RESULT([enabled]) - JPEG12_ENABLED=yes - -fi - -AC_SUBST(JPEG12_ENABLED,$JPEG12_ENABLED) -AC_SUBST(TIFF_JPEG12_ENABLED,$TIFF_JPEG12_ENABLED) - -dnl --------------------------------------------------------------------------- -dnl Select a GIF Library to use, or disable driver. -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(gif,[ --with-gif[=ARG] Include GIF support (ARG=internal, no or path)],,) - -if test "$with_gif" = "no" ; then - - GIF_SETTING=no - - echo "gif support disabled." - -elif test "$with_gif" = "yes" -o "$with_gif" = "" ; then - - AC_CHECK_LIB(gif,DGifOpenFileName,GIF_SETTING=external,GIF_SETTING=internal,) - AC_CHECK_HEADERS(gif_lib.h) - - if test "$GIF_SETTING" = "external" ; then - LIBS="-lgif $LIBS" - echo "using pre-installed libgif." - else - echo "using internal gif code." - fi - -elif test "$with_gif" = "internal" ; then - - GIF_SETTING=internal - - echo "using internal gif code." - -else - - GIF_SETTING=external - LIBS="-L$with_gif -L$with_gif/lib -lgif $LIBS" - EXTRA_INCLUDES="-I$with_gif -I$with_gif/include $EXTRA_INCLUDES" - - echo "using libgif from $with_gif." - -fi - -AC_SUBST(GIF_SETTING,$GIF_SETTING) - -if test "$GIF_SETTING" != "no" ; then - OPT_GDAL_FORMATS="gif $OPT_GDAL_FORMATS" -fi - -dnl --------------------------------------------------------------------------- -dnl Select an OGDI Library to use, or disable driver. -dnl --------------------------------------------------------------------------- - -OGDI_INCLUDE= -export OGDI_INCLUDE - -AC_ARG_WITH(ogdi,[ --with-ogdi[=ARG] Include OGDI support (ARG=path)],,) - -if test "$with_ogdi" = "no" ; then - - HAVE_OGDI=no - - echo "ogdi support disabled." - -elif test "$with_ogdi" = "yes" -o "$with_ogdi" = "" ; then - - PKG_CHECK_MODULES([OGDI], [ogdi], [HAVE_OGDI=yes], [:]) - if test "$HAVE_OGDI" = yes; then - OGDI_INCLUDE=$OGDI_CFLAGS - LIBS="$OGDI_LIBS $LIBS" - else - AC_CHECK_HEADERS(ecs.h) - if test "$ac_cv_header_ecs_h" = "no" ; then - if test -f "/usr/include/ogdi/ecs.h"; then - OGDI_INCLUDE="-I/usr/include/ogdi" - elif test -f "/usr/local/include/ogdi/ecs.h"; then - OGDI_INCLUDE="-I/usr/local/include/ogdi" - elif test -f "/usr/include/ecs.h"; then - OGDI_INCLUDE="-I/usr/include" - elif test -f "/usr/local/include/ecs.h"; then - OGDI_INCLUDE="-I/usr/local/include" - fi - fi - - if test "$OGDI_INCLUDE" != "" -o "$ac_cv_header_ecs_h" = "yes"; then - AC_CHECK_LIB(ogdi,cln_GetLayerCapabilities,HAVE_OGDI=yes,HAVE_OGDI=no,) - if test "$HAVE_OGDI" = "yes" ; then - LIBS="-logdi $LIBS" - else - dnl For backward compatibility. Retry with ogdi31 as a name - AC_CHECK_LIB(ogdi31,cln_GetLayerCapabilities,HAVE_OGDI=yes,HAVE_OGDI=no,) - if test "$HAVE_OGDI" = "yes" ; then - LIBS="-logdi31 $LIBS" - fi - fi - else - HAVE_OGDI=no - fi - fi - -else - - AC_CHECK_LIB(ogdi,cln_GetLayerCapabilities,HAVE_OGDI=yes,HAVE_OGDI=no,-L$with_ogdi -L$with_ogdi/lib -logdi) - if test "$HAVE_OGDI" = "yes" ; then - if test -f "$with_ogdi/ecs.h" -o -f "$with_ogdi/include/ecs.h"; then - LIBS="-L$with_ogdi -L$with_ogdi/lib -logdi $LIBS" - OGDI_INCLUDE="-I$with_ogdi -I$with_ogdi/include" - - echo "using libogdi from $with_ogdi." - else - HAVE_OGDI=no - AC_MSG_ERROR([ecs.h not found.]) - fi - else - dnl For backward compatibility. Retry with ogdi31 as a name - AC_CHECK_LIB(ogdi31,cln_GetLayerCapabilities,HAVE_OGDI=yes,HAVE_OGDI=no,-L$with_ogdi -L$with_ogdi/lib -logdi31) - if test "$HAVE_OGDI" = "yes" ; then - if test -f "$with_ogdi/ecs.h" -o -f "$with_ogdi/include/ecs.h"; then - LIBS="-L$with_ogdi -L$with_ogdi/lib -logdi31 $LIBS" - OGDI_INCLUDE="-I$with_ogdi -I$with_ogdi/include" - - echo "using libogdi31 from $with_ogdi." - else - HAVE_OGDI=no - AC_MSG_ERROR([ecs.h not found.]) - fi - else - AC_MSG_ERROR([libogdi not found.]) - fi - fi - -fi - -AC_SUBST(HAVE_OGDI,$HAVE_OGDI) -AC_SUBST(OGDI_INCLUDE,$OGDI_INCLUDE) - -dnl --------------------------------------------------------------------------- -dnl Select a SOSI lib to use, or disable driver. -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(sosi,[ --with-sosi[=ARG] Include SOSI support (ARG=SOSI lib Path, yes or no)],,) - -if test -z "$with_sosi" -o "$with_sosi" = "no" ; then - - SOSI_ENABLED=no - - echo "SOSI support disabled." - -elif test "$with_sosi" = "yes" ; then - - AC_MSG_CHECKING([for libfyba]) - - rm -f testfyba.* - rm -f testfyba - echo "#include " > testfyba.cpp - echo "int main() { LC_Init(); return 0; }" >> testfyba.cpp - if test -r /usr/include/fyba -a -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} -I/usr/include/fyba -DLINUX testfyba.cpp -lfyba -lfygm -lfyut -o testfyba 2>&1`" ; then - AC_MSG_RESULT([found]) - SOSI_ENABLED=yes - SOSI_LIB="-lfyba -lfygm -lfyut" - SOSI_INC="-I/usr/include/fyba" - else - AC_MSG_RESULT([not found]) - AC_MSG_CHECKING([for libfyba.a, libfygm.a and libfyut.a in /usr/local/lib]) - if test -r /usr/local/lib/libfyba.a -a -r /usr/local/lib/libfygm.a -a -r /usr/local/lib/libfyut.a ; then - AC_MSG_RESULT([found]) - SOSI_ENABLED=yes - SOSI_LIB="/usr/local/lib/libfyba.a /usr/local/lib/libfygm.a /usr/local/lib/libfyut.a" - else - AC_MSG_ERROR([not found.]) - fi - - AC_MSG_CHECKING([for fyba.h, fygm.h and fyut.h in /usr/local/include/fyba]) - if test -r /usr/local/include/fyba/fyba.h -a -r /usr/local/include/fyba/fygm.h -a -r /usr/local/include/fyba/fyut.h ; then - AC_MSG_RESULT([found]) - SOSI_ENABLED=yes - SOSI_INC="-I/usr/local/include/fyba" - else - AC_MSG_ERROR([not found.]) - fi - fi - - rm -f testfyba.* - rm -f testfyba -else - - AC_MSG_CHECKING([for libfyba.a, libfygm.a and libfyut.a in $with_sosi/lib]) - if test -r $with_sosi/lib/libfyba.a -a -r $with_sosi/lib/libfygm.a -a -r $with_sosi/lib/libfyut.a ; then - AC_MSG_RESULT([found.]) - SOSI_LIB="$with_sosi/lib/libfyba.a $with_sosi/lib/libfygm.a $with_sosi/lib/libfyut.a" - SOSI_ENABLED=yes - else - AC_MSG_ERROR([not found.]) - fi - - AC_MSG_CHECKING([for fyba.h in $with_sosi/include/fyba]) - if test -r $with_sosi/include/fyba/fyba.h -a -r $with_sosi/include/fyba/fygm.h -a -r $with_sosi/include/fyba/fyut.h ; then - AC_MSG_RESULT([found.]) - SOSI_INC="-I$with_sosi/include/fyba" - SOSI_ENABLED=yes - else - AC_MSG_ERROR([not found.]) - fi - -fi - -AC_SUBST(SOSI_ENABLED, $SOSI_ENABLED) -AC_SUBST(SOSI_LIB, $SOSI_LIB) -AC_SUBST(SOSI_INC, $SOSI_INC) - -dnl --------------------------------------------------------------------------- -dnl MongoCXXv3 driver -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(mongocxxv3,[ --with-mongocxxv3[=ARG] Include MongoCXXv3 support (ARG=yes or no)],,) - -MONGOCXXV3_ENABLED=no - -if test "$with_mongocxxv3" = "no" ; then - - echo "MONGODBv3 support disabled." - -elif test "$with_mongocxxv3" = "yes" -o "$with_mongocxxv3" = "" ; then - - PKG_PROG_PKG_CONFIG([0.21]) - PKG_CHECK_MODULES([MONGOCXXV3], [libmongocxx >= 3.4.0], [MONGOCXXV3_ENABLED=yes], [MONGOCXXV3_ENABLED=no]) - - if test "$MONGOCXXV3_ENABLED" = "no" -a "$with_mongocxxv3" = "yes" ; then - AC_MSG_ERROR([mongocxxv3 requested but no found]) - fi - -fi - -AC_SUBST(MONGOCXXV3_ENABLED, $MONGOCXXV3_ENABLED) -AC_SUBST(MONGOCXXV3_LIBS, $MONGOCXXV3_LIBS) -AC_SUBST(MONGOCXXV3_CFLAGS, $MONGOCXXV3_CFLAGS) - - -dnl --------------------------------------------------------------------------- -dnl Select an HDF4 Library to use, or disable driver. -dnl -dnl We assume the user will have libjpeg and libz from other sources when -dnl linking against static HDF4 libraries. -dnl --------------------------------------------------------------------------- - -HDF4_INCLUDE="" - -AC_ARG_WITH(hdf4,[ --with-hdf4[=ARG] Include HDF4 support (ARG=path)],,) - -if test x"$with_hdf4" = x"no" ; then - - HAVE_HDF4=no - - echo "hdf4 support disabled." - -else - - if test x"$with_hdf4" = x"yes" -o x"$with_hdf4" = x"" ; then -dnl Fedora has hdf static libraries in /usr/lib/hdf - if test -d /usr/lib64/hdf; then - HDF_LIB_DIR="/usr/lib64/hdf" - elif test -d /usr/lib/hdf; then - HDF_LIB_DIR="/usr/lib/hdf" - else - HDF_LIB_DIR="" - fi - else - if test -d $with_hdf4/lib ; then - HDF_LIB_DIR="$with_hdf4/lib" - else - HDF_LIB_DIR="$with_hdf4" - fi - fi - - ORIG_LIBS="$LIBS" - if test "$HDF_LIB_DIR" != "" ; then - LIBS="-L$HDF_LIB_DIR $LIBS" - fi - -dnl Debian supplies the HDF4 library which does not conflict with NetCDF. -dnl Test for Debian flavor first. Hint: install the libhdf4-alt-dev package. - AC_CHECK_LIB(mfhdfalt,SDreaddata,HDF_LIB_NAME="-lmfhdfalt -ldfalt",HDF_LIB_NAME=missing,-ldfalt) - -dnl If it fails, test again for normal libmfhdf/libdf - if test "$HDF_LIB_NAME" = "missing" ; then - unset ac_cv_lib_mfhdf_SDreaddata - AC_CHECK_LIB(mfhdf,SDreaddata,HDF_LIB_NAME="-lmfhdf -ldf",HDF_LIB_NAME=missing,-ldf) - if test "$HDF_LIB_NAME" = "missing" ; then - unset ac_cv_lib_mfhdf_SDreaddata - AC_CHECK_LIB(hdf4,SDreaddata,HDF_LIB_NAME=-lhdf4,HDF_LIB_NAME=missing,) - fi - fi - -dnl Test again, with -ldf, -ljpeg and -lz this time. - if test "$HDF_LIB_NAME" = "missing" ; then - unset ac_cv_lib_mfhdf_SDreaddata - AC_CHECK_LIB(mfhdf,SDreaddata,HDF_LIB_NAME="-lmfhdf -ldf",HDF_LIB_NAME=missing,-ldf -ljpeg -lz) - fi - -dnl Not found... again, with -lsz. - if test "$HDF_LIB_NAME" = "missing" ; then - unset ac_cv_lib_mfhdf_SDreaddata - AC_CHECK_LIB(mfhdf,SDreaddata,HDF_LIB_NAME="-lmfhdf -ldf -lsz",HDF_LIB_NAME=missing,-ldf -lsz -ljpeg -lz) - fi - - if test "$HDF_LIB_NAME" != "missing" ; then - - if test "$HDF_LIB_DIR" != "" ; then - LIBS="-L$HDF_LIB_DIR $HDF_LIB_NAME $ORIG_LIBS" - else - LIBS="$HDF_LIB_NAME $ORIG_LIBS" - fi - - dnl HDF4 library newer than 4.2.5 has a SDreset_maxopenfiles/SDget_maxopenfiles interface - dnl which allows opening many HDF files simultaneously (the max number of files was previously - dnl hardcoded and too low, smth. like 32). Search for it and use if available. - AC_CHECK_LIB(mfhdfalt,SDget_maxopenfiles,HDF4_HAS_MAXOPENFILES=yes,HDF4_HAS_MAXOPENFILES=no,$HDF_LIB_NAME) - if test "$HDF4_HAS_MAXOPENFILES" = "no" ; then - AC_CHECK_LIB(mfhdf,SDget_maxopenfiles,HDF4_HAS_MAXOPENFILES=yes,HDF4_HAS_MAXOPENFILES=no,$HDF_LIB_NAME) - fi - - dnl Now search for headers - if test "$with_hdf4" = "yes" -o "$with_hdf4" = "" -a -r /usr/include/hdf/hdf.h ; then - HDF4_INCLUDE="-I/usr/include/hdf" - elif test -r "$with_hdf4/hdf/hdf.h" ; then - HDF4_INCLUDE="-I$with_hdf4/hdf" - elif test -r "$with_hdf4/include/hdf/hdf.h" ; then - HDF4_INCLUDE="-I$with_hdf4/include/hdf" - elif test -r "$with_hdf4/include/hdf.h" ; then - HDF4_INCLUDE="-I$with_hdf4/include" - elif test -r "$with_hdf4/hdf.h" ; then - HDF4_INCLUDE="-I$with_hdf4" - fi - - HAVE_HDF4=yes - - else - - if test x"$with_hdf4" != x"" ; then - AC_MSG_ERROR([HDF4 support requested with arg "$with_hdf4", but neither hdf4 nor mfhdf lib found]) - else - LIBS="$ORIG_LIBS" - HAVE_HDF4=no - fi - - fi - -fi - -AC_SUBST(HAVE_HDF4,$HAVE_HDF4) -AC_SUBST(HDF4_INCLUDE,$HDF4_INCLUDE) -AC_SUBST(HDF4_HAS_MAXOPENFILES,$HDF4_HAS_MAXOPENFILES) - -if test "$HAVE_HDF4" != "no" ; then - OPT_GDAL_FORMATS="hdf4 $OPT_GDAL_FORMATS" -fi - - -dnl --------------------------------------------------------------------------- -dnl Select an HDF5 Library to use, or disable driver. -dnl -dnl --------------------------------------------------------------------------- - -HDF5_INCLUDE="" - -AC_ARG_WITH(hdf5,[ --with-hdf5[=ARG] Include HDF5 support (ARG=path)],,) - -if test "$with_hdf5" = "no" ; then - - HAVE_HDF5=no - - echo "hdf5 support disabled." - -elif test "$with_hdf5" = "yes" -o "$with_hdf5" = "" ; then - - HDF5_CFLAGS="" - HDF5_LIBS="" - PKG_PROG_PKG_CONFIG([0.21]) # check and set $PKG_CONFIG - PKG_CHECK_MODULES([HDF5], [hdf5], [HAVE_HDF5=yes], [HAVE_HDF5=no]) - - if test "$HAVE_HDF5" = "yes"; then - - # Test that the package found is for the right architecture - saved_LIBS="$LIBS" - LIBS="$HDF5_LIBS" - AC_CHECK_LIB(hdf5,H5Fopen, [HAVE_HDF5=yes], [HAVE_HDF5=no]) - LIBS="$saved_LIBS" - - if test "$HAVE_HDF5" = "yes"; then - LIBS="$HDF5_LIBS $LIBS" - HDF5_INCLUDE="$HDF5_CFLAGS" - fi - - else - - AC_CHECK_LIB(hdf5,H5Fopen,HAVE_HDF5=yes,HAVE_HDF5=no,) - - if test "$HAVE_HDF5" = "yes" ; then - LIBS="-lhdf5 $LIBS" - fi - - dnl Some Linux distros install hdf include files here. - dnl if test "$HAVE_HDF5" = "yes" -a -r /usr/include/hdf5.h ; then - dnl HDF5_INCLUDE="-I/usr/include" - dnl fi - fi - -else - - if test -d $with_hdf5/lib ; then - HDF5_LIB_DIR=$with_hdf5/lib - else - HDF5_LIB_DIR=$with_hdf5 - fi - - ORIG_LIBS="$LIBS" - LIBS="-L$HDF5_LIB_DIR $LIBS -lhdf5" - - AC_CHECK_LIB(hdf5,H5Fopen,HDF5_LIB_NAME="-lhdf5 ",HDF5_LIB_NAME=missing,-lhdf5) - - if test "$HDF5_LIB_NAME" = "missing" ; then - AC_MSG_ERROR([HDF5 support requested with arg $with_hdf5, but no hdf5 lib found]) - fi - - LIBS="-L$HDF5_LIB_DIR $HDF5_LIB_NAME $ORIG_LIBS" - - if test -r "$with_hdf5/hdf5/hdf5.h" ; then - HDF5_INCLUDE="-I$with_hdf5/hdf5" - elif test -r "$with_hdf5/include/hdf5/hdf5.h" ; then - HDF5_INCLUDE="-I$with_hdf5/include/hdf5" - elif test -r "$with_hdf5/include/hdf5.h" ; then - HDF5_INCLUDE="-I$with_hdf5/include" - elif test -r "$with_hdf5/hdf.h" ; then - HDF5_INCLUDE="-I$with_hdf5" - fi - - HAVE_HDF5=yes -fi - -AC_SUBST(HAVE_HDF5,$HAVE_HDF5) -AC_SUBST(HDF5_INCLUDE,$HDF5_INCLUDE) - -if test "$HAVE_HDF5" != "no" ; then - OPT_GDAL_FORMATS="hdf5 $OPT_GDAL_FORMATS" -fi - -dnl --------------------------------------------------------------------------- -dnl Check if kealib library is available. -dnl --------------------------------------------------------------------------- - -KEA_CONFIG=no - -AC_ARG_WITH(kea,[ --with-kea[=ARG] Include kealib (ARG=path to kea-config) [[default=yes]]],,) - -if test "$with_kea" = "yes" -o "x$with_kea" = "x" ; then - AC_PATH_PROG(KEA_CONFIG, kea-config, no) -else - KEA_CONFIG=$with_kea -fi - -AC_MSG_CHECKING([for kea]) - -if test "$KEA_CONFIG" = "no" ; then - - HAVE_KEA=no - KEA_LIB= - KEA_INC= - - AC_MSG_RESULT([no]) - -else - if test -d $KEA_CONFIG ; then - AC_MSG_RESULT([no]) - AC_MSG_ERROR([--with-kea argument is a directory. It should be the path to the kea_config script, often somewhere like /usr/local/bin/kea_config.]) - fi - - if test \! -x $KEA_CONFIG ; then - AC_MSG_RESULT([no]) - AC_MSG_ERROR([--with-kea argument is a not an executable file. It should be the path to the kea_config script, often somewhere like /usr/local/bin/kea_config.]) - fi - - HAVE_KEA=yes - KEA_LIB="`$KEA_CONFIG --libs --hdflibs`" - KEA_INC="`$KEA_CONFIG --cflags --hdfcflags`" - AC_MSG_RESULT([yes]) -fi - -AC_SUBST(HAVE_KEA,$HAVE_KEA) -AC_SUBST(KEA_INC,$KEA_INC) -AC_SUBST(KEA_LIB,$KEA_LIB) - -if test "$HAVE_KEA" != "no" ; then - OPT_GDAL_FORMATS="kea $OPT_GDAL_FORMATS" -fi - -dnl --------------------------------------------------------------------------- -dnl Check if netcdf library is available. -dnl --------------------------------------------------------------------------- - -NETCDF_SETTING= -NETCDF_MEM= -NETCDF_ROOT= -NETCDF_HAS_NC4= -NETCDF_HAS_HDF4= -NETCDF_NCCONFIG= - -AC_ARG_WITH([netcdf],[ --with-netcdf[=ARG] Include netCDF support (ARG=no or netCDF tree prefix)],,) - -if test "$with_netcdf" = "no" ; then - - NETCDF_SETTING=no - NETCDF_MEM=no - - echo "netCDF support disabled." - -else - - dnl find nc-config location - unset ac_cv_path_NETCDF_NCCONFIG - if test "$with_netcdf" = "yes" -o "$with_netcdf" = "" ; then - AC_PATH_PROG(NETCDF_NCCONFIG, nc-config, no) - else - tmp_path="$with_netcdf/bin$PATH_SEPARATOR$with_netcdf" - AC_PATH_PROG(NETCDF_NCCONFIG, nc-config, no, $tmp_path) - fi - - dnl test nc-config - if test "$NETCDF_NCCONFIG" = "no" ; then - echo " did not find nc-config, some features may be missing" - echo " use --with-netcdf=/path/to/netcdf or add nc-config to PATH" - NETCDF_NCCONFIG= - elif test "`$NETCDF_NCCONFIG --version`" = "" ; then - echo "did not get netCDF version from $NETCDF_NCCONFIG ... using fallback" - NETCDF_NCCONFIG= - fi - - dnl test linking using flags from nc-config - if test "$NETCDF_NCCONFIG" != "" ; then - - AC_MSG_CHECKING([libnetcdf compiler and linker flags with nc-config]) - NETCDF_VERSION=`$NETCDF_NCCONFIG --version` - NETCDF_PREFIX=`$NETCDF_NCCONFIG --prefix` - NETCDF_INCLUDEDIR=`$NETCDF_NCCONFIG --includedir` - NETCDF_LIBS=`$NETCDF_NCCONFIG --libs` - NETCDF_STATIC_LIBS=`$NETCDF_NCCONFIG --static --libs` - STRIP_SYSTEM_LIBRARY_PATHS("${NETCDF_LIBS}") - NETCDF_LIBS="$STRIPPED_LIBRARY_NAME" - echo "" - AC_MSG_RESULT([ got version="$NETCDF_VERSION", prefix="$NETCDF_PREFIX", - libs="$NETCDF_LIBS", includedir="$NETCDF_INCLUDEDIR"]) - - SAVED_LIBS="${LIBS}" - LIBS="$NETCDF_LIBS" - AC_CHECK_LIB([netcdf], [nc_open], [NETCDF_SETTING=yes], [NETCDF_SETTING=no],) - if test "$NETCDF_SETTING" = "no" ; then - unset ac_cv_lib_netcdf_nc_open - LIBS="$NETCDF_STATIC_LIBS" - AC_CHECK_LIB([netcdf], [nc_open], [NETCDF_SETTING=yes], [NETCDF_SETTING=no],) - fi - LIBS="${SAVED_LIBS}" - - if test "$NETCDF_SETTING" = "yes" ; then - EXTRA_INCLUDES="-I$NETCDF_INCLUDEDIR $EXTRA_INCLUDES" - NETCDF_ROOT=$NETCDF_PREFIX - LIBS="$NETCDF_LIBS $LIBS" - fi - -dnl previous behavior without nc-config - -dnl test linking using default settings -elif test "$with_netcdf" = "yes" -o "$with_netcdf" = "" ; then - - AC_CHECK_LIB([netcdf], [nc_open], [NETCDF_SETTING=yes], [NETCDF_SETTING=no],) - - if test "$NETCDF_SETTING" = "yes" ; then - - dnl Fedora has netcdf headers in /usr/include/netcdf - if test -d /usr/include/netcdf ; then - EXTRA_INCLUDES="-I/usr/include/netcdf $EXTRA_INCLUDES" - NETCDF_ROOT="/usr" - dnl RHEL 5 has netcdf headers in /usr/include/netcdf-3 - elif test -d /usr/include/netcdf-3 ; then - EXTRA_INCLUDES="-I/usr/include/netcdf-3 $EXTRA_INCLUDES" - NETCDF_ROOT="/usr" - dnl ubuntu and fedora have netcdf headers in /usr/include - elif test -f /usr/include/netcdf.h ; then - NETCDF_ROOT="/usr" - dnl try /usr/local - elif test -f /usr/local/include/netcdf.h ; then - NETCDF_ROOT="/usr/local" - dnl print warning if include cannot be found - else - echo "using pre-installed libnetcdf." - echo -n "libnetcdf is installed but its location cannot be found, " - echo "use --with-netcdf=/path_to_netcdf for proper support" - fi - NETCDF_INCLUDEDIR="$NETCDF_ROOT/include/" - - LIBS="-lnetcdf $LIBS" - if test "$NETCDF_ROOT" != "" ; then - echo "using pre-installed libnetcdf from "$NETCDF_ROOT - fi - - else - echo "libnetcdf not found ... netCDF support disabled" - fi - -dnl test linking using --with_netcdf dir -else - - AC_CHECK_LIB([netcdf], [nc_open], [NETCDF_SETTING=yes], [NETCDF_SETTING=no],-L$with_netcdf -L$with_netcdf/lib) - - if test "$NETCDF_SETTING" = "yes" ; then - - NETCDF_SETTING=yes - NETCDF_ROOT="$with_netcdf" - - if test -d $with_netcdf/lib ; then - LIBS="-L$with_netcdf/lib -lnetcdf $LIBS" - EXTRA_INCLUDES="-I$with_netcdf/include $EXTRA_INCLUDES" - else - LIBS="-L$with_netcdf -lnetcdf $LIBS" - EXTRA_INCLUDES="-I$with_netcdf $EXTRA_INCLUDES" - fi - NETCDF_INCLUDEDIR="$with_netcdf/include/" - - echo "using libnetcdf from $with_netcdf" - - else - echo "libnetcdf not found in "$with_netcdf" ... netCDF support disabled" - fi - -fi - -dnl test for NC4 and HDF4 support with nc-config - if test "$NETCDF_SETTING" = "yes" ; then - - if test "$NETCDF_NCCONFIG" != "" ; then - - AC_MSG_CHECKING([for netcdf-4 (and HDF5) support in libnetcdf]) - if test "x$($NETCDF_NCCONFIG --has-nc4)" = "xyes"; then : - AC_MSG_RESULT([yes]) - NETCDF_HAS_NC4=yes - else - AC_MSG_RESULT([no]) - NETCDF_HAS_NC4=no - fi - - AC_MSG_CHECKING([for HDF4 support in libnetcdf]) - if test "x$($NETCDF_NCCONFIG --has-hdf4)" = "xyes"; then : - AC_MSG_RESULT([yes]) - NETCDF_HAS_HDF4=yes - else - AC_MSG_RESULT([no]) - NETCDF_HAS_HDF4=no - fi - - else - NETCDF_HAS_NC4=no - NETCDF_HAS_HDF4=no - fi -fi - -fi - -dnl export results - -AC_SUBST([NETCDF_SETTING], [$NETCDF_SETTING]) - -if test "$NETCDF_SETTING" != "no" ; then - - NETCDF_MEM=no - if test -f "$NETCDF_INCLUDEDIR/netcdf_mem.h"; then - NETCDF_MEM=yes; - fi - - AC_SUBST([NETCDF_MEM], [$NETCDF_MEM]) - AC_SUBST([NETCDF_ROOT], [$NETCDF_ROOT]) - AC_SUBST([NETCDF_HAS_NC4], [$NETCDF_HAS_NC4]) - AC_SUBST([NETCDF_HAS_HDF4], [$NETCDF_HAS_HDF4]) - - OPT_GDAL_FORMATS="netcdf $OPT_GDAL_FORMATS" - -fi - -dnl --------------------------------------------------------------------------- -dnl Select a OpenJPEG Library to use, or disable driver. -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(openjpeg,[ --with-openjpeg Include JPEG-2000 support via OpenJPEG 2.x library],,) - -HAVE_OPENJPEG=no - -if test "$with_openjpeg" = "no" ; then - - AC_MSG_NOTICE([OpenJPEG (JPEG2000) support disabled.]) - -else - - PKG_PROG_PKG_CONFIG([0.21]) - PKG_CHECK_MODULES([OPENJPEG], [libopenjp2 >= 2.1.0], - [OPENJPEG_VERSION=`$PKG_CONFIG --modversion libopenjp2`], - [OPENJPEG_VERSION=;]) - - if test -n "$OPENJPEG_CFLAGS"; then - - # Test that the package found is for the right architecture - saved_LIBS="$LIBS" - LIBS="$OPENJPEG_LIBS" - AC_CHECK_LIB(openjp2,opj_setup_decoder, [HAVE_OPENJPEG=yes], [HAVE_OPENJPEG=no]) - LIBS="$saved_LIBS" - - if test "$HAVE_OPENJPEG" = "yes"; then - EXTRA_INCLUDES="$OPENJPEG_CFLAGS $EXTRA_INCLUDES" - LIBS="$OPENJPEG_LIBS $LIBS" - fi - fi -fi - -if test "$HAVE_OPENJPEG" != "no" ; then - OPT_GDAL_FORMATS="openjpeg $OPT_GDAL_FORMATS" -fi - -dnl --------------------------------------------------------------------------- -dnl Select a FGDB API to use, or disable driver. -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(fgdb,[ --with-fgdb[=ARG] Include ESRI File Geodatabase support (ARG=FGDP API Path, yes or no)],,) - -FGDB_ENABLED=no -FGDB_LIB= - -if test "$with_fgdb" = "no" ; then - - echo "FGDB support disabled." - -elif test "$with_fgdb" = "yes" -o "$with_fgdb" = "" ; then - - AC_MSG_CHECKING([for FileGDBAPI]) - - rm -f testfgdb.* - rm -f testfgdb - echo "#include " > testfgdb.cpp - echo "using namespace FileGDBAPI;" >> testfgdb.cpp - echo "int main() { Geodatabase oDB; std::wstring osStr; ::OpenGeodatabase(osStr, oDB); return 0; }" >> testfgdb.cpp - if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} testfgdb.cpp -lFileGDBAPI -lfgdbunixrtl -o testfgdb 2>&1`" ; then - AC_MSG_RESULT([FileGDBAPI found]) - FGDB_ENABLED="yes" - FGDB_LIB="-lFileGDBAPI -lfgdbunixrtl" - else - if test "$with_fgdb" = "yes"; then - AC_MSG_ERROR([FileGDBAPI not found.]) - else - AC_MSG_RESULT([FileGDBAPI not found.]) - fi - fi - rm -f testfgdb.* - rm -f testfgdb - -else - - AC_MSG_CHECKING([for libFileGDBAPI.so in in $with_fgdb/lib]) - FGDB_ENABLED=yes - if test -r $with_fgdb/lib/libFileGDBAPI.so -a -r $with_fgdb/lib/libfgdbunixrtl.so ; then - AC_MSG_RESULT([found.]) - FGDB_LIB="-L$with_fgdb/lib -lFileGDBAPI -lfgdbunixrtl" - elif test -r $with_fgdb/lib/libFileGDBAPI.dylib -a -r $with_fgdb/lib/libfgdbunixrtl.dylib ; then - AC_MSG_RESULT([found.]) - FGDB_LIB="-L$with_fgdb/lib -lFileGDBAPI -lfgdbunixrtl" - else - AC_MSG_ERROR([not found.]) - fi - - AC_MSG_CHECKING([for FileGDBAPI.h in $with_fgdb/include]) - if test -r $with_fgdb/include/FileGDBAPI.h ; then - AC_MSG_RESULT([found.]) - FGDB_INC="-I$with_fgdb/include" - else - AC_MSG_ERROR([not found.]) - fi - -fi - -if test "$FGDB_LIB" != ""; then - dnl pj_datums is not a function but an object, but for linking that doesn't matter. - AC_CHECK_LIB(FileGDBAPI,pj_datums,FGDB_HAS_PROJ4=yes,FGDB_HAS_PROJ4=no,$FGDB_LIB) -fi - -AC_SUBST(FGDB_ENABLED, $FGDB_ENABLED) -AC_SUBST(FGDB_LIB, $FGDB_LIB) -AC_SUBST(FGDB_INC, $FGDB_INC) - -dnl --------------------------------------------------------------------------- -dnl Select a ECW Library to use, or disable driver. -dnl --------------------------------------------------------------------------- -ECW_FLAGS= -ECW_LIBS= -ECW_INCLUDE= -ECW_54= - -AC_ARG_WITH(ecw,[ --with-ecw[=ARG] Include ECW support (ARG=ECW SDK Path, yes or no)],,) - -if test ! -z "`uname | grep Darwin`" ; then - CARBON_FRAMEWORK="-framework Carbon" -else - CARBON_FRAMEWORK= -fi - -if test "$with_ecw" = "no" ; then - - ECW_SETTING=no - - echo "ECW support disabled." - -elif test "$with_ecw" = "yes" -o "$with_ecw" = "" ; then - - AC_CHECK_LIB(NCSEcw,NCScbmOpenFileView,ECW_SETTING=yes,ECW_SETTING=no,-lNCSCnet -lNCSUtil) - - if test "$ECW_SETTING" = "yes" ; then - ECW_LIBS="-lNCSEcw -lNCSEcwC -lNCSCnet -lNCSUtil" - fi - - if test "$ECW_SETTING" = "no" ; then - AC_CHECK_LIB(ecwj2,NCScbmOpenFileView,ECW_SETTING=yes,ECW_SETTING=no,$CARBON_FRAMEWORK) - if test "$ECW_SETTING" = "yes" ; then - ECW_LIBS="-lecwj2 $CARBON_FRAMEWORK" - fi - fi -else - - AC_MSG_CHECKING([for libNCSEcw.a or libecwj2]) - ECW_ARCH=x86 - ECW_CONF="release" - ECW_FLAGS="-DLINUX -DX86 -DPOSIX -DHAVE_COMPRESS -DECW_COMPRESS_RW_SDK_VERSION" - ECW_FRAMEWORK_COCOA="" - if test "`arch`" = "x86_64" ; then - ECW_ARCH="x64" - fi - if test ! -z "`uname | grep Darwin`" ; then - ECW_ARCH="" - ECW_CONF="" - ECW_FLAGS="" - ECW_FRAMEWORK_COCOA=" -framework Cocoa " - fi - - ECW_SETTING=yes - if test -r $with_ecw/lib/libNCSCnet.so -o -r $with_ecw/lib/libNCSCnet.dylib ; then - ECW_LIBS="-L$with_ecw/lib -lNCSEcw -lNCSEcwC -lNCSCnet -lNCSUtil" - AC_MSG_RESULT([found in $with_ecw/lib.]) - elif test -r $with_ecw/lib/libNCSCNet.so -o -r $with_ecw/lib/libNCSCNet.dylib ; then - ECW_LIBS="-L$with_ecw/lib -lNCSEcw -lNCSEcwC -lNCSCNet -lNCSUtil" - AC_MSG_RESULT([found in $with_ecw/lib.]) - elif test -r $with_ecw/bin/libNCSEcw.so -o -r $with_ecw/bin/libNCSEcw.dylib ; then - ECW_LIBS="-L$with_ecw/bin -lNCSEcw -lNCSEcwC -lNCSCnet -lNCSUtil" - AC_MSG_RESULT([found in $with_ecw/bin.]) - elif test -r $with_ecw/lib/libecwj2.dylib ; then - ECW_LIBS="-L$with_ecw/lib -lecwj2 $CARBON_FRAMEWORK" - AC_MSG_RESULT([found libecwj2 in $with_ecw/lib.]) - - # ECW SDK 5.0 style and also for the case where license type is included in path i.e. specific license type is requested. - elif test -r $with_ecw/lib/$ECW_ARCH/$ECW_CONF/libNCSEcw.a ; then - # Test if we must use the newabi/cpp11abi version (SDK 5.4+) - if test -r $with_ecw/lib/newabi/$ECW_ARCH/$ECW_CONF/libNCSEcw.a || test -r $with_ecw/lib/cpp11abi/$ECW_ARCH/$ECW_CONF/libNCSEcw.a; then - if test -d $with_ecw/lib/newabi; then - ECW_ABIDIR=newabi - else - ECW_ABIDIR=cpp11abi - fi - echo "#include " > testnewabi.cpp - echo "namespace NCS { class CString { public: static std::wstring Utf8Decode (const std::string &sUtf8); }; }" >> testnewabi.cpp - echo "int main() { return static_cast(NCS::CString::Utf8Decode(std::string()).size()); }" >> testnewabi.cpp - if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} testnewabi.cpp -L$with_ecw/lib/$ECW_ABIDIR/$ECW_ARCH/$ECW_CONF -lNCSEcw -o testnewabi 2>&1`" ; then - ECW_LIBDIR=$with_ecw/lib/$ECW_ABIDIR/$ECW_ARCH/$ECW_CONF - ECW_LIBS="-L$ECW_LIBDIR -lNCSEcw $ECW_FRAMEWORK_COCOA" - with_ecw=$with_ecw/$ecw_license_type - ECW_54="yes" - AC_MSG_RESULT([found Intergraph 5.4+ SDK with ${ECW_ABIDIR} in ${ECW_LIBDIR}.]) - rm -f testnewabi.* - rm -f testnewabi - break - fi - rm -f testnewabi.* - rm -f testnewabi - fi - if test "$ECW_LIBS" = ""; then - ECW_LIBDIR=$with_ecw/lib/$ECW_ARCH/$ECW_CONF - ECW_LIBS="-L$ECW_LIBDIR -lNCSEcw $ECW_FRAMEWORK_COCOA" - AC_MSG_RESULT([found Intergraph 5.x+ SDK in ${ECW_LIBDIR}.]) - fi - # ECWJP2 SDK 5.1 style - elif test -d $with_ecw; then - for ecw_license_type in "Desktop_Read-Write" "Server_Read-Only_EndUser" "Server_Read-Only" "Server_Read-Write" "Desktop_Read-Only" - do - # Test if we must use the newabi/cpp11abi version (SDK 5.4+) - if test -r $with_ecw/$ecw_license_type/lib/newabi/$ECW_ARCH/$ECW_CONF/libNCSEcw.a || test -r $with_ecw/$ecw_license_type/lib/cpp11abi/$ECW_ARCH/$ECW_CONF/libNCSEcw.a; then - if test -d $with_ecw/lib/newabi; then - ECW_ABIDIR=newabi - else - ECW_ABIDIR=cpp11abi - fi - echo "#include " > testnewabi.cpp - echo "namespace NCS { class CString { public: static std::wstring Utf8Decode (const std::string &sUtf8); }; }" >> testnewabi.cpp - echo "int main() { return static_cast(NCS::CString::Utf8Decode(std::string()).size()); }" >> testnewabi.cpp - if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} testnewabi.cpp -L$with_ecw/$ecw_license_type/lib/$ECW_ABIDIR/$ECW_ARCH/$ECW_CONF -lNCSEcw -o testnewabi 2>&1`" ; then - ECW_LIBDIR=$with_ecw/$ecw_license_type/lib/$ECW_ABIDIR/$ECW_ARCH/$ECW_CONF - ECW_LIBS="-L$ECW_LIBDIR -lNCSEcw $ECW_FRAMEWORK_COCOA" - with_ecw=$with_ecw/$ecw_license_type - AC_MSG_RESULT([found Intergraph 5.4+ SDK with ${ECW_ABIDIR} in ${ECW_LIBDIR}.]) - ECW_54="yes" - rm -f testnewabi.* - rm -f testnewabi - break - fi - rm -f testnewabi.* - rm -f testnewabi - fi - if test "$ECW_LIBS" = ""; then - ECW_LIBDIR=$with_ecw/$ecw_license_type/lib/$ECW_ARCH/$ECW_CONF - if test -r $ECW_LIBDIR/libNCSEcw.a; then - ECW_LIBS="-L$ECW_LIBDIR -lNCSEcw $ECW_FRAMEWORK_COCOA" - with_ecw=$with_ecw/$ecw_license_type - AC_MSG_RESULT([found Intergraph 5.x+ SDK in ${ECW_LIBDIR}.]) - break - fi - fi - done - else - AC_MSG_ERROR([not found in $with_ecw.]) - fi - - AC_MSG_CHECKING([for NCSECWClient.h in $with_ecw/include]) - if test -r $with_ecw/include/NCSECWClient.h ; then - AC_MSG_RESULT([found.]) - ECW_INCLUDE="-I$with_ecw/include" - else - AC_MSG_ERROR([not found.]) - fi - AC_MSG_CHECKING([for ECWJP2BuildNumber.h in $with_ecw/include]) - if test -r $with_ecw/include/ECWJP2BuildNumber.h ; then - AC_MSG_RESULT([found.]) - ECW_FLAGS="-DHAVE_ECW_BUILDNUMBER_H $ECW_FLAGS" - else - AC_MSG_RESULT([not found.]) - fi -fi - -AC_SUBST(ECW_SETTING,$ECW_SETTING) -AC_SUBST(ECW_LIBS,$ECW_LIBS) -AC_SUBST(ECW_FLAGS,$ECW_FLAGS) -AC_SUBST(ECW_INCLUDE,$ECW_INCLUDE) - -if test "$ECW_SETTING" != "no" ; then - OPT_GDAL_FORMATS="ecw $OPT_GDAL_FORMATS" -fi - -dnl --------------------------------------------------------------------------- -dnl Select Kakadu library or disable driver. -dnl --------------------------------------------------------------------------- - -AC_MSG_CHECKING([for Kakadu JPEG2000 support]) - -AC_ARG_WITH(kakadu,[ --with-kakadu[=ARG] Include Kakadu/JPEG2000 support],,) - -if test "$with_kakadu" = "no" -o "$with_kakadu" = "" ; then - KAKDIR= - AC_MSG_RESULT([not requested.]) - HAVE_KAKADU=no -elif test "$with_kakadu" = "yes" ; then - AC_MSG_ERROR([ -For JPEG2000 support using Kakadu you need provide the path to the Kakadu -build directory. Note that Kakadu is *not* free software.]) -else - KAKDIR=$with_kakadu - OPT_GDAL_FORMATS="jp2kak jpipkak $OPT_GDAL_FORMATS" - LIBS="$LIBS -L$with_kakadu/lib -lkdu" - AC_MSG_RESULT([requested.]) - HAVE_KAKADU=yes -fi - -AC_SUBST(KAKDIR,$KAKDIR) - -dnl --------------------------------------------------------------------------- -dnl Select MrSID library or disable driver. -dnl --------------------------------------------------------------------------- -MRSID_FLAGS= -HAVE_MRSID=no - -AC_ARG_WITH(mrsid,[ --with-mrsid[=ARG] Include MrSID support (ARG=path to MrSID DSDK or no)],,) - -AC_ARG_WITH(jp2mrsid,[ --with-jp2mrsid[=ARG] Enable MrSID JPEG2000 support (ARG=yes/no)],,) - -if test "x$with_mrsid" = "xno" -o "x$with_mrsid" = "x" ; then - - HAVE_MRSID=no - - AC_MSG_NOTICE([MrSID support disabled.]) - -else - - MRSID_BASE="$with_mrsid/include" - - AC_MSG_CHECKING([for lt_base.h in $MRSID_BASE/support]) - if test -r "$MRSID_BASE/support/lt_base.h" ; then - - AC_MSG_RESULT([found MrSID DSDK version 4.x or newer.]) - HAVE_MRSID=yes - MRSID_INCLUDE="-I$MRSID_BASE/base -I$MRSID_BASE/metadata -I$MRSID_BASE/mrsid_readers -I$MRSID_BASE/j2k_readers -I$MRSID_BASE/support" - - else - - AC_MSG_RESULT([not found.]) - - AC_MSG_CHECKING([for lt_base.h in $MRSID_BASE]) - if test -r "$MRSID_BASE/lt_base.h" ; then - - AC_MSG_RESULT([found MrSID DSDK version 7.x or newer.]); - HAVE_MRSID=yes - MRSID_INCLUDE="-I$MRSID_BASE" - - fi - - fi - - if test $HAVE_MRSID = yes ; then - - MRSID_LIBS="-lpthread" - - if test -r "$with_mrsid/lib/libltiesdk.a" ; then # v8+ esdk contains dsdk - _LIBPART=lib - MRSID_LIBS="-lltiesdk $MRSID_LIBS" - elif test -e "$with_mrsid/lib/libltidsdk.a" \ - -o -e "$with_mrsid/lib/libltidsdk.so" \ - -o -e "$with_mrsid/lib/libltidsdk.dylib" ; then - _LIBPART=lib - MRSID_LIBS="-lltidsdk $MRSID_LIBS" - else - _LIBPART=lib/Release - MRSID_LIBS="-lltidsdk $MRSID_LIBS" - fi - - AC_MSG_CHECKING([for MG3ImageWriter.h in $with_mrsid/include/mrsid_writers]) - if test -r "$with_mrsid/include/mrsid_writers/MG3ImageWriter.h" ; then - AC_MSG_RESULT([found MrSID ESDK version 4.x or newer.]) - MRSID_FLAGS="-DMRSID_ESDK $MRSID_FLAGS" - MRSID_INCLUDE="-I$with_mrsid/include/mrsid_writers -I$with_mrsid/include/j2k_writers $MRSID_INCLUDE" - if test -r $with_mrsid/3rd-party/lib/Release/libcryptopp.a ; then - MRSID_LIBS="-lltiesdk -lcryptopp -lxmlparse $MRSID_LIBS" - else - MRSID_LIBS="-lltiesdk -lxmlparse $MRSID_LIBS" - fi - else - AC_MSG_RESULT([no encoding support.]) - fi - - AC_MSG_CHECKING([for MrSID JPEG2000 support]) - if test "x$with_jp2mrsid" = "xyes" -a "$HAVE_KAKADU" = "yes" ; then - # SDK v8 or later don't seem to conflict with Kakadu - major_version=`cat $with_mrsid/include/lti_version.h | grep MAJOR | sed 's/#define LTI_SDK_MAJOR[ ]*\(.*\)/\1/'` - if test "x$major_version" != "x"; then - if test "$major_version" -ge 8; then - V8_OR_LATER=yes - fi - fi - if test "x$V8_OR_LATER" = "x"; then - AC_MSG_ERROR([MrSID JPEG2000 support requested, but this is incompatible with use of standalone Kakadu]) - fi - fi - - MRSID_KAKADU_LIB="" - if test "$HAVE_KAKADU" = "no" ; then - if test x"$with_jp2mrsid" = x"" -o x"$with_jp2mrsid" = x"yes" ; then - if test -r "$with_mrsid/3rd-party/$_LIBPART/libltikdu.a" ; then - with_jp2mrsid=yes - MRSID_KAKADU_LIB=-lltikdu - elif test -r "$with_mrsid/3rd-party/$_LIBPART/liblt_kakadu.a" ; then - with_jp2mrsid=yes - MRSID_KAKADU_LIB=-llt_kakadu - elif test -e "$with_mrsid/lib/libltidsdk.so" \ - -o -e "$with_mrsid/lib/libltidsdk.dylib"; then # v8+ .so has kdu - with_jp2mrsid=yes - elif test x"$with_jp2mrsid" = x"yes" ; then - AC_MSG_ERROR([MrSID JPEG2000 support requested, but libltikdu.a not found.]) - else - with_jp2mrsid=no - fi - fi - fi - - if test "x$with_jp2mrsid" = "xyes" ; then - MRSID_LIBS="$MRSID_LIBS $MRSID_KAKADU_LIB" - MRSID_FLAGS="-DMRSID_J2K $MRSID_FLAGS" - AC_MSG_RESULT([enabled]) - else - AC_MSG_RESULT([disabled]) - fi - - MRSID_LIBS="-L$with_mrsid/$_LIBPART $MRSID_LIBS" - MRSID_LIBS="-L$with_mrsid/3rd-party/$_LIBPART $MRSID_LIBS" - - else - HAVE_MRSID=no - AC_MSG_RESULT([not found.]) - AC_MSG_ERROR([ MrSID requested, but components not found.]) - fi -fi - -AC_SUBST(MRSID_INCLUDE,$MRSID_INCLUDE) -AC_SUBST(MRSID_FLAGS,$MRSID_FLAGS) -AC_SUBST(MRSID_LIBS,$MRSID_LIBS) - -if test "$HAVE_MRSID" != "no" ; then - CPPFLAGS="-D_REENTRANT $CPPFLAGS" - OPT_GDAL_FORMATS="mrsid $OPT_GDAL_FORMATS" -fi - -dnl --------------------------------------------------------------------------- -dnl Check if LuraTech library is available. -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(jp2lura,[ --with-j2lura[=ARG] Include JP2Lua support (ARG=no, lura SDK install path)],,) - -AC_MSG_CHECKING([for JP2Lura support]) - -HAVE_JP2LURA=no -JP2LURA_INCLUDE= - -if test "$with_jp2lura" != "" -a "$with_jp2lura" != "no" ; then - AC_MSG_CHECKING([for lwf_jp2.h]) - if test -f "$with_jp2lura/include/lwf_jp2.h"; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - AC_MSG_ERROR([JP2Lura support requested but header not found]) - fi - JP2LURA_INCLUDE="-I$with_jp2lura/include" - - # mingw support - if test -f "$with_jp2lura/library/lwf_jp2.lib"; then - ln -s "$with_jp2lura/library/lwf_jp2.lib" "$with_jp2lura/library/lib_lwf_jp2.a" - fi - - ORIG_LIBS="$LIBS" - LIBS="-L$with_jp2lura/library" - - AC_CHECK_LIB(_lwf_jp2,JP2_Decompress_SetLicense,HAVE_JP2LURA="yes",,-lm) - - if test "$HAVE_JP2LURA" = "no" ; then - AC_MSG_ERROR([JP2Lura support requested but library not found]) - fi - - LIBS="-L$with_jp2lura/library -l_lwf_jp2 -lm $ORIG_LIBS" -fi - -AC_SUBST([JP2LURA_INCLUDE], [$JP2LURA_INCLUDE]) - -if test "$HAVE_JP2LURA" != "no" ; then - OPT_GDAL_FORMATS="jp2lura $OPT_GDAL_FORMATS" -fi - -dnl --------------------------------------------------------------------------- -dnl Enable MSG format if EUMETSAT Wavelet Transform Software -dnl available in the local tree -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH([msg], - AS_HELP_STRING([--with-msg[=ARG]], - [Enable MSG driver (ARG=yes or no)]),,) - -HAVE_MSG=no -HAVE_EUMETSATWT=no - -if test "x$with_msg" = "xyes" ; then - AC_MSG_CHECKING([for EUMETSAT Wavelet Transformation Software]) - - if test -d "frmts/msg/PublicDecompWT" -a \ - -f "frmts/msg/PublicDecompWT/COMP/Inc/CImage.h"; then - HAVE_EUMETSATWT=yes - else - HAVE_EUMETSATWT=no - fi - AC_MSG_RESULT([$HAVE_EUMETSATWT]) -fi - -AC_MSG_CHECKING([for MSG]) - -if test "x$with_msg" = "xyes" -o "x$with_msg" = "x" \ - -a "x$HAVE_EUMETSATWT" = "xyes"; then - OPT_GDAL_FORMATS="msg $OPT_GDAL_FORMATS" - HAVE_MSG=yes - AC_MSG_RESULT([enabled]) -else - HAVE_MSG=no - AC_MSG_RESULT([not requested]) -fi - - -dnl --------------------------------------------------------------------------- -dnl Check for GeoRaster in the local tree. -dnl --------------------------------------------------------------------------- - -ORACLE_OCI_REQ_VERSION="10.0.1" -AX_LIB_ORACLE_OCI($ORACLE_OCI_REQ_VERSION) - -if test "$HAVE_ORACLE_OCI" = "yes"; then - OPT_GDAL_FORMATS="georaster $OPT_GDAL_FORMATS" - HAVE_GEORASTER=yes -else - HAVE_GEORASTER=no -fi - - -dnl --------------------------------------------------------------------------- - -AC_SUBST([OPT_GDAL_FORMATS], [$OPT_GDAL_FORMATS]) - -dnl --------------------------------------------------------------------------- - -GNM_ENABLED=yes - -AC_ARG_WITH(gnm,[ --with-gnm Build GNM into shared library],,) - -if test "$with_gnm" = "no" ; then - GNM_ENABLED=no - AC_MSG_RESULT([disabled by user]) -else - GNM_ENABLED=yes - AC_MSG_RESULT([enabled]) -fi -AC_SUBST(GNM_ENABLED,$GNM_ENABLED) - -dnl --------------------------------------------------------------------------- -dnl Select an MySQL Library to use, or disable driver. -dnl --------------------------------------------------------------------------- - -MYSQL_CONFIG=no - -AC_ARG_WITH(mysql,[ --with-mysql[=ARG] Include MySQL (ARG=path to mysql_config) [[default=no]]],,) - -if test "$with_mysql" = "yes" ; then - AC_PATH_PROG(MYSQL_CONFIG, mysql_config, no) -else - if test "x$with_mysql" != "x" ; then - MYSQL_CONFIG=$with_mysql - fi -fi - -AC_MSG_CHECKING([for MySQL]) - -if test "$MYSQL_CONFIG" = "no" ; then - - HAVE_MYSQL=no - MYSQL_LIB= - MYSQL_INC= - - AC_MSG_RESULT([no]) - -else - if test -d $MYSQL_CONFIG ; then - AC_MSG_RESULT([no]) - AC_MSG_ERROR([--with-mysql argument is a directory. It should be the path to the mysql_config script, often somewhere like /usr/local/bin/mysql_config.]) - fi - - if test \! -x $MYSQL_CONFIG ; then - AC_MSG_RESULT([no]) - AC_MSG_ERROR([--with-mysql argument is a not an executable file. It should be the path to the mysql_config script, often somewhere like /usr/local/bin/mysql_config.]) - fi - - MYSQL_VERSION="`$MYSQL_CONFIG --version`" - MYSQL_MAJOR_VERSION=${MYSQL_VERSION%%'.'*} - - if test $MYSQL_MAJOR_VERSION -le 3 ; then - HAVE_MYSQL=no - AC_MSG_RESULT([no, mysql is pre-4.x]) - else - HAVE_MYSQL=yes - MYSQL_LIB="`$MYSQL_CONFIG --libs`" - STRIP_SYSTEM_LIBRARY_PATHS("${MYSQL_LIB}") - MYSQL_LIB="$STRIPPED_LIBRARY_NAME" - MYSQL_INC="`$MYSQL_CONFIG --include`" - AC_MSG_RESULT([yes]) - fi -fi - -AC_SUBST(HAVE_MYSQL,$HAVE_MYSQL) -AC_SUBST(MYSQL_INC,$MYSQL_INC) -AC_SUBST(MYSQL_LIB,$MYSQL_LIB) - -dnl --------------------------------------------------------------------------- -dnl Check for Xerces C++ Parser support. -dnl --------------------------------------------------------------------------- - -XERCES_REQ_VERSION="3.1.0" -AX_LIB_XERCES($XERCES_REQ_VERSION) - -if test "$HAVE_XERCES" = "yes"; then - LIBS="$XERCES_LDFLAGS $LIBS" - -m4_foreach_w([frmt],XERCES_DRIVERS,[ - driver_enabled=m4_join([_],[$INTERNAL_FORMAT],frmt,[ENABLED]) - if test "x$driver_enabled" = "xyes"; then - OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED frmt" - OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS _OGRDEFINE(frmt)" - fi -]) - -fi - -AC_SUBST([HAVE_XERCES], $HAVE_XERCES) -AC_SUBST([XERCES_INCLUDE], $XERCES_CFLAGS) - -dnl --------------------------------------------------------------------------- -dnl Check for Expat configuration. -dnl --------------------------------------------------------------------------- - -dnl Expat 1.95.0 released in 2000-09-28 -EXPAT_REQ_VERSION="1.95.0" -AX_LIB_EXPAT($EXPAT_REQ_VERSION) - -if test "$HAVE_EXPAT" = "yes"; then - LIBS="$EXPAT_LDFLAGS $LIBS" - -m4_foreach_w([frmt],EXPAT_DRIVERS,[ - driver_enabled=m4_join([_],[$INTERNAL_FORMAT],frmt,[ENABLED]) - if test "x$driver_enabled" = "xyes"; then - OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED frmt" - OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS _OGRDEFINE(frmt)" - fi -]) - -fi - -AC_SUBST([HAVE_EXPAT], $HAVE_EXPAT) -AC_SUBST([EXPAT_INCLUDE], $EXPAT_CFLAGS) - -dnl --------------------------------------------------------------------------- -dnl Check for Google libkml support. -dnl --------------------------------------------------------------------------- - -LIBKML_REQ_VERSION="1.3.0" -AX_LIB_LIBKML($LIBKML_REQ_VERSION) - -if test "$HAVE_LIBKML" = "yes"; then - LIBS="$LIBKML_LDFLAGS $LIBS" -fi - -AC_SUBST([HAVE_LIBKML], $HAVE_LIBKML) -AC_SUBST([LIBKML_INCLUDE], $LIBKML_CFLAGS) - -dnl --------------------------------------------------------------------------- -dnl Check for ODBC support. -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(odbc,[ --with-odbc[=ARG] Include ODBC support (ARG=no or path)],,) - -if test "$with_odbc" = "no" ; then - - ODBC_SETTING=no - - echo "ODBC support disabled." - -elif test "$with_odbc" = "yes" -o "$with_odbc" = "" ; then - ODBC_SETTING=no - - echo "check for unixODBC" - AC_CHECK_LIB(odbc,SQLConnect,[ODBC_LIBS="-lodbc -lodbcinst"]) - AC_CHECK_LIB(odbcinst,SQLInstallDriverEx,ODBC_SETTING=yes) - - if test "$ODBC_SETTING" = "no" ; then - echo "check for windows ODBC" - AC_CHECK_LIB(odbc32,main,[ODBC_LIBS="-lodbc32 -lodbccp32"]) - AC_CHECK_LIB(odbccp32,SQLInstallDriverEx,ODBC_SETTING=yes) - fi - - if test "$ODBC_SETTING" = "yes" ; then - AC_CHECK_HEADERS(sql.h,,[ODBC_SETTING=no], -[#ifdef _WIN32 -# include -#endif -]) - if test "$ODBC_SETTING" = "no" ; then - if test -f /usr/local/include/sql.h ; then - ODBC_SETTING=yes - echo "using sql.h from /usr/local/include" - elif test -f /usr/include/sql.h ; then - ODBC_SETTING=yes - echo "using sql.h from /usr/include" - else - echo "sql.h not found" - fi - fi - fi - - if test "$ODBC_SETTING" = "yes" ; then - LIBS="$ODBC_LIBS $LIBS" - fi - -else - - ODBC_SETTING=yes - ODBC_LIBS="" - AC_CHECK_LIB(odbc,SQLConnect,ODBC_LIBS="-lodbc -lodbcinst") - AC_CHECK_LIB(odbc32,main,ODBC_LIBS="-lodbc32 -lodbccp32") - if test "$ODBC_LIBS" = ""; then - AC_MSG_ERROR([Cannot find ODBC libs]) - fi - LIBS="-L$with_odbc -L$with_odbc/lib $ODBC_LIBS $LIBS" - EXTRA_INCLUDES="-I$with_odbc -I$with_odbc/include $EXTRA_INCLUDES" - - echo "using odbc library from $with_odbc." -fi - -if test "$ODBC_SETTING" = "yes" ; then -m4_foreach_w([frmt],ODBC_DRIVERS,[ - driver_enabled=m4_join([_],[$INTERNAL_FORMAT],frmt,[ENABLED]) - if test "x$driver_enabled" = "xyes"; then - OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED frmt" - OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS _OGRDEFINE(frmt)" - fi -]) -fi - -AC_SUBST(ODBC_SETTING,$ODBC_SETTING) - -dnl --------------------------------------------------------------------------- -dnl Check for SAP HANA support. -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(hana, AS_HELP_STRING([--with-hana[=ARG]] Include SAP HANA (ARG=no(default), yes or path to odbc-cpp-wrapper)),,) - -AC_MSG_CHECKING([for SAP HANA]) - -if test "x$with_hana" = "xno" -o "x$with_hana" = "x" ; then - HAVE_HANA=no - ODBCCPP_LIB= - ODBCCPP_INC= - AC_MSG_RESULT([no]) -else - if test "$ODBC_SETTING" = "no" ; then - AC_MSG_ERROR([SAP HANA driver requires odbc driver to be installed.]) - fi - - if test "$with_hana" = "yes" ; then - ODBCCPP_PATH=/usr/local - else - ODBCCPP_PATH=$with_hana - fi - - if test -d ${ODBCCPP_PATH} ; then - AC_LANG_PUSH(C++) - LIBS="-lodbccpp $LIBS" - AC_CHECK_HEADER(odbc/PreparedStatement.h) - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [#include ], - [ - odbc::EnvironmentRef env = odbc::Environment::create(); - ] - )], - [HAVE_HANA="yes"], - [AC_MSG_WARN([Cannot find odbccpp.])]) - AC_LANG_POP(C++) - - if test "${HAVE_HANA}" = "yes" ; then - ODBCCPP_LIB=-L"$ODBCCPP_PATH/lib" - ODBCCPP_INC=-I"$ODBCCPP_PATH/include" - AC_MSG_RESULT([yes]) - else - AC_MSG_ERROR([--with-hana argument points to a directory which does not contain the odbc-cpp-wrapper library.]) - fi - else - AC_MSG_RESULT([no]) - AC_MSG_ERROR([--with-hana argument is not a directory. It should be the path to the odbc-cpp-wrapper library, often somewhere like /usr/local.]) - fi -fi - -AC_SUBST(HAVE_HANA,$HAVE_HANA) -AC_SUBST(ODBCCPP_INC,$ODBCCPP_INC) -AC_SUBST(ODBCCPP_LIB,$ODBCCPP_LIB) - -dnl --------------------------------------------------------------------------- -dnl Check for OCI support. -dnl --------------------------------------------------------------------------- - -ORACLE_OCI_REQ_VERSION="8.1.7" -AX_LIB_ORACLE_OCI($ORACLE_OCI_REQ_VERSION) - -if test "$HAVE_ORACLE_OCI" = "yes"; then - OCI_INCLUDE="$ORACLE_OCI_CFLAGS" - LIBS="$ORACLE_OCI_LDFLAGS $LIBS" -fi - -AC_SUBST([HAVE_OCI], [$HAVE_ORACLE_OCI]) -AC_SUBST([OCI_INCLUDE], $[OCI_INCLUDE]) - -dnl --------------------------------------------------------------------------- -dnl Check for libxml2. -dnl --------------------------------------------------------------------------- - -HAVE_LIBXML2=no -LIBXML2_INC= -LIBXML2_LIB= - -AC_ARG_WITH(xml2, - [ --with-xml2[=ARG] Include libxml2 (ARG=yes/no)],,,) - -if test "x$with_xml2" = "xyes" -o "x$with_xml2" = "x" ; then - - PKG_PROG_PKG_CONFIG([0.21]) - PKG_CHECK_MODULES(LIBXML2,[libxml-2.0], [HAVE_LIBXML2=yes], [HAVE_LIBXML2=no]) - - if test "${HAVE_LIBXML2}" = "yes"; then - SAVED_LIBS="${LIBS}" - LIBS="${LIBXML2_LIBS}" - AC_CHECK_LIB(xml2,xmlParseDoc,HAVE_LIBXML2=yes,HAVE_LIBXML2=no) - LIBS="${SAVED_LIBS}" - fi - - if test "${HAVE_LIBXML2}" = "yes"; then - LIBXML2_INC="${LIBXML2_CFLAGS}" - LIBXML2_LIB="${LIBXML2_LIBS}" - else - if test "x$with_xml2" = "xyes"; then - AC_MSG_ERROR([--with-xml2 was requested, but libxml2 is not available]) - fi - fi -elif test "x$with_xml2" != "xno"; then - AC_MSG_ERROR([Only --with-xml2=yes/no supported]) -fi - -AC_SUBST(HAVE_LIBXML2,$HAVE_LIBXML2) -AC_SUBST(LIBXML2_INC, $LIBXML2_INC) -AC_SUBST(LIBXML2_LIB, $LIBXML2_LIB) - -dnl --------------------------------------------------------------------------- -dnl Check for librasterlite2. -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(rasterlite2, - [ --with-rasterlite2=ARG Include RasterLite2 support (ARG=no(default), yes or path)], - ,,) - -HAVE_RASTERLITE2=no -RASTERLITE2_CFLAGS= - -if test -z "$with_rasterlite2" -o "$with_rasterlite2" = "no"; then - AC_MSG_NOTICE([rasterlite2 support disabled]) -elif test "$with_rasterlite2" = "yes"; then - AC_CHECK_HEADERS(rasterlite2/rasterlite2.h) - if test "$ac_cv_header_rasterlite2_rasterlite2_h" = "yes"; then - AC_CHECK_LIB(rasterlite2,rl2_load_raw_tiles_into_dbms,HAVE_RASTERLITE2=yes,HAVE_RASTERLITE2=no,) - if test "$HAVE_RASTERLITE2" = "yes"; then - LIBS="$LIBS -lrasterlite2 -lsqlite3" - else - AC_MSG_ERROR([did not find rl2_load_raw_tiles_into_dbms]) - fi - else - AC_MSG_ERROR([did not find rasterlite2.h]) - fi -else - AC_MSG_CHECKING([for include/rasterlite2/rasterlite2.h]) - if test -f "$with_rasterlite2/include/rasterlite2/rasterlite2.h"; then - AC_MSG_RESULT([found]) - AC_CHECK_LIB(rasterlite2,rl2_load_raw_tiles_into_dbms,HAVE_RASTERLITE2=yes,HAVE_RASTERLITE2=no,-L$with_rasterlite2/lib) - if test "$HAVE_RASTERLITE2" = "yes"; then - RASTERLITE2_CFLAGS="-I$with_rasterlite2/include" - LIBS="$LIBS -L$with_rasterlite2/lib -lrasterlite2 -lsqlite3" - else - AC_MSG_ERROR([did not find rl2_load_raw_tiles_into_dbms]) - fi - else - AC_MSG_ERROR([did not find rasterlite2.h]) - fi -fi - -AC_SUBST([HAVE_RASTERLITE2], $HAVE_RASTERLITE2) -AC_SUBST([RASTERLITE2_CFLAGS], $RASTERLITE2_CFLAGS) - -dnl --------------------------------------------------------------------------- -dnl Check for PCRE2. -dnl --------------------------------------------------------------------------- - -HAVE_PCRE2=no - -AC_ARG_WITH(pcre2, - [ --with-pcre2 Include libpcre2 support (REGEXP support for SQLite)], - ,,) - -if test "$with_pcre2" = "no"; then - AC_MSG_RESULT(disabled) - HAVE_PCRE2=no -else - save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -DPCRE2_CODE_UNIT_WIDTH=8" - AC_CHECK_HEADERS([pcre2.h]) - CPPFLAGS="$save_CPPFLAGS" - if test "$ac_cv_header_pcre2_h" = "no" ; then - if test "$with_pcre2" = "yes"; then - AC_MSG_ERROR([cannot find pcre2.h]) - fi - else - AC_CHECK_LIB(pcre2-8,pcre2_compile_8,HAVE_PCRE2=yes,HAVE_PCRE2=no,) - if test "$HAVE_PCRE2" = "yes" ; then - HAVE_PCRE2=yes - LIBS="$LIBS -lpcre2-8" - else - if test "$with_pcre2" = "yes"; then - AC_MSG_ERROR([cannot find libpcre2]) - fi - fi - fi -fi - -AC_SUBST(HAVE_PCRE2) - -dnl --------------------------------------------------------------------------- -dnl Check for PCRE. -dnl --------------------------------------------------------------------------- - -HAVE_PCRE=no - -AC_ARG_WITH(pcre, - [ --with-pcre Include libpcre support (REGEXP support for SQLite)], - ,,) - -if test "$with_pcre" = "no"; then - AC_MSG_RESULT(disabled) - HAVE_PCRE=no -elif test "$HAVE_PCRE2" = "no"; then - AC_CHECK_HEADERS([pcre.h]) - if test "$ac_cv_header_pcre_h" = "no" ; then - if test "$with_pcre" = "yes"; then - AC_MSG_ERROR([cannot find pcre.h]) - fi - else - AC_CHECK_LIB(pcre,pcre_compile,HAVE_PCRE=yes,HAVE_PCRE=no,) - if test "$HAVE_PCRE" = "yes" ; then - HAVE_PCRE=yes - LIBS="$LIBS -lpcre" - else - if test "$with_pcre" = "yes"; then - AC_MSG_ERROR([cannot find libpcre]) - fi - fi - fi -fi - -AC_SUBST(HAVE_PCRE) - -dnl --------------------------------------------------------------------------- -dnl Check for Teigha. -dnl --------------------------------------------------------------------------- - -TEIGHA_DIR= -TEIGHA_CPPFLAGS= - -AC_MSG_CHECKING(Checking for Teigha) -AC_ARG_WITH(teigha, - [ --with-teigha[=path] Include Teigha DWG/DGN support], - ,,) - -if test -z "$with_teigha" -o "$with_teigha" = "no"; then - AC_MSG_RESULT(disabled) - HAVE_TEIGHA=no -else - AC_MSG_RESULT(enabled) - - AC_ARG_WITH(teigha-plt, - [ --with-teigha-plt[=platform] Teigha platform], - ,,) - if test "x$with_teigha_plt" != "x" ; then - TEIGHA_DIR=$with_teigha - HAVE_TEIGHA=yes - TEIGHA_PLT=$with_teigha_plt - LIBS="${LIBS} ${TEIGHA_DIR}/bin/${TEIGHA_PLT}/TG_Db.tx" - if test -f "${TEIGHA_DIR}/bin/${TEIGHA_PLT}/TD_DbEntities.tx"; then - LIBS="${LIBS} ${TEIGHA_DIR}/bin/${TEIGHA_PLT}/TD_DbEntities.tx" - LIBS="${LIBS} ${TEIGHA_DIR}/lib/${TEIGHA_PLT}/libTD_DrawingsExamplesCommon.a" - fi - LIBS="${LIBS} ${TEIGHA_DIR}/lib/${TEIGHA_PLT}/libTG_ExamplesCommon.a" - LIBS="${LIBS} ${TEIGHA_DIR}/lib/${TEIGHA_PLT}/libTD_ExamplesCommon.a" - LIBS="${LIBS} ${TEIGHA_DIR}/lib/${TEIGHA_PLT}/libTD_Key.a" - LIBS="${LIBS} -L${TEIGHA_DIR}/bin/${TEIGHA_PLT} -lTD_Db" - if test -f "${TEIGHA_DIR}/bin/${TEIGHA_PLT}/libTD_DbCore.*"; then - LIBS="${LIBS} -L${TEIGHA_DIR}/bin/${TEIGHA_PLT} -lTD_DbCore" - fi - LIBS="${LIBS} -L${TEIGHA_DIR}/bin/${TEIGHA_PLT} -lTD_DbRoot" - LIBS="${LIBS} -L${TEIGHA_DIR}/bin/${TEIGHA_PLT} -lTD_Gi" - LIBS="${LIBS} -L${TEIGHA_DIR}/bin/${TEIGHA_PLT} -lTD_SpatialIndex" - LIBS="${LIBS} -L${TEIGHA_DIR}/bin/${TEIGHA_PLT} -lTD_Root" - LIBS="${LIBS} -L${TEIGHA_DIR}/bin/${TEIGHA_PLT} -lTD_Ge" - if test -f "${TEIGHA_DIR}/bin/${TEIGHA_PLT}/libTD_Zlib.*"; then - LIBS="${LIBS} -L${TEIGHA_DIR}/bin/${TEIGHA_PLT} -lTD_Zlib" - fi - LIBS="${LIBS} -L${TEIGHA_DIR}/bin/${TEIGHA_PLT} -lTD_Alloc" - LIBS="${LIBS} -L${TEIGHA_DIR}/bin/${TEIGHA_PLT} -loless" - if test -f "${TEIGHA_DIR}/bin/${TEIGHA_PLT}/liblibcrypto.*"; then - LIBS="${LIBS} -L${TEIGHA_DIR}/bin/${TEIGHA_PLT} -llibcrypto" - fi - if test -f "${TEIGHA_DIR}/bin/${TEIGHA_PLT}/libTD_Db.so"; then - TEIGHA_CPPFLAGS="-D_TOOLKIT_IN_DLL_" - fi - else - AC_MSG_ERROR([--with-teigha-plt not specified]) - fi -fi - -AC_SUBST(TEIGHA_DIR) -AC_SUBST(HAVE_TEIGHA) -AC_SUBST(TEIGHA_CPPFLAGS) - -dnl --------------------------------------------------------------------------- -dnl Select Informix DataBlade support -dnl --------------------------------------------------------------------------- - -HAVE_IDB=no - -AC_ARG_WITH(idb,[ --with-idb=DIR Include Informix DataBlade support (DIR points to Informix root)],,) - -if test x"${with_idb}" = x"no" ; then - AC_MSG_NOTICE(["IBM Informix DataBlade support disabled."]) -else - if test x"${with_idb}" = x ; then - with_idb=$INFORMIXDIR - fi - - if test -e "${with_idb}/incl/c++/it.h" ; then - - LIBS_DIRS="-L${with_idb}/lib/ -L${with_idb}/lib/esql" - LIBS_ESQL="-lifsql -lifasf -lifgen -lifos -lifgls -lifglx ${with_idb}/lib/esql/checkapi.o" - LIBS_LIBMI="-L${with_idb}/lib/dmi -lifdmi" - LIBS_CPPIF="-L${with_idb}/lib/c++ -lifc++" - - IDB_INC="-I${with_idb}/incl/ -I${with_idb}/incl/dmi -I${with_idb}/incl/c++" - IDB_LIB="${LIBS_CPPIF} ${LIBS_LIBMI} ${LIBS_DIRS} ${LIBS_ESQL}" - - ax_save_LIBS="${LIBS}" - LIBS="${IDB_LIB} -ldl -lcrypt" - AC_CHECK_LIB(ifsql,ifx_srvinfo,HAVE_IDB=yes,HAVE_IDB=no,) - LIBS="${ax_save_LIBS}" - - fi - - if test "${HAVE_IDB}" = "yes" ; then - AC_MSG_NOTICE([using Informix C++ client library from $with_idb.]) - else - AC_MSG_NOTICE([IBM Informix DataBlade not supported.]) - fi - -fi - -AC_SUBST(HAVE_IDB,${HAVE_IDB}) -AC_SUBST(IDB_INC,${IDB_INC}) -AC_SUBST(IDB_LIB,${IDB_LIB}) - -dnl --------------------------------------------------------------------------- -dnl Check if webp library is available. -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(webp,[ --with-webp[=ARG] Include WEBP support (ARG=no, yes or libwebp install root path)],,) - -WEBP_SETTING=no - -if test "$with_webp" = "yes" -o "$with_webp" = "" ; then - - AC_CHECK_LIB(webp,WebPDecodeRGB,WEBP_SETTING=yes,WEBP_SETTING=no,) - - if test "$WEBP_SETTING" = "yes" ; then - LIBS="-lwebp $LIBS" - else - echo "libwebp not found - WEBP support disabled" - fi - -elif test "$with_webp" != "no" -a "$with_webp" != ""; then - - AC_CHECK_LIB(webp,WebPDecodeRGB,WEBP_SETTING=yes,WEBP_SETTING=no,-L$with_webp/lib -lwebp) - - if test "$WEBP_SETTING" = "yes" ; then - LIBS="-L$with_webp/lib -lwebp $LIBS" - EXTRA_INCLUDES="-I$with_webp/include $EXTRA_INCLUDES" - else - echo "libwebp not found - WEBP support disabled" - fi - -fi - -AC_SUBST(WEBP_SETTING,$WEBP_SETTING) - -if test "$WEBP_SETTING" != "no" ; then - OPT_GDAL_FORMATS="webp $OPT_GDAL_FORMATS" -fi - -dnl --------------------------------------------------------------------------- -dnl Check if geos library is available. -dnl --------------------------------------------------------------------------- - -GEOS_INIT(3.1.0) -if test "${HAVE_GEOS}" = "yes" ; then - AC_MSG_NOTICE([Using C API from GEOS $GEOS_VERSION]) - STRIP_SYSTEM_LIBRARY_PATHS("${GEOS_LIBS}") - GEOS_LIBS="$STRIPPED_LIBRARY_NAME" - LIBS="${GEOS_LIBS} ${LIBS}" -fi - -dnl --------------------------------------------------------------------------- -dnl Check if SFCGAL library is available. -dnl --------------------------------------------------------------------------- - -SFCGAL_INIT(1.2.2) -if test "${HAVE_SFCGAL}" = "yes" ; then - AC_MSG_NOTICE([Using C API from SFCGAL $SFCGAL_VERSION]) - STRIP_SYSTEM_LIBRARY_PATHS("${SFCGAL_LIBS}") - SFCGAL_LIBS="$STRIPPED_LIBRARY_NAME" - LIBS="${SFCGAL_LIBS} ${LIBS}" -fi - -dnl --------------------------------------------------------------------------- -dnl Check if QHull library is available. -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(qhull,[ --with-qhull[=ARG] Include QHull support (ARG=no, yes, internal)],,) - -QHULL_SETTING=no - -if test "$with_qhull" = "no" ; then - - AC_MSG_NOTICE([QHull support disabled.]) - -elif test "$with_qhull" = "yes" -o "$with_qhull" = "" ; then - - AC_ARG_WITH(qhull_pkgname,[ --with-qhull-pkgname[=ARG] pkg-config name of the reentrant qhull library, typically qhull_r (default) or qhullstatic_r],,) - - if test "x$with_qhull_pkgname" = "x" ; then - with_qhull_pkgname=qhull_r - fi - - PKG_PROG_PKG_CONFIG([0.21]) - PKG_CHECK_MODULES([QHULL],[$with_qhull_pkgname], [HAVE_QHULL=yes], [HAVE_QHULL=no]) - - dnl First try with pkg-config - if test "$HAVE_QHULL" = "yes" ; then - QHULL_SETTING=external - CFLAGS="$CFLAGS $QHULL_CFLAGS" - LIBS="$LIBS $QHULL_LIBS" - else - AC_CHECK_HEADERS([libqhull_r/libqhull_r.h]) - if test "$ac_cv_header_libqhull_r_libqhull_r_h" = "yes"; then - AC_CHECK_LIB(qhull_r,qh_new_qhull,QHULL_SETTING=yes,QHULL_SETTING=no,) - if test "$QHULL_SETTING" = "yes"; then - QHULL_SETTING=external - LIBS="-lqhull_r $LIBS" - fi - fi - - if test "$QHULL_SETTING" = "no" ; then - if test "$with_qhull" = "yes"; then - AC_MSG_ERROR([--with-qhull requested, but library not found!]) - else - QHULL_SETTING=internal - fi - fi - fi -else - QHULL_SETTING=internal -fi - -AC_SUBST([QHULL_SETTING],$QHULL_SETTING) - -dnl --------------------------------------------------------------------------- -dnl Check if opencl library is available. -dnl --------------------------------------------------------------------------- - -OPENCL_SETTING=no -OPENCL_FLAGS= -OPENCL_LIB= - -AC_ARG_WITH(opencl, - [ --with-opencl[=ARG] Include OpenCL (GPU) support],,,) - -AC_MSG_CHECKING([for OpenCL support]) - -if test "$with_opencl" = "yes" ; then - - AC_ARG_WITH(opencl-include, - [ --with-opencl-include=ARG OpenCL Include directory (with a CL subdirectory)],,,) - - OPENCL_SETTING=yes - - if test "x$with_opencl_include" = "x" ; then - OPENCL_FLAGS=-DHAVE_OPENCL - if test -z "`uname | grep Darwin`" ; then - AC_CHECK_HEADERS([CL/opencl.h]) - if test "$ac_cv_header_CL_opencl_h" = "no" ; then - AC_MSG_ERROR([cannot find CL/opencl.h]) - fi - fi - else - OPENCL_FLAGS="-I$with_opencl_include -DHAVE_OPENCL" - fi - - AC_ARG_WITH(opencl-lib, - [ --with-opencl-lib=ARG OpenCL Link Flags (i.e. -L/xxx -lOpenCL)],,,) - - if test "x$with_opencl_lib" = "x" ; then - if test ! -z "`uname | grep Darwin`" ; then - OPENCL_LIB="-framework OpenCL" - else - AC_CHECK_LIB(OpenCL,clGetPlatformIDs,OPENCL_LIB=-lOpenCL,OPENCL_LIB=missing) - if test "$OPENCL_LIB" = "missing"; then - AC_MSG_ERROR([--with-opencl requested, but libraries not found!]) - fi - fi - else - OPENCL_LIB="$with_opencl_lib" - fi - -fi - -AC_MSG_RESULT([$OPENCL_SETTING]) - -AC_SUBST(OPENCL_FLAGS, $OPENCL_FLAGS) -AC_SUBST(OPENCL_LIB, $OPENCL_LIB) - - -dnl --------------------------------------------------------------------------- -dnl Check if FreeXL library is available. -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(freexl,[ --with-freexl[=ARG] Include freexl support (ARG=no, yes (default) or libfreexl install path)],,) - -AC_MSG_CHECKING([for FreeXL support]) - -HAVE_FREEXL=no -FREEXL_INCLUDE= - -if test "$with_freexl" = "" -o "$with_freexl" = "yes" ; then - AC_CHECK_HEADERS(freexl.h) - AC_CHECK_LIB(freexl,freexl_open,FREEXL_LIBS="-lfreexl",FREEXL_LIBS=missing) - - if test "$FREEXL_LIBS" = "missing"; then - unset ac_cv_lib_freexl_freexl_open - AC_CHECK_LIB(freexl,freexl_open,FREEXL_LIBS="-lfreexl -lm",FREEXL_LIBS=missing,-lm) - fi - - if test "$FREEXL_LIBS" = "missing"; then - unset ac_cv_lib_freexl_freexl_open - AC_CHECK_LIB(freexl,freexl_open,FREEXL_LIBS="-lfreexl -liconv",FREEXL_LIBS=missing,-liconv) - fi - - if test "$FREEXL_LIBS" = "missing"; then - unset ac_cv_lib_freexl_freexl_open - AC_CHECK_LIB(freexl,freexl_open,FREEXL_LIBS="-lfreexl -liconv -lm",FREEXL_LIBS=missing,-liconv -lm) - fi - - if test "$FREEXL_LIBS" = "missing"; then - unset ac_cv_lib_freexl_freexl_open - AC_CHECK_LIB(freexl,freexl_open,FREEXL_LIBS="-lfreexl -liconv -lcharset",FREEXL_LIBS=missing,-liconv -lcharset) - fi - - if test "$FREEXL_LIBS" != "missing" -a "$ac_cv_header_freexl_h" = "yes" ; then - - # Check that freexl is recent enough - rm -f testrlist.* - echo '#include ' > testfreexl.c - echo 'int main(int argc, char** argv) { FreeXL_CellValue s; freexl_get_cell_value (0,0,0,&s); return 0; } ' >> testfreexl.c - if test -z "`${CC} ${CFLAGS} testfreexl.c -c 2>&1`" ; then - HAVE_FREEXL=yes - LIBS="$FREEXL_LIBS $LIBS" - else - HAVE_FREEXL=no - AC_MSG_RESULT([freexl too old. Needs freexl >= 1.0]) - fi - rm -f testfreexl.* - - else - HAVE_FREEXL=no - echo "libfreexl not found - FreeXL support disabled" - fi - -elif test "$with_freexl" != "no"; then - - AC_CHECK_LIB(freexl,freexl_open,FREEXL_LIBS="-L$with_freexl/lib -lfreexl",FREEXL_LIBS=missing,-L$with_freexl/lib) - - if test "$FREEXL_LIBS" = "missing"; then - unset ac_cv_lib_freexl_freexl_open - AC_CHECK_LIB(freexl,freexl_open,FREEXL_LIBS="-L$with_freexl/lib -lfreexl -lm",FREEXL_LIBS=missing,-L$with_freexl/lib -lm) - fi - - if test "$FREEXL_LIBS" = "missing"; then - unset ac_cv_lib_freexl_freexl_open - AC_CHECK_LIB(freexl,freexl_open,FREEXL_LIBS="-L$with_freexl/lib -lfreexl -liconv",FREEXL_LIBS=missing,-L$with_freexl/lib -liconv) - fi - - if test "$FREEXL_LIBS" = "missing"; then - unset ac_cv_lib_freexl_freexl_open - AC_CHECK_LIB(freexl,freexl_open,FREEXL_LIBS="-L$with_freexl/lib -lfreexl -liconv -lm",FREEXL_LIBS=missing,-L$with_freexl/lib -liconv -lm) - fi - - if test "$FREEXL_LIBS" = "missing"; then - unset ac_cv_lib_freexl_freexl_open - AC_CHECK_LIB(freexl,freexl_open,FREEXL_LIBS="-L$with_freexl/lib -lfreexl -liconv -lcharset",FREEXL_LIBS=missing,-L$with_freexl/lib -liconv -lcharset) - fi - - if test "$FREEXL_LIBS" != "missing" -a -f "$with_freexl/include/freexl.h" ; then - - # Check that freexl is recent enough - rm -f testrlist.* - echo '#include ' > testfreexl.c - echo 'int main(int argc, char** argv) { FreeXL_CellValue s; freexl_get_cell_value (0,0,0,&s); return 0; } ' >> testfreexl.c - if test -z "`${CC} ${CFLAGS} -I$with_freexl/include testfreexl.c -c 2>&1`" ; then - HAVE_FREEXL=yes - LIBS="$FREEXL_LIBS $LIBS" - FREEXL_INCLUDE="-I$with_freexl/include" - else - HAVE_FREEXL=no - AC_MSG_RESULT([freexl too old. Needs freexl >= 1.0]) - fi - rm -f testfreexl.* - - else - HAVE_FREEXL=no - echo "libfreexl not found - FreeXL support disabled" - fi - -fi - -AC_SUBST(HAVE_FREEXL, $HAVE_FREEXL) -AC_SUBST(FREEXL_INCLUDE, $FREEXL_INCLUDE) - - -dnl --------------------------------------------------------------------------- -dnl Check if libjson-c is available. -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(libjson-c,[ --with-libjson-c[=ARG] Include libjson-c support (ARG=internal or libjson-c directory)],,) - -if test "$with_libjson_c" = "external" -o "$with_libjson_c" = "" -o "$with_libjson_c" = "yes" ; then - AC_CHECK_LIB(json-c,json_object_set_serializer,LIBJSONC_SETTING=external,LIBJSONC_SETTING=internal,) -elif test "$with_libjson_c" = "internal" ; then - LIBJSONC_SETTING=internal -elif test "$with_libjson_c" != "no"; then - LIBS="-L$with_libjson_c/lib $LIBS" - AC_CHECK_LIB(json-c,json_object_set_serializer,LIBJSONC_SETTING=external,LIBJSONC_SETTING=internal,-L$with_libjson_c/lib) -else - AC_MSG_ERROR([libjson-c (internal or external) is required]) -fi - -if test "$LIBJSONC_SETTING" = "external" ; then - AC_MSG_RESULT([using pre-installed libjson-c]) - LIBS="-ljson-c $LIBS" - if test "$with_libjson_c" != "" -a "$with_libjson_c" != "yes" -a "$with_libjson_c" != "external" ; then - JSON_INCLUDE="-I$with_libjson_c/include/json-c" - elif test -f "/usr/include/json-c/json.h"; then - JSON_INCLUDE="-I/usr/include/json-c" - elif test -f "/usr/local/include/json-c/json.h"; then - JSON_INCLUDE="-I/usr/local/include/json-c" - else - AC_MSG_ERROR([could not find json-c/json.h]) - fi -else - JSON_INCLUDE="-I\$(GDAL_ROOT)/ogr/ogrsf_frmts/geojson/libjson" - AC_MSG_RESULT([using internal libjson-c code]) -fi - -AC_SUBST(LIBJSONC_SETTING,$LIBJSONC_SETTING) -AC_SUBST(JSON_INCLUDE,$JSON_INCLUDE) - - -dnl --------------------------------------------------------------------------- -dnl Check if we must enable PAM -dnl --------------------------------------------------------------------------- - -AC_MSG_CHECKING([whether to enable PAM]) - -AC_ARG_WITH(pam,[ --without-pam Disable PAM (.aux.xml) support],,) - -export PAM_SETTING= - -if test "x$with_pam" = "xno" ; then - AC_MSG_RESULT([no]) -else - AC_MSG_RESULT([yes]) - PAM_SETTING=-DPAM_ENABLED -fi - -AC_SUBST(PAM_SETTING, $PAM_SETTING) - -dnl --------------------------------------------------------------------------- -dnl Check if the PDF driver should be built as a plugin -dnl --------------------------------------------------------------------------- - -AC_MSG_CHECKING([whether to build PDF driver as a plugin]) - -AC_ARG_ENABLE(pdf_plugin, - AS_HELP_STRING([--enable-pdf-plugin], - [enable PDF driver as a plugin (included in libgdal by default)]),,) - -PDF_PLUGIN=no -if test "x$enable_pdf_plugin" = "xyes" ; then - - if test "$with_libtool" = "yes"; then - AC_MSG_ERROR([--enable-pdf-plugin not supported together --with-libtool]) - fi - - PDF_PLUGIN=yes - - AC_MSG_RESULT([yes]) -else - AC_MSG_RESULT([no]) -fi - -AC_SUBST(PDF_PLUGIN, $PDF_PLUGIN) -if test "$PDF_PLUGIN" != "yes" ; then - if test "x$INTERNAL_FORMAT_pdf_ENABLED" = "xyes"; then - if test "$LIBZ_SETTING" != "no" ; then - GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED pdf" - fi - fi -fi - - -dnl --------------------------------------------------------------------------- -dnl Check if libpoppler is available -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(poppler,[ --with-poppler[=ARG] Include poppler(for PDF) support (ARG=no(default), yes or poppler install path)],,) - -HAVE_POPPLER=no -POPPLER_MAJOR_VERSION= -POPPLER_MINOR_VERSION= - -AC_MSG_CHECKING([for poppler]) - -if test "$with_poppler" != "no" -a "$with_poppler" != ""; then - - PKG_PROG_PKG_CONFIG([0.21]) - PKG_CHECK_MODULES([POPPLER], [poppler >= 0.23.0], - [POPPLER_VERSION=`$PKG_CONFIG --modversion poppler`], [POPPLER_VERSION=]) - if test "$POPPLER_VERSION" != ""; then - HAVE_POPPLER=yes - POPPLER_MAJOR_VERSION=`echo $POPPLER_VERSION | cut -d'.' -f1` - POPPLER_MINOR_VERSION=`echo $POPPLER_VERSION | cut -d'.' -f2 | sed -e 's/^0//'` - POPPLER_CFLAGS=`echo $POPPLER_CFLAGS $POPPLER_CFLAGS | sed "s/include\/poppler/include/"` - fi -else - AC_MSG_RESULT([disabled]) -fi - -if test "$HAVE_POPPLER" = "yes" -a "$PDF_PLUGIN" = "no"; then - LIBS="${POPPLER_LIBS} ${LIBS}" -fi - -AC_SUBST(HAVE_POPPLER, $HAVE_POPPLER) -AC_SUBST(POPPLER_MAJOR_VERSION, $POPPLER_MAJOR_VERSION) -AC_SUBST(POPPLER_MINOR_VERSION, $POPPLER_MINOR_VERSION) -AC_SUBST(POPPLER_CFLAGS, $POPPLER_CFLAGS) -AC_SUBST(POPPLER_PLUGIN_LIB, $POPPLER_LIBS) - -dnl --------------------------------------------------------------------------- -dnl Check if libpodofo is available -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(podofo,[ --with-podofo[=ARG] Include podofo(for PDF) support (ARG=no(default), yes or podofo install path)],,) - -HAVE_PODOFO=no - -AC_MSG_CHECKING([for podofo]) - -if test "$with_podofo" != "no" -a "$with_podofo" != ""; then - - AC_ARG_WITH(podofo-lib, - [ --with-podofo-lib=ARG podofo Link Flags (i.e. -L/xxx -lpodofo ...). Mainly for static libpodofo],,,) - - if test "$with_podofo" = "yes" ; then - TEST_PODOFO_INC="-I/usr/include/podofo" - PODOFO_LIB="-lpodofo" - else - TEST_PODOFO_INC="-I$with_podofo/include -I$with_podofo/include/podofo" - PODOFO_LIB="-L$with_podofo/lib -lpodofo" - fi - - if test "x$with_podofo_lib" = "x" ; then - rm -f testpodofo.* - echo '#include ' > testpodofo.cpp - echo 'int main(int argc, char** argv) { PoDoFo::PdfError::EnableDebug( 0 ); return 0; } ' >> testpodofo.cpp - ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} testpodofo.cpp -o testpodofo ${TEST_PODOFO_INC} ${PODOFO_LIB} 2>/dev/null - RETVAL=$? - if test $RETVAL -eq 0; then - HAVE_PODOFO=yes - if test "$PDF_PLUGIN" = "no"; then - LIBS="${PODOFO_LIB} ${LIBS}" - fi - PODOFO_INC=$TEST_PODOFO_INC - PODOFO_PLUGIN_LIB="${PODOFO_LIB}" - AC_MSG_RESULT([yes]) - fi - rm -f testpodofo.* - rm -f testpodofo - fi - - if test "$HAVE_PODOFO" = "no"; then - if test "x$with_podofo_lib" != "x" ; then - PODOFO_LIB="$with_podofo_lib" - else - # This may be a static libpodofo.a, so add dependent libraries. - PODOFO_LIB="$PODOFO_LIB -lfreetype -lfontconfig -lpthread" - fi - - AC_ARG_WITH(podofo-extra-lib-for-test, - [ --with-podofo-extra-lib-for-test=ARG Additional libraries to pass the detection test, but not used for libgdal linking (i.e. -ljpeg ...). Mainly for static libpodofo],,,) - - if test "x$with_podofo_extra_lib_for_test" = "x" ; then - TEST_PODOFO_LIB="$PODOFO_LIB" - else - TEST_PODOFO_LIB="$PODOFO_LIB $with_podofo_extra_lib_for_test" - fi - - rm -f testpodofo.* - echo '#include ' > testpodofo.cpp - echo 'int main(int argc, char** argv) { PoDoFo::PdfError::EnableDebug( 0 ); return 0; } ' >> testpodofo.cpp - ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} testpodofo.cpp -o testpodofo ${TEST_PODOFO_INC} ${TEST_PODOFO_LIB} 2>/dev/null - RETVAL=$? - if test $RETVAL -eq 0; then - HAVE_PODOFO=yes - if test "$PDF_PLUGIN" = "no"; then - LIBS="${PODOFO_LIB} ${LIBS}" - fi - PODOFO_INC=$TEST_PODOFO_INC - PODOFO_PLUGIN_LIB="${PODOFO_LIB}" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - rm -f testpodofo.* - rm -f testpodofo - fi -else - AC_MSG_RESULT([disabled]) -fi - -AC_SUBST(HAVE_PODOFO, $HAVE_PODOFO) -AC_SUBST(PODOFO_INC, $PODOFO_INC) -AC_SUBST(PODOFO_PLUGIN_LIB, $PODOFO_PLUGIN_LIB) - -dnl --------------------------------------------------------------------------- -dnl Check if libpdfium is available -dnl -dnl Support for open-source PDFium library -dnl -dnl Copyright (C) 2015 Klokan Technologies GmbH (http://www.klokantech.com/) -dnl Author: Martin Mikita , xmikit00 @ FIT VUT Brno -dnl Copyright 2019 Even Rouault -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(pdfium,[ --with-pdfium[=ARG] Include pdfium (for PDF) support (ARG=no(default), yes or pdfium install path)],,) - -HAVE_PDFIUM=no - -AC_MSG_CHECKING([for pdfium]) - -if test "$with_pdfium" != "no" -a "$with_pdfium" != ""; then - - if test "$with_pdfium" = "yes" ; then - PDFIUM_INC="-I/usr/include/pdfium" - PDFIUM_LIB="-lpdfium" - else - PDFIUM_INC="-I$with_pdfium/include/pdfium" - PDFIUM_LIB="-L$with_pdfium/lib -lpdfium" - fi - - PDFIUM_LIB="$PDFIUM_LIB -lopenjp2 -ljpeg -lpng -lz -llcms2 -lpthread -lm -lstdc++" - - if test ! -z "`uname | grep Darwin`" ; then - PDFIUM_LIB="-stdlib=libstdc++ $PDFIUM_LIB" - fi - - rm -f testpdfium.* - echo '#include "public/fpdfview.h"' > testpdfium.cpp - echo '#include "core/fpdfapi/page/cpdf_page.h"' >> testpdfium.cpp - echo '#include "constants/transparency.h"' >> testpdfium.cpp # specific to pdfium_build_gdal_3_2 - echo 'int main(int argc, char** argv) { FPDF_InitLibrary(); FPDF_DestroyLibrary(); return 0; } ' >> testpdfium.cpp - TEST_CXX_FLAGS="" - if test ! -z "`uname | grep Darwin`" ; then - TEST_CXX_FLAGS="$TEST_CXX_FLAGS -stdlib=libstdc++" - fi - if ${CXX} ${CXXFLAGS} ${CPPFLAGS} $TEST_CXX_FLAGS -std=c++14 testpdfium.cpp -o testpdfium ${PDFIUM_INC} ${PDFIUM_LIB} >/dev/null 2>/dev/null; then - HAVE_PDFIUM=yes - CXXFLAGS="$TEST_CXX_FLAGS $CXXFLAGS" - if test "$PDF_PLUGIN" = "no"; then - LIBS="${PDFIUM_LIB} ${LIBS}" - fi - PDFIUM_PLUGIN_LIB="${PDFIUM_LIB}" - AC_MSG_RESULT([yes]) - fi - rm -f testpdfium.* - rm -f testpdfium - - if test "$HAVE_PDFIUM" = "no" -a "$with_pdfium" != ""; then - AC_MSG_ERROR([pdfium requested but not found. Must come from https://github.com/rouault/pdfium_build_gdal_3_4]) - fi -else - AC_MSG_RESULT([disabled]) -fi - -AC_SUBST(HAVE_PDFIUM, $HAVE_PDFIUM) -AC_SUBST(PDFIUM_INC, $PDFIUM_INC) -AC_SUBST(PDFIUM_PLUGIN_LIB, $PDFIUM_PLUGIN_LIB) - -dnl --------------------------------------------------------------------------- -dnl Get/override version. -dnl --------------------------------------------------------------------------- - - -AC_ARG_WITH(gdal-ver,[ --with-gdal-ver=ARG Override GDAL version ],,) -GDAL_VERSION_MAJOR=`grep "#*define.GDAL_VERSION_MAJOR.*" gcore/gdal_version.h.in | awk '{print $4}'` -GDAL_VERSION_MINOR=`grep "#*define.GDAL_VERSION_MINOR.*" gcore/gdal_version.h.in | awk '{print $4}'` -GDAL_VERSION_REV=`grep "#*define.GDAL_VERSION_REV.*" gcore/gdal_version.h.in | awk '{print $4}'` - -AC_MSG_RESULT([checking GDAL version information from gdal_version.h.in: $GDAL_VERSION_MAJOR.$GDAL_VERSION_MINOR.$GDAL_VERSION_REV]) - -AC_SUBST(GDAL_VERSION_MAJOR, "$GDAL_VERSION_MAJOR") -AC_SUBST(GDAL_VERSION_MINOR, "$GDAL_VERSION_MINOR") -AC_SUBST(GDAL_VERSION_REV, "$GDAL_VERSION_REV") - -if test "x$with_gdal_ver" != "x"; then - - GDAL_VER=$with_gdal_ver - AC_MSG_RESULT([ overridden GDAL version: $GDAL_VER]) -else - - GDAL_VER=$GDAL_VERSION_MAJOR.$GDAL_VERSION_MINOR.$GDAL_VERSION_REV - -fi - -AC_SUBST(GDAL_VER, $GDAL_VER) -echo $GDAL_VER > VERSION - -dnl --------------------------------------------------------------------------- -dnl MacOS X Framework Build - -if test ! -z "`uname | grep Darwin`" ; then - - CXXFLAGS="$ARCHFLAGS $CXXFLAGS" - CFLAGS="$ARCHFLAGS $CFLAGS" - LIBS="$ARCHFLAGS $LIBS" - - MACOSX_FRAMEWORK=no - AC_ARG_WITH(macosx-framework,[ --with-macosx-framework Build and install GDAL as a Mac OS X Framework],,) - AC_MSG_CHECKING([for Mac OS X Framework build]) - if test "$with_macosx_framework" = yes ; then - MACOSX_FRAMEWORK=yes - AC_MSG_RESULT([enabled]) - AC_DEFINE_UNQUOTED(MACOSX_FRAMEWORK,1, [Define for Mac OSX Framework build]) - prefix="/Library/Frameworks/GDAL.framework/Versions/${GDAL_VERSION_MAJOR}.${GDAL_VERSION_MINOR}" - exec_prefix='${prefix}' - includedir='${prefix}/Headers' - datadir='${prefix}/Resources/gdal' - libdir='${exec_prefix}' - bindir='${exec_prefix}/Programs' - docdir='${prefix}/Resources/doc' - mandir='${prefix}/Resources/man' - else - AC_MSG_RESULT([disabled]) - fi - AC_SUBST(MACOSX_FRAMEWORK, $MACOSX_FRAMEWORK) -fi - -AC_SUBST(EXTRA_INCLUDES,$EXTRA_INCLUDES) - -dnl --------------------------------------------------------------------------- -dnl Check whether we need to add specific suffix for executables (.EXE when -dnl building for Windows). This test should work for the case of -dnl cross-compilation too. -dnl --------------------------------------------------------------------------- -case "${host_os}" in - cygwin* | mingw* | pw32*) - EXE_EXT=.exe - SO_EXT=dll - ;; - *) - EXE_EXT= - ;; -esac - -AC_SUBST(EXE_EXT) -AC_SUBST(SO_EXT) - -dnl --------------------------------------------------------------------------- -dnl Which "true" program should we use? -dnl --------------------------------------------------------------------------- -BINTRUE=/bin/true - -if test -f /bin/true.exe ; then - BINTRUE=/bin/true.exe -fi -if test -f /usr/bin/true ; then - BINTRUE=/usr/bin/true -fi - -export BINTRUE - -AC_SUBST(BINTRUE,$BINTRUE) - -dnl --------------------------------------------------------------------------- -dnl Capture GDAL_PREFIX for the cpl_config.h include file. -dnl --------------------------------------------------------------------------- - -if test "$prefix" = "NONE" ; then - GDAL_PREFIX=/usr/local -else - GDAL_PREFIX=${prefix} -fi - -export GDAL_PREFIX -AC_DEFINE_UNQUOTED(GDAL_PREFIX,["]$GDAL_PREFIX["], [--prefix directory for GDAL install]) - -dnl --------------------------------------------------------------------------- -dnl NG Python bindings. -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(python,[ --with-python=ARG Enable python bindings (ARG=yes, no, or path to python binary)],,) - -AC_MSG_CHECKING([for python bindings]) -if test "$with_python" = "yes" ; then - dnl - dnl Check for Python executable in PATH - dnl - AC_CHECK_PROGS([PYTHON], [python python3 python2]) - if test "x$PYTHON" = "x"; then - AC_MSG_ERROR([--with-python requested, but Python not found!]) - fi -elif test "x$with_python" != "x" -a "$with_python" != "no" ; then - PYTHON="$with_python" - if test "`$PYTHON -c 'print(1)'`" != "1"; then - AC_MSG_ERROR([--with-python requested, but Python not found!]) - fi - AC_MSG_RESULT([enabled]) -else - PYTHON="" - AC_MSG_RESULT([disabled]) -fi - -if test "x$PYTHON" != "x"; then - BINDINGS="python $BINDINGS" - - AC_MSG_CHECKING([for python setuptools]) - SETUPTEST='try: - import setuptools - print(1) -except ImportError: - pass' - PY_HAVE_SETUPTOOLS=`$PYTHON -c "$SETUPTEST"` - if test "$PY_HAVE_SETUPTOOLS" = "1"; then - AC_MSG_RESULT([found]) - else - AC_MSG_RESULT([not found]) - fi -fi - -AC_SUBST([PY_HAVE_SETUPTOOLS]) -AC_SUBST([BINDINGS]) - -dnl --------------------------------------------------------------------------- -dnl Java support -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(java,[ --with-java Include Java support (ARG=yes, no or JDK home path) [[default=no]]],,) - -AC_MSG_CHECKING([whether we should include Java support]) - -JAVA_HOME="" -JAVA_INC="" -mac_java_fw="" - -if test "x$with_java" = "xyes"; then - -dnl Ubuntu - JAVA_6_TEST_DIR= - JAVA_7_TEST_DIR= - JAVA_8_TEST_DIR= - JAVA_MAC_TEST_DIR= - case "$host_cpu" in - i*86*) - JAVA_6_TEST_DIR=/usr/lib/jvm/java-6-openjdk-i386 - JAVA_7_TEST_DIR=/usr/lib/jvm/java-7-openjdk-i386 - JAVA_8_TEST_DIR=/usr/lib/jvm/java-8-openjdk-i386 - ;; - x86_64*) - JAVA_6_TEST_DIR=/usr/lib/jvm/java-6-openjdk-amd64 - JAVA_7_TEST_DIR=/usr/lib/jvm/java-7-openjdk-amd64 - JAVA_8_TEST_DIR=/usr/lib/jvm/java-8-openjdk-amd64 - ;; - *) - ;; - esac - case "${host_os}" in - darwin*) - JAVA_MAC_TEST_DIR=$(/usr/libexec/java_home) - ;; - esac - - if test "x$JAVA_8_TEST_DIR" != "x" -a -d "$JAVA_8_TEST_DIR/include"; then - with_java="$JAVA_8_TEST_DIR" - - elif test "x$JAVA_7_TEST_DIR" != "x" -a -d "$JAVA_7_TEST_DIR/include"; then - with_java="$JAVA_7_TEST_DIR" - - elif test "x$JAVA_6_TEST_DIR" != "x" -a -d "$JAVA_6_TEST_DIR/include"; then - with_java="$JAVA_6_TEST_DIR" - - elif test -d /usr/lib/jvm/java-6-openjdk; then - with_java="/usr/lib/jvm/java-6-openjdk" - -dnl RHEL6 - elif test -d /usr/lib/jvm/java-openjdk; then - with_java="/usr/lib/jvm/java-openjdk" - - -dnl OpenSolaris - elif test -d /usr/java; then - with_java="/usr/java" - -dnl Mac OS X - elif test "x$JAVA_MAC_TEST_DIR" != "x"; then - if test -d "$JAVA_MAC_TEST_DIR/bundle"; then - # Mac default 1.6.0_x framework - # test for ./bundle first, since older installs also have ./include - with_java="$JAVA_MAC_TEST_DIR" - mac_java_fw="JavaVM" - elif test -d "$JAVA_MAC_TEST_DIR/include"; then - # Oracle Java install - with_java="$JAVA_MAC_TEST_DIR" - fi - else - AC_MSG_ERROR("cannot find JDK root directory.") - fi - - if test \! -d "$with_java/include" && test \! -d "$with_java/bundle"; then - AC_MSG_ERROR("$with_java is not a valid JDK.") - fi -fi - -if test "x$JAVA_INC" != "x"; then - AC_MSG_RESULT([yes]) -elif test "x$with_java" != "x" -a "x$with_java" != "xno"; then - - if test -d "$with_java/bundle" && test -d "/System/Library/Frameworks/JavaVM.framework/Headers"; then - # Mac default 1.6.0_x framework - # test for ./bundle first, since older installs also have ./include - JAVA_HOME="$with_java" - JAVA_INC="-I/System/Library/Frameworks/JavaVM.framework/Headers" - mac_java_fw="JavaVM" - AC_MSG_RESULT([yes]) - elif test -d "$with_java/include"; then - if test -d "$with_java/include/linux"; then - JAVA_HOME="$with_java" - JAVA_INC="-I$JAVA_HOME/include -I$JAVA_HOME/include/linux" - AC_MSG_RESULT([yes]) - elif test -d "$with_java/include/solaris"; then - JAVA_HOME="$with_java" - JAVA_INC="-I$JAVA_HOME/include -I$JAVA_HOME/include/solaris" - AC_MSG_RESULT([yes]) - elif test -d "$with_java/include/freebsd"; then - JAVA_HOME="$with_java" - JAVA_INC="-I$JAVA_HOME/include -I$JAVA_HOME/include/freebsd" - AC_MSG_RESULT([yes]) - elif test -d "$with_java/include/darwin"; then - # Oracle Java install, use instead of Mac default 1.6.0_x - JAVA_HOME="$with_java" - JAVA_INC="-I$JAVA_HOME/include -I$JAVA_HOME/include/darwin" - AC_MSG_RESULT([yes]) - else - AC_MSG_ERROR("Cannot find $with_java/include/linux or solaris or freebsd or darwin directory.") - fi - else - AC_MSG_ERROR("Cannot find $with_java/include or /Headers directory.") - fi - -else - AC_MSG_RESULT([no]) -fi - -AC_SUBST(JAVA_HOME,$JAVA_HOME) -AC_SUBST(JAVA_INC,$JAVA_INC) - -dnl --------------------------------------------------------------------------- -dnl HDFS support -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(hdfs,[ --with-hdfs[=ARG] Include HDFS support (ARG=Path or no)],,) - -HDFS_ENABLED=no - -if test -z "$with_hdfs" -o "$with_hdfs" = "no" ; then - AC_MSG_RESULT([HDFS support not requested.]) -else - if test "$JAVA_HOME"; then - JNI_LIB="-L$(find $JAVA_HOME | grep libjvm | head -1 | sed "s/[[^/]]*$//") -ljvm" - else - AC_MSG_ERROR([HDFS support requires java support (--with-java). $JAVA_HOME]) - fi - if echo $JNI_LIB | grep $JAVA_HOME; then - AC_MSG_CHECKING([for HDFS in $with_hdfs]) - AC_CHECK_LIB(hdfs,hdfsConnect,HAVE_HDFS_LIB=yes,HAVE_HDFS_LIB=no,$JNI_LIB -L$with_hdfs/lib/native) - AC_CHECK_FILE($with_hdfs/include/hdfs.h,HAVE_HDFS_HEADER=yes,HAVE_HDFS_HEADER=no) - if test "$HAVE_HDFS_LIB" = "yes" -a "$HAVE_HDFS_HEADER" = "yes"; then - AC_MSG_RESULT([HDFS support enabled.]) - HDFS_ENABLED=yes - HDFS_LIB="-L$with_hdfs/lib/native -lhdfs" - HDFS_INC="-I$with_hdfs/include" - else - AC_MSG_ERROR([HDFS support not enabled.]) - fi - else - AC_MSG_ERROR([Unable to find libjvm.]) - fi -fi - -AC_SUBST(HDFS_ENABLED,$HDFS_ENABLED) -AC_SUBST(HDFS_LIB,$HDFS_LIB) -AC_SUBST(HDFS_INC,$HDFS_INC) -AC_SUBST(JNI_LIB,$JNI_LIB) - -dnl --------------------------------------------------------------------------- -dnl TileDB support -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(tiledb,[ --with-tiledb[=ARG] Include TileDB support (ARG=no, yes or tiledb install root path)],,) - -TILEDB_SETTING=no -TILEDB_CFLAGS= - -if test "$with_tiledb" = "yes" -o "$with_tiledb" = "" ; then - - AC_CHECK_LIB(tiledb,tiledb_coords,TILEDB_SETTING=yes,TILEDB_SETTING=no,) - - if test "$TILEDB_SETTING" = "yes" ; then - LIBS="-ltiledb $LIBS" - else - echo "libtiledb not found - TileDB support disabled" - fi - -elif test "$with_tiledb" != "no" -a "$with_tiledb" != ""; then - - AC_CHECK_LIB(tiledb,tiledb_coords,TILEDB_SETTING=yes,TILEDB_SETTING=no,-L$with_tiledb/lib -ltiledb) - - if test "$TILEDB_SETTING" = "yes" ; then - LIBS="-L$with_tiledb/lib -ltiledb $LIBS" - TILEDB_CFLAGS="-I$with_tiledb/include" - else - echo "libtiledb not found - TileDB support disabled" - fi -fi - -if test "$TILEDB_SETTING" != "no" ; then - - AC_LANG_PUSH([C++]) - SAVED_CXXFLAGS=$CXXFLAGS - CXXFLAGS="$CXXFLAGS $TILEDB_CFLAGS" - AC_MSG_CHECKING([if tiledb/tiledb can be included without additional flags]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM( - [[#include "tiledb/tiledb"]])], - [TILEDB_CAN_BE_INCLUDED="yes"] - [AC_MSG_RESULT([yes])], - [TILEDB_CAN_BE_INCLUDED="no"] - [AC_MSG_RESULT([no])]) - CXXFLAGS=$SAVED_CXXFLAGS - AC_LANG_POP([C++]) - - if test "$TILEDB_CAN_BE_INCLUDED" = "no"; then - AC_LANG_PUSH([C++]) - SAVED_CXXFLAGS=$CXXFLAGS - CXXFLAGS="$CXXFLAGS $TILEDB_CFLAGS -std=c++17" - AC_MSG_CHECKING([if tiledb/tiledb can be included with -std=c++17]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM( - [[#include "tiledb/tiledb"]])], - [TILEDB_CAN_BE_INCLUDED="yes"] - [AC_MSG_RESULT([yes])], - [TILEDB_CAN_BE_INCLUDED="no"] - [AC_MSG_RESULT([no])]) - CXXFLAGS=$SAVED_CXXFLAGS - AC_LANG_POP([C++]) - - if test "$TILEDB_CAN_BE_INCLUDED" = "yes"; then - TILEDB_CFLAGS="$TILEDB_CFLAGS -std=c++17" - fi - fi - - OPT_GDAL_FORMATS="tiledb $OPT_GDAL_FORMATS" -fi - -AC_SUBST(TILEDB_SETTING,$TILEDB_SETTING) -AC_SUBST(TILEDB_CFLAGS,$TILEDB_CFLAGS) - -dnl --------------------------------------------------------------------------- -dnl Select Rasdaman or disable driver. -dnl --------------------------------------------------------------------------- - -RASDAMAN_ENABLED=no - -AS_MESSAGE([checking whether we should include rasdaman support...]) -AC_ARG_WITH(rasdaman, -[ --with-rasdaman[=DIR] Include rasdaman support (DIR is rasdaman's install dir).],,) - -if test "$with_rasdaman" = "yes" ; then - - AC_CHECK_LIB(raslib,main,RASDAMAN_ENABLED=yes,,,) - - if test -n "$RASDAMAN_ENABLED" ; then - RASDAMAN_LIB="-lrasodmg -lclientcomm -lcompression -lnetwork -lraslib" - OPT_GDAL_FORMATS="rasdaman $OPT_GDAL_FORMATS" - AC_MSG_RESULT([ using rasdaman from system libs.]) - else - AC_MSG_WARN([ rasdaman not found in system libs... use --with-rasdaman=DIR.]) - fi - -elif test -n "$with_rasdaman" -a "$with_rasdaman" != "no" ; then - - RASDAMAN_DIR=$with_rasdaman - - if test -f $RASDAMAN_DIR/include/rasdaman.hh -a -d$RASDAMAN_DIR/lib ; then - RASDAMAN_INC=-I$RASDAMAN_DIR/include - RASDAMAN_LIB="-L$RASDAMAN_DIR/lib -lrasodmg -lclientcomm -lcompression -lnetwork -lraslib" - else - AC_MSG_ERROR("Could not find rasdaman.hh or libraslib.a in $RASDAMAN_DIR.") - fi - - RASDAMAN_ENABLED=yes - OPT_GDAL_FORMATS="rasdaman $OPT_GDAL_FORMATS" - AC_MSG_RESULT([ using rasdaman from $RASDAMAN_DIR.]) - -else - - AC_MSG_RESULT([ rasdaman support not requested.]) -fi - -AC_SUBST(RASDAMAN_ENABLED,$RASDAMAN_ENABLED) -AC_SUBST(RASDAMAN_INC, $RASDAMAN_INC) -AC_SUBST(RASDAMAN_LIB, $RASDAMAN_LIB) - - -dnl --------------------------------------------------------------------------- -dnl brunsli support -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(brunsli,[ --with-brunsli Include brunsli support via libbrunsli library],,) - -BRUNSLI_ENABLED=no - -if test "$with_brunsli" != "" -a "$with_brunsli" != "no" ; then - BRUNSLI_ENABLED="yes" - AC_SUBST(BRUNSLI_ENABLED, $BRUNSLI_ENABLED) - AC_SUBST(BRUNSLI_INCLUDE, -I$prefix/include) - AC_SUBST(BRUNSLI_LIB, "-lbrunslienc-c -lbrunslidec-c") -fi - -dnl --------------------------------------------------------------------------- -dnl QB3 support -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(QB3,[ --with-QB3 Include QB3 support for MRF],,) - -QB3_ENABLED=no - -if test "$with_QB3" != "" -a "$with_QB3" != "no" ; then - QB3_ENABLED="yes" - AC_SUBST(QB3_ENABLED, $QB3_ENABLED) - AC_SUBST(QB3_INCLUDE, -I$prefix/include) - AC_SUBST(QB3_LIB, "-lQB3") -fi - - -dnl --------------------------------------------------------------------------- -dnl RDB support -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(rdb,[ --with-rdb[=ARG] Include RDB support (ARG=no, yes or RDB SDK root path)],,) - -RDB_SETTING=no - -if test "$with_rdb" = "yes" -o "$with_rdb" = "" ; then - - AC_CHECK_LIB(rdb,rdb_library_name,RDB_SETTING=yes,RDB_SETTING=no,) - - if test "$RDB_SETTING" = "yes" ; then - LIBS="-lrdb $LIBS" - else - echo "librdb not found - RDB support disabled" - fi - -elif test "$with_rdb" != "no" -a "$with_rdb" != ""; then - - AC_CHECK_LIB(rdb,rdb_library_name,RDB_SETTING=yes,RDB_SETTING=no,-L$with_rdb/library -lrdb) - - if test "$RDB_SETTING" = "yes" ; then - LIBS="-L$with_rdb/library -lrdb $LIBS" - EXTRA_INCLUDES="-I$with_rdb/interface/cpp/ -I$with_rdb/interface/c/ $EXTRA_INCLUDES" - else - echo "librdb not found - RDB support disabled" - fi - -fi - -AC_SUBST(RDB_SETTING,$RDB_SETTING) - -if test "$RDB_SETTING" != "no" ; then - OPT_GDAL_FORMATS="rdb $OPT_GDAL_FORMATS" -fi - - -dnl --------------------------------------------------------------------------- -dnl Armadillo support -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(armadillo,[ --with-armadillo=ARG Include Armadillo support for faster TPS transform computation (ARG=yes/no/path to armadillo install root) [[default=no]]],,) - -AC_MSG_CHECKING([whether we should include Armadillo support]) - -HAVE_ARMADILLO=no - -if test "$with_armadillo" = "yes" ; then - rm -f testarmadillo.* - rm -f testarmadillo - echo '#include ' > testarmadillo.cpp - echo 'int main(int argc, char** argv) { arma::mat matInput(2,2); const arma::mat& matInv = arma::inv(matInput); return 0; } ' >> testarmadillo.cpp - if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} testarmadillo.cpp -o testarmadillo -larmadillo 2>&1`" ; then - HAVE_ARMADILLO=yes - LIBS="-larmadillo ${LIBS}" - AC_MSG_RESULT([yes]) - else - dnl Try adding -llapack (#4923) - if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} testarmadillo.cpp -o testarmadillo -larmadillo -llapack 2>&1`" ; then - HAVE_ARMADILLO=yes - LIBS="-larmadillo -llapack ${LIBS}" - AC_MSG_RESULT([yes]) - else - # clang 3.4 needs linking against libstdc++ (ubuntu 14.04) - if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} testarmadillo.cpp -o testarmadillo -larmadillo -lstdc++ 2>&1`" ; then - HAVE_ARMADILLO=yes - LIBS="-larmadillo -lstdc++ ${LIBS}" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - fi - fi - rm -f testarmadillo.* - rm -f testarmadillo - -elif test -n "$with_armadillo" -a "$with_armadillo" != "no" ; then - - rm -f testarmadillo.* - rm -f testarmadillo - echo '#include ' > testarmadillo.cpp - echo 'int main(int argc, char** argv) { arma::mat matInput(2,2); const arma::mat& matInv = arma::inv(matInput); return 0; } ' >> testarmadillo.cpp - if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} -I$with_armadillo/include testarmadillo.cpp -o testarmadillo -L$with_armadillo/lib -larmadillo 2>&1`" ; then - HAVE_ARMADILLO=yes - LIBS="-L$with_armadillo/lib -larmadillo ${LIBS}" - EXTRA_INCLUDES="-I$with_armadillo/include $EXTRA_INCLUDES" - AC_MSG_RESULT([yes]) - else - dnl Try adding -llapack (#4923) - if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} -I$with_armadillo/include testarmadillo.cpp -o testarmadillo -L$with_armadillo/lib -larmadillo -llapack 2>&1`" ; then - HAVE_ARMADILLO=yes - LIBS="-L$with_armadillo/lib -larmadillo -llapack ${LIBS}" - EXTRA_INCLUDES="-I$with_armadillo/include $EXTRA_INCLUDES" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - fi - rm -f testarmadillo.* - rm -f testarmadillo - -else - AC_MSG_RESULT([no]) -fi - -AC_SUBST(HAVE_ARMADILLO,$HAVE_ARMADILLO) - -dnl --------------------------------------------------------------------------- -dnl libcryptopp -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(cryptopp,[ --with-cryptopp[=ARG] Include cryptopp support (ARG=yes, no or path)],,) - -HAVE_CRYPTOPP=no -USE_ONLY_CRYPTODLL_ALG=yes - -AC_MSG_CHECKING([for cryptopp]) - -if test "$with_cryptopp" = "no" ; then - - AC_MSG_RESULT([disabled]) - -elif test "$with_cryptopp" = "yes" -o "$with_cryptopp" = "" ; then - - rm -f testcryptopp.* - echo '#include ' > testcryptopp.cpp - # Catch issue with clang++ (https://groups.google.com/forum/#!topic/cryptopp-users/DfWHy3bT0KI) - echo '#include ' >> testcryptopp.cpp - echo 'int main(int argc, char** argv) { CryptoPP::AES::Encryption oEnc; return 0; } ' >> testcryptopp.cpp - ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} testcryptopp.cpp -o testcryptopp -lcryptopp 2>/dev/null - RETVAL=$? - if test $RETVAL -eq 0; then - HAVE_CRYPTOPP=yes - LIBS="-lcryptopp ${LIBS}" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - if test "$with_cryptopp" = "yes"; then - AC_MSG_ERROR([--with-cryptopp was requested, but not available]) - fi - fi - rm -f testcryptopp.* - rm -f testcryptopp - - if test "$HAVE_CRYPTOPP" = "yes"; then - - AC_MSG_CHECKING([if cryptopp has all cipher methods builtin]) - rm -f testcryptopp.* - echo '#include ' > testcryptopp.cpp - echo 'int main(int argc, char** argv) { CryptoPP::Blowfish::Encryption oEnc; return 0; } ' >> testcryptopp.cpp - ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} testcryptopp.cpp -o testcryptopp -lcryptopp 2>/dev/null - RETVAL=$? - if test $RETVAL -eq 0; then - USE_ONLY_CRYPTODLL_ALG=no - AC_MSG_RESULT([yes]) - else - USE_ONLY_CRYPTODLL_ALG=yes - AC_MSG_RESULT([no]) - fi - rm -f testcryptopp.* - rm -f testcryptopp - fi - -else - - rm -f testcryptopp.* - echo '#include ' > testcryptopp.cpp - # Catch issue with clang++ (https://groups.google.com/forum/#!topic/cryptopp-users/DfWHy3bT0KI) - echo '#include ' >> testcryptopp.cpp - echo 'int main(int argc, char** argv) { CryptoPP::AES::Encryption oEnc; return 0; } ' >> testcryptopp.cpp - ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} testcryptopp.cpp -I$with_cryptopp/include -o testcryptopp -L$with_cryptopp/lib -lcryptopp 2>/dev/null - RETVAL=$? - if test $RETVAL -eq 0; then - HAVE_CRYPTOPP=yes - LIBS="-L$with_cryptopp/lib -lcryptopp ${LIBS}" - EXTRA_INCLUDES="-I$with_cryptopp/include $EXTRA_INCLUDES" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - rm -f testcryptopp.* - rm -f testcryptopp - - if test "$HAVE_CRYPTOPP" = "yes"; then - - AC_MSG_CHECKING([if cryptopp has all cipher methods builtin]) - rm -f testcryptopp.* - echo '#include ' > testcryptopp.cpp - echo 'int main(int argc, char** argv) { CryptoPP::Blowfish::Encryption oEnc; return 0; } ' >> testcryptopp.cpp - ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} testcryptopp.cpp -I$with_cryptopp/include -o testcryptopp -L$with_cryptopp/lib -lcryptopp 2>/dev/null - RETVAL=$? - if test $RETVAL -eq 0; then - USE_ONLY_CRYPTODLL_ALG=no - AC_MSG_RESULT([yes]) - else - USE_ONLY_CRYPTODLL_ALG=yes - AC_MSG_RESULT([no]) - fi - rm -f testcryptopp.* - rm -f testcryptopp - fi - -fi - -AC_SUBST(HAVE_CRYPTOPP,$HAVE_CRYPTOPP) -AC_SUBST(USE_ONLY_CRYPTODLL_ALG,$USE_ONLY_CRYPTODLL_ALG) - -dnl --------------------------------------------------------------------------- -dnl crypto -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(crypto,[ --with-crypto[=ARG] Include crypto (from openssl) support (ARG=yes, no or path)],,) - -HAVE_OPENSSL_CRYPTO=no - -AC_MSG_CHECKING([for crypto]) - -if test "$with_crypto" = "no" ; then - - AC_MSG_RESULT([disabled]) - -elif test "$with_crypto" = "yes" -o \( "$with_crypto" = "" -a "$HAVE_CRYPTOPP" = "no" \) ; then - - AC_CHECK_LIB(crypto,EVP_sha256,HAVE_OPENSSL_CRYPTO=yes) - if test "$HAVE_OPENSSL_CRYPTO" = "yes"; then - AC_CHECK_HEADERS([openssl/bio.h]) - if test "$ac_cv_header_openssl_bio_h" = "no"; then - HAVE_OPENSSL_CRYPTO=no - else - LIBS="-lcrypto $LIBS" - fi - fi -fi - -AC_SUBST(HAVE_OPENSSL_CRYPTO,$HAVE_OPENSSL_CRYPTO) - -dnl --------------------------------------------------------------------------- -dnl Whether to include LERC in the build -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(lerc, - [ --with-lerc[=ARG] Include libLerc support(ARG=yes/no/internal/path). Used by internal libtiff and MRF.],,,) - -HAVE_LERC=no -AC_MSG_CHECKING([for LERC]) -if test "$with_lerc" = "internal"; then - if test "$ac_cv_c_bigendian" = "yes"; then - AC_MSG_RESULT([disabled on big-endian]) - else - HAVE_LERC=internal - AC_MSG_RESULT([enabled, internal]) - fi -elif test "$with_lerc" = "no"; then - HAVE_LERC=no - AC_MSG_RESULT([disabled by user]) -elif test "$with_lerc" = "yes" -o "x$with_lerc" = "x" ; then - lerc_lib_name="LercLib" - AC_CHECK_LIB("$lerc_lib_name", lerc_decode, [lerc_lib=yes], [lerc_lib=no],) - if test "$lerc_lib" = "no" ; then - lerc_lib_name="Lerc" - AC_CHECK_LIB("$lerc_lib_name", lerc_decode, [lerc_lib=yes], [lerc_lib=no],) - fi - if test "$lerc_lib" = "no" -a "$with_lerc" = "yes"; then - AC_MSG_ERROR([lerc library not found]) - fi - - AC_CHECK_HEADER(Lerc_c_api.h, [lerc_c_api_h=yes], [lerc_c_api_h=no]) - if test "$lerc_c_api_h" = "no" -a "$with_lerc" = "yes"; then - AC_MSG_ERROR([Liblerc headers not found]) - fi - - if test "$lerc_lib" = "yes" -a "$lerc_c_api_h" = "yes"; then - HAVE_LERC=external - LIBS="$LIBS -l$lerc_lib_name" - else - if test "$ac_cv_c_bigendian" = "yes"; then - AC_MSG_RESULT([disabled on big-endian]) - else - HAVE_LERC=internal - AC_MSG_RESULT([enabled, internal]) - fi - fi -else - - ORIG_LIBS="$LIBS" - LIBS="-L$with_lerc/lib $LIBS" - lerc_lib_name="LercLib" - AC_CHECK_LIB("$lerc_lib_name", lerc_decode, [lerc_lib=yes], [lerc_lib=no],) - if test "$lerc_lib" = "no" ; then - lerc_lib_name="Lerc" - AC_CHECK_LIB("$lerc_lib_name", lerc_decode, [lerc_lib=yes], [lerc_lib=no],) - fi - if test "$lerc_lib" = "no"; then - AC_MSG_ERROR([lerc library not found]) - fi - - LIBS="-L$with_lerc/lib -l$lerc_lib_name $ORIG_LIBS" - - if ! test -f "$with_lerc/include/Lerc_c_api.h"; then - AC_MSG_ERROR([Liblerc headers not found]) - fi - - HAVE_LERC=external - LERC_INCLUDE="-I$with_lerc/include" -fi - -AC_SUBST(HAVE_LERC,$HAVE_LERC) -AC_SUBST(LERC_INCLUDE,$LERC_INCLUDE) - -dnl --------------------------------------------------------------------------- -dnl Whether to include NULL driver in the build -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH([null], - AS_HELP_STRING([--with-null], - [Enable NULL driver (only useful for development purposes]),,) - -AC_MSG_CHECKING([for NULL]) -if test "$with_null" = "yes" ; then - OPT_GDAL_FORMATS="null $OPT_GDAL_FORMATS" - AC_MSG_RESULT([enabled]) -else - AC_MSG_RESULT([disabled]) -fi - -dnl --------------------------------------------------------------------------- -dnl Detect OpenEXR -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(exr,[ --with-exr Include EXR support via OpenEXR library],,) - -HAVE_EXR=no -EXR_CFLAGS="" - -if test "$with_exr" = "no" ; then - - AC_MSG_NOTICE([EXR support disabled.]) - -else - - PKG_PROG_PKG_CONFIG([0.21]) - PKG_CHECK_MODULES([EXR], [OpenEXR >= 2.2], [HAVE_EXR=yes], [HAVE_EXR=no]) - - if test -n "$EXR_CFLAGS"; then - - # Test that the package found is for the right architecture - saved_LIBS="$LIBS" - LIBS="$EXR_LIBS" - AC_CHECK_LIB(IlmImf,ImfTiledInputReadTile, [HAVE_EXR=yes], [HAVE_EXR=no]) - if test "$HAVE_EXR" = "no"; then - dnl Try with OpenEXR >= 3 name - AC_CHECK_LIB(OpenEXR,ImfTiledInputReadTile, [HAVE_EXR=yes], [HAVE_EXR=no]) - fi - LIBS="$saved_LIBS" - - if test "$HAVE_EXR" = "yes"; then - OPT_GDAL_FORMATS="exr $OPT_GDAL_FORMATS" - LIBS="$EXR_LIBS $LIBS" - else - EXR_CFLAGS="" - fi - fi -fi - -AC_SUBST(EXR_CFLAGS,$EXR_CFLAGS) - -dnl --------------------------------------------------------------------------- -dnl Detect libheif -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(heif,[ --with-heif Include HEIF support via libheif library],,) - -HAVE_HEIF=no -HEIF_CFLAGS="" - -if test "$with_heif" = "no" ; then - - AC_MSG_NOTICE([HEIF support disabled.]) - -else - - PKG_PROG_PKG_CONFIG([0.21]) - PKG_CHECK_MODULES([HEIF], [libheif >= 1.1], [], [HAVE_HEIF=no]) - - if test -n "$HEIF_LIBS"; then - - # Test that the package found is for the right architecture - saved_LIBS="$LIBS" - LIBS="$HEIF_LIBS" - AC_CHECK_LIB(heif,heif_context_get_list_of_top_level_image_IDs, [HAVE_HEIF=yes], [HAVE_HEIF=no]) - LIBS="$saved_LIBS" - - if test "$HAVE_HEIF" = "yes"; then - OPT_GDAL_FORMATS="heif $OPT_GDAL_FORMATS" - LIBS="$HEIF_LIBS $LIBS" - else - HEIF_CFLAGS="" - fi - fi -fi - -AC_SUBST(HEIF_CFLAGS,$HEIF_CFLAGS) - -dnl --------------------------------------------------------------------------- -dnl Detect libjxl -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(jxl,[ --with-jxl Include JPEG-XL support via libjxl library, requires an internal libtiff.],,) - -HAVE_JXL=no - -if test "$TIFF_SETTING" != "internal" -o "$with_jxl" = "no" ; then - - AC_MSG_NOTICE([JXL support disabled.]) - -else - - PKG_PROG_PKG_CONFIG([0.21]) - PKG_CHECK_MODULES([JXL], [libjxl], [], [HAVE_JXL=no]) - - if test -n "$JXL_LIBS" ; then - - # Test that the package found is for the right architecture - saved_LIBS="$LIBS" - LIBS="$JXL_LIBS" - AC_CHECK_LIB(jxl,JxlEncoderOptionsCreate, [HAVE_JXL=yes], [HAVE_JXL=no]) - LIBS="$saved_LIBS" - - if test "$HAVE_JXL" = "yes"; then - LIBS="$JXL_LIBS $LIBS" - - AC_CHECK_LIB(jxl,JxlEncoderFrameSettingsSetOption, [HAVE_JxlEncoderFrameSettingsSetOption=yes], [HAVE_JxlEncoderFrameSettingsSetOption=no]) - if test "$HAVE_JxlEncoderFrameSettingsSetOption" = "yes"; then - JXL_CFLAGS="$JXL_CFLAGS -DHAVE_JxlEncoderFrameSettingsSetOption" - fi - fi - fi -fi - -AC_SUBST(HAVE_JXL,$HAVE_JXL) -AC_SUBST(JXL_CFLAGS,$JXL_CFLAGS) - -dnl --------------------------------------------------------------------------- -dnl Test if sprintf can be overloaded with _XOPEN_SOURCE being defined or other, -dnl includes being included before, which mingw64 4.8 doesn't like (#6390) -dnl --------------------------------------------------------------------------- - -AC_MSG_CHECKING([if sprintf can be overloaded for GDAL compilation]) -echo '#define _XOPEN_SOURCE' > testdeprecated.cpp -echo '#include ' >> testdeprecated.cpp -echo '#include ' >> testdeprecated.cpp -echo 'extern "C"' >> testdeprecated.cpp -echo '{' >> testdeprecated.cpp -echo 'int sprintf(char *str, const char* fmt, ...);' >> testdeprecated.cpp -echo '}' >> testdeprecated.cpp -${CXX} ${CXXFLAGS} ${CPPFLAGS} testdeprecated.cpp -c 2>/dev/null -RETVAL=$? -if test $RETVAL -eq 0; then - AC_MSG_RESULT([yes]) -else - CPPFLAGS="$CPPFLAGS -DDONT_DEPRECATE_SPRINTF" - AC_MSG_RESULT([no]) -fi -rm -f testdeprecated.* -rm -f testdeprecated - -dnl Use -municode for mingw -case "${host_os}" in - mingw32*) - AC_MSG_CHECKING([if mingw supports wmain]) - rm -f testwmain* - echo '#include ' > testwmain.cpp - echo '#include ' >> testwmain.cpp - echo 'extern "C" int wmain( int argc, wchar_t ** argv_w );' >> testwmain.cpp - echo 'extern "C" int wmain( int , wchar_t ** ) { return 0; } ' >> testwmain.cpp - ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} testwmain.cpp -o testwmain.exe -municode 2>/dev/null - RETVAL=$? - rm -f testwmain* - if test $RETVAL -eq 0; then - AC_MSG_RESULT([yes]) - CXXFLAGS="$CXXFLAGS -DSUPPORTS_WMAIN" - LDFLAGS="$LDFLAGS -municode" - else - AC_MSG_RESULT([no]) - fi - ;; - *) - ;; -esac - -AC_CONFIG_FILES([GDALmake.opt]) -AC_OUTPUT - -dnl --------------------------------------------------------------------------- -dnl Display configuration status -dnl --------------------------------------------------------------------------- - -LOC_MSG() -LOC_MSG([GDAL is now configured for ${host}]) -LOC_MSG() -LOC_MSG([ Installation directory: ${prefix}]) -LOC_MSG([ C compiler: ${CC} ${CFLAGS}]) -LOC_MSG([ C++ compiler: ${CXX} ${CXXFLAGS}]) -LOC_MSG([ C++14 support: ${CXX14_SUPPORT}]) -LOC_MSG() -LOC_MSG([ LIBTOOL support: ${with_libtool}]) -LOC_MSG() -LOC_MSG([ Armadillo support: ${HAVE_ARMADILLO}]) -LOC_MSG([ Blosc support: ${HAVE_BLOSC}]) -LOC_MSG([ CFITSIO support: ${FITS_SETTING}]) -LOC_MSG([ crypto/openssl support: ${HAVE_OPENSSL_CRYPTO}]) -LOC_MSG([ cryptopp support: ${HAVE_CRYPTOPP}]) -LOC_MSG([ cURL support (wms/wcs/...):${CURL_SETTING}]) -LOC_MSG([ DDS support: ${DDS_SETTING}]) -LOC_MSG([ ECW support: ${ECW_SETTING}]) -LOC_MSG([ Expat support: ${HAVE_EXPAT}]) -LOC_MSG([ EXR support: ${HAVE_EXR}]) -LOC_MSG([ FGDB support: ${FGDB_ENABLED}]) -LOC_MSG([ FreeXL support: ${HAVE_FREEXL}]) -LOC_MSG([ GEORASTER support: ${HAVE_GEORASTER}]) -LOC_MSG([ GEOS support: ${HAVE_GEOS}]) -LOC_MSG([ Google libkml support: ${HAVE_LIBKML}]) -LOC_MSG([ GTA support: ${GTA_SETTING}]) -LOC_MSG([ HDF4 support: ${HAVE_HDF4}]) -LOC_MSG([ HDF5 support: ${HAVE_HDF5}]) -LOC_MSG([ JXL support: ${HAVE_JXL}]) -LOC_MSG([ HDFS support: ${HDFS_ENABLED}]) -LOC_MSG([ HEIF support: ${HAVE_HEIF}]) -LOC_MSG([ INFORMIX DataBlade support:${HAVE_IDB}]) -LOC_MSG([ JP2Lura support: ${HAVE_JP2LURA}]) -LOC_MSG([ JPEG 12 bit: ${JPEG12_ENABLED}]) -LOC_MSG([ JPEG-in-TIFF 12 bit: ${TIFF_JPEG12_ENABLED}]) -LOC_MSG([ Kakadu support: ${HAVE_KAKADU}]) -LOC_MSG([ Kea support: ${HAVE_KEA}]) -LOC_MSG([ LERC support: ${HAVE_LERC}]) -LOC_MSG([ libbrunsli support: ${BRUNSLI_ENABLED}]) -LOC_MSG([ libdeflate support: ${LIBDEFLATE_SETTING}]) -LOC_MSG([ LIBGEOTIFF support: ${GEOTIFF_SETTING}]) -LOC_MSG([ LIBGIF support: ${GIF_SETTING}]) -LOC_MSG([ LIBJPEG support: ${JPEG_SETTING}]) -LOC_MSG([ LIBLZMA support: ${LIBLZMA_SETTING}]) -LOC_MSG([ LIBPNG support: ${PNG_SETTING}]) -LOC_MSG([ LIBTIFF support: ${TIFF_SETTING} (BigTIFF=${HAVE_BIGTIFF})]) -LOC_MSG([ libxml2 support: ${HAVE_LIBXML2}]) -LOC_MSG([ LIBZ support: ${LIBZ_SETTING}]) -LOC_MSG([ LZ4 support: ${HAVE_LZ4}]) -LOC_MSG([ MongoCXX v3 support: ${MONGOCXXV3_ENABLED}]) -LOC_MSG([ MrSID support: ${HAVE_MRSID}]) -LOC_MSG([ MSG support: ${HAVE_MSG}]) -LOC_MSG([ MySQL support: ${HAVE_MYSQL}]) -if test "$NETCDF_SETTING" = "yes" ; then - LOC_MSG([ NetCDF has netcdf_mem.h: ${NETCDF_MEM}]) -fi -LOC_MSG([ NetCDF support: ${NETCDF_SETTING}]) -LOC_MSG([ OCI support: ${HAVE_OCI}]) -LOC_MSG([ ODBC support: ${ODBC_SETTING}]) -LOC_MSG([ OGDI support: ${HAVE_OGDI}]) -LOC_MSG([ OpenCL support: ${OPENCL_SETTING}]) -LOC_MSG([ OpenJPEG support: ${HAVE_OPENJPEG}]) -LOC_MSG([ PCIDSK support: ${PCIDSK_SETTING}]) -LOC_MSG([ PCRaster support: ${PCRASTER_SETTING}]) -LOC_MSG([ PCRE support: ${HAVE_PCRE}]) -LOC_MSG([ PCRE2 support: ${HAVE_PCRE2}]) -LOC_MSG([ PDFium support: ${HAVE_PDFIUM}]) -LOC_MSG([ Podofo support: ${HAVE_PODOFO}]) -LOC_MSG([ Poppler support: ${HAVE_POPPLER}]) -LOC_MSG([ PostgreSQL support: ${HAVE_PG}]) -LOC_MSG([ QHull support: ${QHULL_SETTING}]) -LOC_MSG([ Rasdaman support: ${RASDAMAN_ENABLED}]) -LOC_MSG([ RasterLite2 support: ${HAVE_RASTERLITE2}]) -LOC_MSG([ RDB support: ${RDB_SETTING}]) -LOC_MSG([ SAP HANA support: ${HAVE_HANA}]) -LOC_MSG([ SFCGAL support: ${HAVE_SFCGAL}]) -LOC_MSG([ SOSI support: ${SOSI_ENABLED}]) -LOC_MSG([ SpatiaLite support: ${HAVE_SPATIALITE}]) -if test "x$SPATIALITE_SONAME" != "x"; then - LOC_MSG([ SpatiaLite shared obj name:${SPATIALITE_SONAME}]) -fi -LOC_MSG([ SQLite support: ${HAVE_SQLITE}]) -LOC_MSG([ Teigha (DWG and DGNv8): ${HAVE_TEIGHA}]) -LOC_MSG([ TileDB support: ${TILEDB_SETTING}]) -LOC_MSG([ userfaultfd support: ${ENABLE_UFFD}]) -LOC_MSG([ WebP support: ${WEBP_SETTING}]) -LOC_MSG([ Xerces-C support: ${HAVE_XERCES}]) -LOC_MSG([ ZSTD support: ${ZSTD_SETTING}]) - -LOC_MSG() -if test ! -z "`uname | grep Darwin`" ; then - LOC_MSG([ Mac OS X Framework : ${MACOSX_FRAMEWORK}]) -fi -LOC_MSG() -if test -z "$BINDINGS"; then - WHAT_BINDINGS="no" -else - WHAT_BINDINGS="$BINDINGS" -fi -LOC_MSG([ misc. gdal formats: ${GDALFORMATS_ENABLED}]) -LOC_MSG([ misc. ogr formats: ${OGRFORMATS_ENABLED}]) -LOC_MSG() -LOC_MSG([ disabled gdal formats: ${GDALFORMATS_DISABLED}]) -LOC_MSG([ disabled ogr formats: ${OGRFORMATS_DISABLED}]) -LOC_MSG() -LOC_MSG([ SWIG Bindings: ${WHAT_BINDINGS}]) -LOC_MSG() -LOC_MSG([ PROJ >= 6: yes]) -LOC_MSG([ enable GNM building: ${GNM_ENABLED}]) -LOC_MSG([ enable pthread support: ${PTHREAD_ENABLED}]) -LOC_MSG([ enable POSIX iconv support:${am_cv_func_iconv}]) -LOC_MSG([ hide internal symbols: ${HAVE_HIDE_INTERNAL_SYMBOLS}]) -LOC_MSG() - -if test "$HAVE_PODOFO" = "yes" -a "$HAVE_POPPLER" = "yes" -a "$HAVE_PDFIUM" = "yes"; then - AC_MSG_WARN([--with-podofo, --with-poppler and --with-pdfium available. This is unusual setup, but will work. Pdfium will be used by default...]) -elif test "$HAVE_PODOFO" = "yes" -a "$HAVE_POPPLER" = "yes" ; then - AC_MSG_WARN([--with-podofo and --with-poppler are both available. This is unusual setup, but will work. Poppler will be used by default...]) -elif test "$HAVE_POPPLER" = "yes" -a "$HAVE_PDFIUM" = "yes" ; then - AC_MSG_WARN([--with-poppler and --with-pdfium are both available. This is unusual setup, but will work. Pdfium will be used by default...]) -elif test "$HAVE_PODOFO" = "yes" -a "$HAVE_PDFIUM" = "yes" ; then - AC_MSG_WARN([--with-podofo and --with-pdfium are both available. This is unusual setup, but will work. Pdfium will be used by default...]) -fi - -if test "$HAVE_LIBXML2" = "yes" -a "$FGDB_ENABLED" = "yes"; then - AC_MSG_WARN([--with-libxml2 and --with-fgdb are both available. There might be some incompatibility between system libxml2 and the embedded copy within libFileGDBAPI]) -fi - -if test "$HAVE_CRYPTOPP" = "yes" -a "$HAVE_OPENSSL_CRYPTO" = "yes"; then - AC_MSG_WARN([--with-crypto and --with-cryptopp available. This is unusual setup, but will work.]) -fi - -if test "$HAVE_TEIGHA" = "yes" -a "$ECW_54" = "yes"; then - AC_MSG_WARN([Both Teigha SDK and ECW SDK >= 5.4 found. This was found to cause crashes in ECW driver.]) -fi - -AC_MSG_NOTICE([]) -AC_MSG_NOTICE([]) -AC_MSG_WARN([Starting with GDAL 3.5, the autoconf build system is deprecated in favor of the CMake build system. The autoconf build system will be completely removed in GDAL 3.6]) diff --git a/doc/source/conf.py b/doc/source/conf.py index 30f5093863b6..2c7354b05cd7 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -54,6 +54,7 @@ 'setup.py', 'get_python_lib.py', 'get_suffix.py', + 'setup_fallback_mingw.py', ] apidoc_separate_modules = True diff --git a/frmts/GNUmakefile b/frmts/GNUmakefile deleted file mode 100644 index 3bf3b5be751a..000000000000 --- a/frmts/GNUmakefile +++ /dev/null @@ -1,34 +0,0 @@ - - -include ../GDALmake.opt - -OBJ = o/gdalallregister.o - -FRMT_FLAGS = $(foreach FRMT, $(GDAL_FORMATS), -DFRMT_$(FRMT)) - -ifeq ($(GNM_ENABLED),yes) - GDAL_INCLUDE += -iquote $(GDAL_ROOT)/gnm -iquote $(GDAL_ROOT)/gnm/gnm_frmts - CXXFLAGS += -DGNM_ENABLED -endif - -%-install-obj: - $(MAKE) -C $* install-obj - -default: $(OBJ:.o=.$(OBJ_EXT)) $(foreach d,$(GDAL_FORMATS),$(d)-install-obj) - -clean: $(foreach d,$(GDAL_FORMATS),$(d)-clean) - rm -f *.o o/*.o o/*.a - $(RM) o/*.lo - -o/gdalallregister.$(OBJ_EXT): gdalallregister.cpp ../GDALmake.opt - $(CXX) -c $(GDAL_INCLUDE) $(CPPFLAGS) $(CXXFLAGS) $(FRMT_FLAGS) \ - -DGDAL_FORMATS="$(GDAL_FORMATS)" \ - gdalallregister.cpp -o o/gdalallregister.$(OBJ_EXT) - -# We might want to add dynamically generated drivers here eventually. -install: - $(MAKE) -C vrt install - $(MAKE) -C mem install - $(MAKE) -C raw install - $(INSTALL_DIR) $(DESTDIR)$(INST_LIB)/gdalplugins - $(INSTALL_DATA) drivers.ini $(DESTDIR)$(INST_LIB)/gdalplugins diff --git a/frmts/aaigrid/GNUmakefile b/frmts/aaigrid/GNUmakefile deleted file mode 100644 index 9f087669baab..000000000000 --- a/frmts/aaigrid/GNUmakefile +++ /dev/null @@ -1,15 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = aaigriddataset.o - -CPPFLAGS := $(CPPFLAGS) $(XTRA_OPT) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o - -all: $(OBJ:.o=.$(OBJ_EXT)) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/aaigrid/makefile.vc b/frmts/aaigrid/makefile.vc deleted file mode 100644 index ebde922ba0c6..000000000000 --- a/frmts/aaigrid/makefile.vc +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = aaigriddataset.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/adrg/GNUmakefile b/frmts/adrg/GNUmakefile deleted file mode 100644 index ed5b37ddb8a3..000000000000 --- a/frmts/adrg/GNUmakefile +++ /dev/null @@ -1,14 +0,0 @@ - - -include ../../GDALmake.opt - -OBJ = adrgdataset.o srpdataset.o - -CPPFLAGS := $(CPPFLAGS) -iquote ../iso8211 - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/adrg/makefile.vc b/frmts/adrg/makefile.vc deleted file mode 100644 index 4bfea93a4bf8..000000000000 --- a/frmts/adrg/makefile.vc +++ /dev/null @@ -1,16 +0,0 @@ - -OBJ = adrgdataset.obj srpdataset.obj - -EXTRAFLAGS = -I..\iso8211 - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - - diff --git a/frmts/aigrid/GNUmakefile b/frmts/aigrid/GNUmakefile deleted file mode 100644 index b7b24c7c5532..000000000000 --- a/frmts/aigrid/GNUmakefile +++ /dev/null @@ -1,31 +0,0 @@ - -include ../../GDALmake.opt - -AIGOBJ = gridlib.o aigopen.o aigccitt.o -OBJ = aigdataset.o $(AIGOBJ) - -CPPFLAGS := $(CPPFLAGS) -iquote ../../ogr/ogrsf_frmts/avc -iquote ../../ogr/ogrsf_frmts/shape - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o aitest$(EXE) $(OBJ) $(O_OBJ) - -aitest$(EXE): aitest.$(OBJ_EXT) - $(LD) $(LDFLAGS) aitest.$(OBJ_EXT) $(CONFIG_LIBS) -o aitest$(EXE) - -aigrid2tif$(EXE): aigrid2tif.$(OBJ_EXT) - $(LD) $(LDFLAGS) aigrid2tif.$(OBJ_EXT) $(CONFIG_LIBS) -o aigrid2tif$(EXE) - -$(OBJ) $(O_OBJ): aigrid.h - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) - -aitest-dist: - rm -rf aitest_dist - mkdir aitest_dist - cp gridlib.c aitest.c aigrid.h aigopen.c aigccitt.c aitest_dist - cp ../../port/cpl_{vsisimple,conv,error}.cpp aitest_dist - cp ../../port/cpl_{port,conv,vsi,config,error}.h aitest_dist - cp Makefile.dist aitest_dist/Makefile - diff --git a/frmts/aigrid/makefile.vc b/frmts/aigrid/makefile.vc deleted file mode 100644 index e372d1544bfd..000000000000 --- a/frmts/aigrid/makefile.vc +++ /dev/null @@ -1,21 +0,0 @@ - -OBJ = aigdataset.obj aigopen.obj gridlib.obj aigccitt.obj - -EXTRAFLAGS = -I../../ogr/ogrsf_frmts/avc -I../../ogr/ogrsf_frmts/shape - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -all: $(OBJ) aitest.exe - -aitest.exe: $(OBJ) aitest.c - $(CC) $(CFLAGS) aitest.c aigopen.obj gridlib.obj \ - $(GDAL_ROOT)/port/cpl.lib - -clean: - -del *.obj - diff --git a/frmts/airsar/GNUmakefile b/frmts/airsar/GNUmakefile deleted file mode 100644 index 7db8f8bbf8a8..000000000000 --- a/frmts/airsar/GNUmakefile +++ /dev/null @@ -1,13 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = airsardataset.o - - - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/airsar/makefile.vc b/frmts/airsar/makefile.vc deleted file mode 100644 index f4618f83ee76..000000000000 --- a/frmts/airsar/makefile.vc +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = airsardataset.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/arg/GNUmakefile b/frmts/arg/GNUmakefile deleted file mode 100644 index 64288899876a..000000000000 --- a/frmts/arg/GNUmakefile +++ /dev/null @@ -1,14 +0,0 @@ - - -include ../../GDALmake.opt - -OBJ = argdataset.o - -CPPFLAGS := -iquote ../../ogr/ogrsf_frmts/geojson $(JSON_INCLUDE) $(CPPFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/arg/makefile.vc b/frmts/arg/makefile.vc deleted file mode 100644 index e39b569180f6..000000000000 --- a/frmts/arg/makefile.vc +++ /dev/null @@ -1,15 +0,0 @@ - -OBJ = argdataset.obj - -EXTRAFLAGS = -I..\..\ogr\ogrsf_frmts\geojson -I../../ogr/ogrsf_frmts/geojson/libjson - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/blx/GNUmakefile b/frmts/blx/GNUmakefile deleted file mode 100644 index 5397e5ceb42f..000000000000 --- a/frmts/blx/GNUmakefile +++ /dev/null @@ -1,15 +0,0 @@ - -include ../../GDALmake.opt - -XTRA_OPT = -DGDALDRIVER - -OBJ = blxdataset.o blx.o - -CPPFLAGS := $(XTRA_OPT) $(CPPFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/blx/makefile.vc b/frmts/blx/makefile.vc deleted file mode 100644 index dc5e4d68e046..000000000000 --- a/frmts/blx/makefile.vc +++ /dev/null @@ -1,15 +0,0 @@ - -OBJ = blxdataset.obj blx.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -EXTRAFLAGS = -I. -DGDALDRIVER - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/bmp/GNUmakefile b/frmts/bmp/GNUmakefile deleted file mode 100644 index 756ed584a2da..000000000000 --- a/frmts/bmp/GNUmakefile +++ /dev/null @@ -1,13 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = bmpdataset.o - - - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/bmp/makefile.vc b/frmts/bmp/makefile.vc deleted file mode 100644 index 616045869960..000000000000 --- a/frmts/bmp/makefile.vc +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = bmpdataset.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/bsb/GNUmakefile b/frmts/bsb/GNUmakefile deleted file mode 100644 index 6eae96a5a688..000000000000 --- a/frmts/bsb/GNUmakefile +++ /dev/null @@ -1,37 +0,0 @@ - - -VERSION = 1.3 - -include ../../GDALmake.opt - -OBJ = bsb_read.o bsbdataset.o - -DISTDIR = bsb-$(VERSION) - - - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -bsb2raw$(EXE): bsb2raw.$(OBJ_EXT) - $(LD) $(LDFLAGS) bsb2raw.$(OBJ_EXT) $(CONFIG_LIBS) -o bsb2raw$(EXE) - - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) - -dist: - rm -rf $(DISTDIR) - mkdir $(DISTDIR) - cp *.cpp *.c *.h $(DISTDIR) - rm $(DISTDIR)/bsbdataset.cpp - cp Makefile.dist $(DISTDIR)/Makefile - cp README.dist $(DISTDIR)/README - cp ../../port/{cpl_error*,cpl_port*,cpl_string*} $(DISTDIR) - cp ../../port/{cpl_vsisimple.cpp,cpl_config.h.in} $(DISTDIR) - cp ../../port/{cpl_vsi.h,cpl_conv.*,cpl_path.cpp} $(DISTDIR) - cp ../../port/cpl_config.h.in $(DISTDIR)/cpl_config.h - rm $(DISTDIR)/*.o - tar czf $(DISTDIR).tar.gz $(DISTDIR) - zip -r $(DISTDIR).zip $(DISTDIR) diff --git a/frmts/bsb/makefile.vc b/frmts/bsb/makefile.vc deleted file mode 100644 index c9159b94bd89..000000000000 --- a/frmts/bsb/makefile.vc +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = bsbdataset.obj bsb_read.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/cals/GNUmakefile b/frmts/cals/GNUmakefile deleted file mode 100644 index cf18e101529f..000000000000 --- a/frmts/cals/GNUmakefile +++ /dev/null @@ -1,17 +0,0 @@ -GDAL_ROOT = ../.. - -include $(GDAL_ROOT)/GDALmake.opt - -OBJ = calsdataset.o - -ifeq ($(TIFF_SETTING),internal) -CPPFLAGS := -I../gtiff/libtiff $(CPPFLAGS) -endif - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) - diff --git a/frmts/cals/makefile.vc b/frmts/cals/makefile.vc deleted file mode 100644 index 9993c0aa1a10..000000000000 --- a/frmts/cals/makefile.vc +++ /dev/null @@ -1,15 +0,0 @@ -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -OBJ = calsdataset.obj - -EXTRAFLAGS = -I..\gtiff\libtiff - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - cd .. - -clean: - -del *.obj - cd .. diff --git a/frmts/ceos/GNUmakefile b/frmts/ceos/GNUmakefile deleted file mode 100644 index 9730a2feca74..000000000000 --- a/frmts/ceos/GNUmakefile +++ /dev/null @@ -1,17 +0,0 @@ - - -include ../../GDALmake.opt - -OBJ = ceosopen.o ceosdataset.o - - - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -ceostest$(EXE): ceostest.$(OBJ_EXT) - $(LD) $(LDFLAGS) ceostest.$(OBJ_EXT) $(CONFIG_LIBS) -o ceostest$(EXE) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/ceos/makefile.vc b/frmts/ceos/makefile.vc deleted file mode 100644 index 4b305e48268b..000000000000 --- a/frmts/ceos/makefile.vc +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = ceosopen.obj ceosdataset.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/ceos2/GNUmakefile b/frmts/ceos2/GNUmakefile deleted file mode 100644 index 08bb1a305936..000000000000 --- a/frmts/ceos2/GNUmakefile +++ /dev/null @@ -1,18 +0,0 @@ - - -OBJ = sar_ceosdataset.o \ - ceosrecipe.o ceossar.o ceos.o link.o - -include ../../GDALmake.opt - - -CPPFLAGS := $(CPPFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -$(O_OBJ): ../../gcore/rawdataset.h - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/ceos2/makefile.vc b/frmts/ceos2/makefile.vc deleted file mode 100644 index 62e0028c3cb5..000000000000 --- a/frmts/ceos2/makefile.vc +++ /dev/null @@ -1,14 +0,0 @@ - -OBJ = sar_ceosdataset.obj \ - ceosrecipe.obj ceossar.obj ceos.obj link.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/coasp/GNUmakefile b/frmts/coasp/GNUmakefile deleted file mode 100644 index 14b6b0eb5ce1..000000000000 --- a/frmts/coasp/GNUmakefile +++ /dev/null @@ -1,13 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = coasp_dataset.o - -CPPFLAGS := $(CPPFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/coasp/makefile.vc b/frmts/coasp/makefile.vc deleted file mode 100644 index d0d3d95c6b89..000000000000 --- a/frmts/coasp/makefile.vc +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = coasp_dataset.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/cosar/GNUmakefile b/frmts/cosar/GNUmakefile deleted file mode 100644 index 0f4e20f15bc7..000000000000 --- a/frmts/cosar/GNUmakefile +++ /dev/null @@ -1,13 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = cosar_dataset.o - - - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/cosar/makefile.vc b/frmts/cosar/makefile.vc deleted file mode 100644 index 45537b42377c..000000000000 --- a/frmts/cosar/makefile.vc +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = cosar_dataset.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/ctg/GNUmakefile b/frmts/ctg/GNUmakefile deleted file mode 100644 index 8f9185cfce59..000000000000 --- a/frmts/ctg/GNUmakefile +++ /dev/null @@ -1,15 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = ctgdataset.o - -CPPFLAGS := $(CPPFLAGS) $(XTRA_OPT) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o - -all: $(OBJ:.o=.$(OBJ_EXT)) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/ctg/makefile.vc b/frmts/ctg/makefile.vc deleted file mode 100644 index efc3d2a59ead..000000000000 --- a/frmts/ctg/makefile.vc +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = ctgdataset.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/daas/GNUmakefile b/frmts/daas/GNUmakefile deleted file mode 100644 index 84771d6ddc20..000000000000 --- a/frmts/daas/GNUmakefile +++ /dev/null @@ -1,13 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = daasdataset.o - -CPPFLAGS := -iquote ../../ogr/ogrsf_frmts/geojson $(JSON_INCLUDE) $(CPPFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(OBJ) $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/daas/makefile.vc b/frmts/daas/makefile.vc deleted file mode 100644 index f7156352a434..000000000000 --- a/frmts/daas/makefile.vc +++ /dev/null @@ -1,16 +0,0 @@ - -OBJ = daasdataset.obj - -EXTRAFLAGS = $(CURL_CFLAGS) $(CURL_INC) -I..\..\ogr\ogrsf_frmts\geojson -I../../ogr/ogrsf_frmts/geojson/libjson - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - -del *.dll diff --git a/frmts/dds/GNUmakefile b/frmts/dds/GNUmakefile deleted file mode 100644 index c432a2179f60..000000000000 --- a/frmts/dds/GNUmakefile +++ /dev/null @@ -1,24 +0,0 @@ -# $Id: GNUmakefile 16755 2009-04-09 20:38:33Z chaitanya $ -# -# Makefile to build dds using GNU Make and GCC. -# - -include ../../GDALmake.opt - -OBJ = ddsdataset.o - -CRUNCHINC = -I$(CRUNCHDIR)/include/crunch - -CPPFLAGS := $(XTRA_OPT) $(CRUNCHINC) $(CPPFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -../o/%.$(OBJ_EXT): - $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@ - -all: $(OBJ:.o=.$(OBJ_EXT)) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/dds/makefile.vc b/frmts/dds/makefile.vc deleted file mode 100644 index 77304eaf5863..000000000000 --- a/frmts/dds/makefile.vc +++ /dev/null @@ -1,15 +0,0 @@ - -OBJ = ddsdataset.obj - -GDAL_ROOT = ..\.. - -EXTRAFLAGS = $(CRUNCH_INC) - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/derived/GNUmakefile b/frmts/derived/GNUmakefile deleted file mode 100644 index 179f487c6cbf..000000000000 --- a/frmts/derived/GNUmakefile +++ /dev/null @@ -1,11 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = deriveddataset.o derivedlist.o - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/derived/makefile.vc b/frmts/derived/makefile.vc deleted file mode 100644 index 9a2d14af3289..000000000000 --- a/frmts/derived/makefile.vc +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = deriveddataset.obj derivedlist.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/dimap/GNUmakefile b/frmts/dimap/GNUmakefile deleted file mode 100644 index 434e41b5731a..000000000000 --- a/frmts/dimap/GNUmakefile +++ /dev/null @@ -1,17 +0,0 @@ -include ../../GDALmake.opt - -OBJ = dimapdataset.o - -CPPFLAGS := -iquote ../vrt $(CPPFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -$(OBJ) $(O_OBJ): ../vrt/vrtdataset.h - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) - -install: - $(INSTALL_DATA) memdataset.h $(DESTDIR)$(INST_INCLUDE) diff --git a/frmts/dimap/makefile.vc b/frmts/dimap/makefile.vc deleted file mode 100644 index c0da57628a6b..000000000000 --- a/frmts/dimap/makefile.vc +++ /dev/null @@ -1,15 +0,0 @@ - -OBJ = dimapdataset.obj - -GDAL_ROOT = ..\.. - -EXTRAFLAGS = -I..\vrt - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/dted/GNUmakefile b/frmts/dted/GNUmakefile deleted file mode 100644 index dc7242af982e..000000000000 --- a/frmts/dted/GNUmakefile +++ /dev/null @@ -1,17 +0,0 @@ - - -include ../../GDALmake.opt - -OBJ = dted_api.o dteddataset.o dted_create.o dted_ptstream.o - - - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) - -dted_test$(EXE): dted_test.$(OBJ_EXT) - $(LD) $(LDFLAGS) dted_test.$(OBJ_EXT) $(CONFIG_LIBS) -o dted_test$(EXE) diff --git a/frmts/dted/makefile.vc b/frmts/dted/makefile.vc deleted file mode 100644 index 0a695fa0e962..000000000000 --- a/frmts/dted/makefile.vc +++ /dev/null @@ -1,18 +0,0 @@ - -OBJ = dted_api.obj dteddataset.obj dted_create.obj dted_create.obj \ - dted_ptstream.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - -dted_test.exe: dted_test.obj $(OBJ) - cl dted_test.obj dted_api.obj dted_create.obj dted_ptstream.obj \ - ..\..\port\cpl.lib - diff --git a/frmts/ecw/GNUmakefile b/frmts/ecw/GNUmakefile deleted file mode 100644 index 0a723d718bca..000000000000 --- a/frmts/ecw/GNUmakefile +++ /dev/null @@ -1,23 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = ecwdataset.o ecwcreatecopy.o jp2userbox.o ecwasyncreader.o - -CPPFLAGS := -DFRMT_ecw $(CPPFLAGS) \ - $(ECW_FLAGS) $(ECW_INCLUDE) $(EXTRA_CFLAGS) -PLUGIN_SO = gdal_ECW_JP2ECW.so - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) *.so - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) - -$(OBJ) $(O_OBJ): gdal_ecw.h - -plugin: $(PLUGIN_SO) - -$(PLUGIN_SO): $(OBJ) - $(LD_SHARED) $(LNK_FLAGS) $(OBJ) $(CONFIG_LIBS) $(EXTRA_LIBS) \ - -o $(PLUGIN_SO) diff --git a/frmts/ecw/makefile.vc b/frmts/ecw/makefile.vc deleted file mode 100644 index 2f8c16a4e3bc..000000000000 --- a/frmts/ecw/makefile.vc +++ /dev/null @@ -1,44 +0,0 @@ - -EXTRAFLAGS = $(ECWFLAGS) -DFRMT_ecw - - -OBJ = ecwdataset.obj ecwcreatecopy.obj jp2userbox.obj \ - ecwasyncreader.obj - -PLUGIN_DLL = gdal_ECW_JP2ECW.dll - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - $(INSTALL) *.obj ..\o - -$(OBJ): gdal_ecw.h - -all: default testecw.exe - -clean: - -del *.obj - -del *.dll - -del *.exp - -del *.lib - -del *.manifest - -del *.exe - -testecw.exe: testecw.cpp - $(CC) /Zi /MD $(EXTRAFLAGS) testecw.cpp $(ECWLIB) - -ecw_example1.exe: ecw_example1.c - $(CC) /MD $(EXTRAFLAGS) ecw_example1.c $(ECWLIB) - -plugin: $(PLUGIN_DLL) - -$(PLUGIN_DLL): $(OBJ) - link /dll $(LDEBUG) /out:$(PLUGIN_DLL) $(OBJ) $(GDALLIB) $(ECWLIB) - if exist $(PLUGIN_DLL).manifest mt -manifest $(PLUGIN_DLL).manifest -outputresource:$(PLUGIN_DLL);2 - -plugin-install: - -mkdir $(PLUGINDIR) - $(INSTALL) $(PLUGIN_DLL) $(PLUGINDIR) - diff --git a/frmts/eeda/GNUmakefile b/frmts/eeda/GNUmakefile deleted file mode 100644 index eb8a5fd5e71d..000000000000 --- a/frmts/eeda/GNUmakefile +++ /dev/null @@ -1,13 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = eedacommon.o eedadataset.o eedaidataset.o - -CPPFLAGS := -iquote ../../ogr/ogrsf_frmts/geojson $(JSON_INCLUDE) $(CPPFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(OBJ) $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/eeda/makefile.vc b/frmts/eeda/makefile.vc deleted file mode 100644 index 3753b361d2ce..000000000000 --- a/frmts/eeda/makefile.vc +++ /dev/null @@ -1,16 +0,0 @@ - -OBJ = eedacommon.obj eedadataset.obj eedaidataset.obj - -EXTRAFLAGS = $(CURL_CFLAGS) $(CURL_INC) -I..\..\ogr\ogrsf_frmts\geojson -I../../ogr/ogrsf_frmts/geojson/libjson - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - -del *.dll diff --git a/frmts/elas/GNUmakefile b/frmts/elas/GNUmakefile deleted file mode 100644 index 5aa7258a2868..000000000000 --- a/frmts/elas/GNUmakefile +++ /dev/null @@ -1,14 +0,0 @@ - - -include ../../GDALmake.opt - -OBJ = elasdataset.o - - - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/elas/makefile.vc b/frmts/elas/makefile.vc deleted file mode 100644 index 87b546a0bd0a..000000000000 --- a/frmts/elas/makefile.vc +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = elasdataset.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/envisat/GNUmakefile b/frmts/envisat/GNUmakefile deleted file mode 100644 index 62de2f798b67..000000000000 --- a/frmts/envisat/GNUmakefile +++ /dev/null @@ -1,22 +0,0 @@ - -OBJ = EnvisatFile.o records.o adsrange.o unwrapgcps.o envisatdataset.o - -include ../../GDALmake.opt - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o - -all: $(OBJ:.o=.$(OBJ_EXT)) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) - -$(O_OBJ): ../../gcore/rawdataset.h - -envisat_dump: envisat_dump.$(OBJ_EXT) EnvisatFile.$(OBJ_EXT) - $(CC) $(CFLAGS) envisat_dump.$(OBJ_EXT) EnvisatFile.$(OBJ_EXT) $(GDAL_LIB) -ldl -lm -o envisat_dump - -dumpgeo: dumpgeo.$(OBJ_EXT) EnvisatFile.$(OBJ_EXT) - $(CC) $(CFLAGS) dumpgeo.$(OBJ_EXT) EnvisatFile.$(OBJ_EXT) $(GDAL_LIB) -ldl -lm -o dumpgeo - diff --git a/frmts/envisat/makefile.vc b/frmts/envisat/makefile.vc deleted file mode 100644 index 5cd041c9fba5..000000000000 --- a/frmts/envisat/makefile.vc +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = envisatdataset.obj EnvisatFile.obj records.obj adsrange.obj unwrapgcps.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/ers/GNUmakefile b/frmts/ers/GNUmakefile deleted file mode 100644 index 111ea2091ea6..000000000000 --- a/frmts/ers/GNUmakefile +++ /dev/null @@ -1,22 +0,0 @@ - - -include ../../GDALmake.opt - -OBJ = ersdataset.o ershdrnode.o - -CPPFLAGS := $(CPPFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) - -$(O_OBJ): ../../gcore/rawdataset.h - -plugin: gdal_ERS.so - -gdal_ERS.so: $(OBJ) - $(LD_SHARED) $(OBJ) $(GDAL_LIBS) $(LIBS) -o gdal_ERS.so - diff --git a/frmts/ers/makefile.vc b/frmts/ers/makefile.vc deleted file mode 100644 index a52ee50e2824..000000000000 --- a/frmts/ers/makefile.vc +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = ersdataset.obj ershdrnode.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/esric/GNUmakefile b/frmts/esric/GNUmakefile deleted file mode 100644 index dbb67571df5c..000000000000 --- a/frmts/esric/GNUmakefile +++ /dev/null @@ -1,25 +0,0 @@ -include ../../GDALmake.opt - -TARGET = esric - -FILES = $(TARGET)_dataset - -OBJ = $(FILES:=.$(OBJ_EXT)) - -PLUGIN_SO = gdal_ESRIC.$(SO_EXT) -PLUGINDIR = $(DESTDIR)$(INST_LIB)/gdalplugins - -default: $(OBJ) - -clean: - $(RM) $(O_OBJ) $(OBJ) $(PLUGIN_SO) - -install-obj: $(O_OBJ) - -plugin: $(PLUGIN_SO) - -$(PLUGIN_SO): $(OBJ) - $(LD) -o $@ -rpath $(PLUGINDIR) -module -avoid-version $^ - -install-plugin: $(PLUGIN_SO) - $(INSTALL) $^ $(PLUGINDIR) diff --git a/frmts/esric/makefile.vc b/frmts/esric/makefile.vc deleted file mode 100644 index f6d3cd7fd160..000000000000 --- a/frmts/esric/makefile.vc +++ /dev/null @@ -1,28 +0,0 @@ -GDAL_ROOT = ..\.. -!INCLUDE $(GDAL_ROOT)\nmake.opt - -OBJ = esric_dataset.obj - -PLUGIN_DLL = gdal_ESRIC.dll - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - -del *.dll - -del *.exp - -del *.lib - -del *.manifest - -del *.pdb - -del *.ilk - -plugin: $(PLUGIN_DLL) - -$(PLUGIN_DLL): $(OBJ) - link /dll $(LDEBUG) /out:$(PLUGIN_DLL) $(OBJ) $(GDALLIB) $(EXTRA_LINK_FLAGS) -# if exists $(PLUGIN_DLL).manifest mt -manifest $(PLUGIN_DLL).manifest -outputresource:$(PLUGIN_DLL);2 - -plugin-install: plugin - -mkdir $(PLUGINDIR) - $(INSTALL) $(PLUGIN_DLL) $(PLUGINDIR) diff --git a/frmts/exr/GNUmakefile b/frmts/exr/GNUmakefile deleted file mode 100644 index 25406d1b38f5..000000000000 --- a/frmts/exr/GNUmakefile +++ /dev/null @@ -1,13 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = exrdataset.o - -CPPFLAGS := $(EXR_CFLAGS) $(CPPFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/exr/makefile.vc b/frmts/exr/makefile.vc deleted file mode 100644 index d67cd32eeea1..000000000000 --- a/frmts/exr/makefile.vc +++ /dev/null @@ -1,16 +0,0 @@ - -OBJ = exrdataset.obj - -EXTRAFLAGS = $(OPENEXR_INC) - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - -del *.dll diff --git a/frmts/fit/GNUmakefile b/frmts/fit/GNUmakefile deleted file mode 100644 index d0055e503bc1..000000000000 --- a/frmts/fit/GNUmakefile +++ /dev/null @@ -1,15 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = fitdataset.o fit.o - -CPPFLAGS := $(XTRA_OPT) $(CPPFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o - -all: $(OBJ:.o=.$(OBJ_EXT)) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/fit/makefile.vc b/frmts/fit/makefile.vc deleted file mode 100644 index 795a73d2020d..000000000000 --- a/frmts/fit/makefile.vc +++ /dev/null @@ -1,14 +0,0 @@ - -OBJ = \ - fit.obj fitdataset.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/fits/GNUmakefile b/frmts/fits/GNUmakefile deleted file mode 100644 index 58588ae780bc..000000000000 --- a/frmts/fits/GNUmakefile +++ /dev/null @@ -1,15 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = fitsdataset.o - -FITS_OPTS = - -CPPFLAGS := $(FITS_OPTS) $(CPPFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/fits/makefile.vc b/frmts/fits/makefile.vc deleted file mode 100644 index 405c6520f12f..000000000000 --- a/frmts/fits/makefile.vc +++ /dev/null @@ -1,31 +0,0 @@ - -OBJ = fitsdataset.obj - -PLUGIN_DLL = gdal_FITS.dll - -EXTRAFLAGS = -I$(FITS_INC_DIR) - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - $(INSTALL) *.obj ..\o - -clean: - -del *.obj - -del *.dll - -del *.exp - -del *.lib - -del *.manifest - -plugin: $(PLUGIN_DLL) - -$(PLUGIN_DLL): $(OBJ) - link /dll $(LDEBUG) /out:$(PLUGIN_DLL) $(OBJ) $(GDALLIB) $(FITS_LIB) - if exist $(PLUGIN_DLL).manifest mt -manifest $(PLUGIN_DLL).manifest -outputresource:$(PLUGIN_DLL);2 - -plugin-install: - -mkdir $(PLUGINDIR) - $(INSTALL) $(PLUGIN_DLL) $(PLUGINDIR) - diff --git a/frmts/georaster/GNUmakefile b/frmts/georaster/GNUmakefile deleted file mode 100644 index 219e7a8c9bdc..000000000000 --- a/frmts/georaster/GNUmakefile +++ /dev/null @@ -1,41 +0,0 @@ -include ../../GDALmake.opt - -ifeq ($(LIBZ_SETTING),internal) - XTRA_OPT = -I../zlib -else - XTRA_OPT = -endif - -OBJ = georaster_dataset.o \ - georaster_rasterband.o \ - oci_wrapper.o \ - georaster_wrapper.o \ - cpl_vsil_ocilob.o - -CPPFLAGS := $(GDAL_INCLUDE) $(OCI_INCLUDE) $(XTRA_OPT) $(CPPFLAGS) -fPIC - -ifneq ($(JPEG_SETTING),no) -CPPFLAGS := $(CPPFLAGS) -DJPEG_SUPPORTED -endif - -ifeq ($(JPEG_SETTING),internal) -CPPFLAGS := $(CPPFLAGS) -I../jpeg/libjpeg -ifeq ($(RENAME_INTERNAL_LIBJPEG_SYMBOLS),yes) -CPPFLAGS := $(CPPFLAGS) -DRENAME_INTERNAL_LIBJPEG_SYMBOLS -endif -endif - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) *.so *.lo - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) - -PLUGIN_SO = gdal_GEOR.so - -plugin: $(PLUGIN_SO) - -$(PLUGIN_SO): $(OBJ) - $(LD_SHARED) $(LNK_FLAGS) $(OBJ) $(CONFIG_LIBS_INS) $(LIBS) \ - -o $(PLUGIN_SO) diff --git a/frmts/georaster/makefile.vc b/frmts/georaster/makefile.vc deleted file mode 100644 index 8702235c523b..000000000000 --- a/frmts/georaster/makefile.vc +++ /dev/null @@ -1,54 +0,0 @@ -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -OBJ = oci_wrapper.obj \ - georaster_dataset.obj \ - georaster_rasterband.obj \ - georaster_wrapper.obj \ - cpl_vsil_ocilob.obj - -PLUGIN_DLL = gdal_GEOR.dll - -!IFDEF JPEG_SUPPORTED -!IFDEF JPEG_EXTERNAL_LIB -JPEG_FLAGS = -I$(JPEGDIR) -DJPEG_SUPPORTED -!ELSE -JPEG_FLAGS = -I..\jpeg\libjpeg -DJPEG_SUPPORTED -JPEG_LIB = ..\jpeg\libjpeg\libjpeg.lib -!ENDIF -!ENDIF - -!IFDEF ZLIB_EXTERNAL_LIB -ZLIB_FLAGS = $(ZLIB_INC) -!ELSE -ZLIB_FLAGS = -I..\zlib -ZLIB_LIB = ..\zlib\*.obj -!ENDIF - -EXTRAFLAGS = $(OCI_INCLUDE) $(ZLIB_FLAGS) $(JPEG_FLAGS) - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - cd .. - -fastread: - cl $(OPTFLAGS) fastread.c $(OCI_INCLUDE) $(OCI_LIB) - -clean: - -del *.obj - -del *.dll - -del *.exp - -del *.lib - -del *.manifest - -plugin: $(PLUGIN_DLL) - -$(PLUGIN_DLL): $(OBJ) - link /dll $(LDEBUG) /out:$(PLUGIN_DLL) $(OBJ) $(GDALLIB) $(OCI_LIB) $(ZLIB_LIB) \ - ..\jpeg\vsidataio.obj $(JPEG_LIB) - if exist $(PLUGIN_DLL).manifest mt -manifest $(PLUGIN_DLL).manifest -outputresource:$(PLUGIN_DLL);2 - -plugin-install: - -mkdir $(PLUGINDIR) - $(INSTALL) $(PLUGIN_DLL) $(PLUGINDIR) diff --git a/frmts/gff/GNUmakefile b/frmts/gff/GNUmakefile deleted file mode 100644 index 2e4a360e8204..000000000000 --- a/frmts/gff/GNUmakefile +++ /dev/null @@ -1,14 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = gff_dataset.o - - - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) - diff --git a/frmts/gff/makefile.vc b/frmts/gff/makefile.vc deleted file mode 100644 index 48b8abcc170f..000000000000 --- a/frmts/gff/makefile.vc +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = gff_dataset.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/gif/GNUmakefile b/frmts/gif/GNUmakefile deleted file mode 100644 index c760656a3dfa..000000000000 --- a/frmts/gif/GNUmakefile +++ /dev/null @@ -1,28 +0,0 @@ - -include ../../GDALmake.opt - -ifeq ($(GIF_SETTING),internal) -XTRA_OPT = -Igiflib -DHAVE_STDINT_H -DHAVE_INTTYPES_H -OBJ = egif_lib.o dgif_lib.o gifalloc.o gif_err.o gif_hash.o \ - \ - gifdataset.o biggifdataset.o gifabstractdataset.o -else -OBJ = gifdataset.o biggifdataset.o gifabstractdataset.o -endif - -CPPFLAGS := $(XTRA_OPT) $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -$(O_OBJ): gifabstractdataset.h - -clean: - rm -f *.o $(O_OBJ) - -../o/%.$(OBJ_EXT): giflib/%.c - $(CC) -c $(CPPFLAGS) $(CFLAGS) $(NO_UNUSED_PARAMETER_FLAG) $(NO_SIGN_COMPARE) $< -o $@ - - -all: $(OBJ:.o=.$(OBJ_EXT)) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/gif/giflib/makefile.vc b/frmts/gif/giflib/makefile.vc deleted file mode 100644 index e1b266d990b0..000000000000 --- a/frmts/gif/giflib/makefile.vc +++ /dev/null @@ -1,16 +0,0 @@ - -OBJ = \ - dgif_lib.obj egif_lib.obj gif_err.obj gifalloc.obj gif_hash.obj - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -EXTRAFLAGS = $(SOFTWARNFLAGS) -DHAVE_STDINT_H -DHAVE_INTTYPES_H - -default: $(OBJ) - xcopy /D /Y *.obj ..\..\o - -clean: - -del *.obj - diff --git a/frmts/gif/makefile.vc b/frmts/gif/makefile.vc deleted file mode 100644 index 7ed85c834b58..000000000000 --- a/frmts/gif/makefile.vc +++ /dev/null @@ -1,23 +0,0 @@ - -OBJ = \ - gifdataset.obj biggifdataset.obj gifabstractdataset.obj - -GDAL_ROOT = ..\.. - -EXTRAFLAGS = -Igiflib - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - cd giflib - $(MAKE) /f makefile.vc - cd .. - -clean: - -del *.obj - cd giflib - $(MAKE) /f makefile.vc clean - cd .. - - diff --git a/frmts/grib/GNUmakefile b/frmts/grib/GNUmakefile deleted file mode 100644 index 867937a72aa2..000000000000 --- a/frmts/grib/GNUmakefile +++ /dev/null @@ -1,73 +0,0 @@ - - -EXTRAFLAGS = -iquote degrib/degrib -iquote ../mem - -include ../../GDALmake.opt - -OBJ = gribdataset.o gribcreatecopy.o \ - clock.o \ - degrib1.o \ - degrib2.o inventory.o metaname.o myerror.o grib1tab.o myutil.o metaparse.o weather.o metaprint.o grib2api.o myassert.o scan.o tendian.o gridtemplates.o drstemplates.o pdstemplates.o gbits.o g2_free.o g2_unpack1.o g2_unpack2.o g2_unpack3.o g2_unpack4.o g2_unpack5.o g2_unpack6.o g2_unpack7.o g2_info.o g2_getfld.o simunpack.o comunpack.o pack_gp.o reduce.o specunpack.o rdieee.o mkieee.o int_power.o simpack.o compack.o cmplxpack.o misspack.o \ - dec_jpeg2000.o jpcunpack.o hazard.o - -ifeq ($(PNG_SETTING),internal) -EXTRAFLAGS := $(EXTRAFLAGS) -I../png/libpng -DUSE_PNG - -ifeq ($(RENAME_INTERNAL_PNG_SYMBOLS),yes) -EXTRAFLAGS := $(EXTRAFLAGS) -DRENAME_INTERNAL_PNG_SYMBOLS -endif - -ifeq ($(LIBZ_SETTING),internal) -EXTRAFLAGS := $(EXTRAFLAGS) -I../zlib -endif -OBJ := $(OBJ) pngunpack.o dec_png.o -endif - -ifeq ($(PNG_SETTING),external) -EXTRAFLAGS := $(EXTRAFLAGS) -DUSE_PNG -OBJ := $(OBJ) pngunpack.o dec_png.o -endif - -CPPFLAGS := $(EXTRAFLAGS) $(CPPFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -../o/%.$(OBJ_EXT): degrib/degrib/%.c - $(CC) -c $(GDAL_INCLUDE) $(CPPFLAGS) $(CFLAGS) -iquote degrib/g2clib $< -o $@ - -../o/%.$(OBJ_EXT): degrib/degrib/%.cpp - $(CXX) -c $(GDAL_INCLUDE) $(CPPFLAGS) $(CXXFLAGS) $< -o $@ - -../o/%.$(OBJ_EXT): degrib/g2clib/%.c - $(CC) -c $(GDAL_INCLUDE) $(CPPFLAGS) $(CFLAGS) $< -o $@ - -../o/%.$(OBJ_EXT): degrib/g2clib/%.cpp - $(CXX) -c $(GDAL_INCLUDE) $(CPPFLAGS) $(CXXFLAGS) $< -o $@ - -%.$(OBJ_EXT): degrib/degrib/%.c - $(CC) -c $(GDAL_INCLUDE) $(CPPFLAGS) $(CFLAGS) -iquote degrib/g2clib $< -o $@ - -%.$(OBJ_EXT): degrib/degrib/%.cpp - $(CXX) -c $(GDAL_INCLUDE) $(CPPFLAGS) $(CXXFLAGS) $< -o $@ - -%.$(OBJ_EXT): degrib/g2clib/%.c - $(CC) -c $(GDAL_INCLUDE) $(CPPFLAGS) $(CFLAGS) $< -o $@ - -%.$(OBJ_EXT): degrib/g2clib/%.cpp - $(CXX) -c $(GDAL_INCLUDE) $(CPPFLAGS) $(CXXFLAGS) $< -o $@ - -defaultold: $(OBJ:.o=.$(OBJ_EXT)) - (cd degrib/degrib; $(MAKE)); cd ../.. - (cd degrib/g2clib; $(MAKE)) -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) - -plugin: gdal_GRIB.so - -gdal_GRIB.so: $(OBJ) - $(LD_SHARED) $(OBJ) $(GDAL_LIBS) $(LIBS) -o gdal_GRIB.so - - - diff --git a/frmts/grib/degrib/degrib/makefile.vc b/frmts/grib/degrib/degrib/makefile.vc deleted file mode 100644 index 79bf2577a3e3..000000000000 --- a/frmts/grib/degrib/degrib/makefile.vc +++ /dev/null @@ -1,13 +0,0 @@ -OBJ = clock.obj degrib1.obj degrib2.obj inventory.obj metaname.obj myerror.obj grib1tab.obj myutil.obj metaparse.obj weather.obj metaprint.obj grib2api.obj myassert.obj scan.obj tendian.obj hazard.obj - -EXTRAFLAGS = -I ../g2clib $(SOFTWARNFLAGS) - -GDAL_ROOT = ..\..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\..\..\o - -clean: - -del *.obj diff --git a/frmts/grib/degrib/g2clib/makefile.vc b/frmts/grib/degrib/g2clib/makefile.vc deleted file mode 100644 index 855b3279b280..000000000000 --- a/frmts/grib/degrib/g2clib/makefile.vc +++ /dev/null @@ -1,15 +0,0 @@ -OBJ = gridtemplates.obj drstemplates.obj pdstemplates.obj gbits.obj g2_free.obj g2_unpack1.obj g2_unpack2.obj g2_unpack3.obj g2_unpack4.obj g2_unpack5.obj g2_unpack6.obj g2_unpack7.obj g2_info.obj g2_getfld.obj simunpack.obj comunpack.obj pack_gp.obj reduce.obj specunpack.obj rdieee.obj mkieee.obj int_power.obj simpack.obj compack.obj cmplxpack.obj misspack.obj pngunpack.obj dec_png.obj \ - dec_jpeg2000.obj jpcunpack.obj - - -EXTRAFLAGS = -I ../../../png/libpng -I ../../../zlib -DUSE_PNG $(SOFTWARNFLAGS) - -GDAL_ROOT = ..\..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\..\..\o - -clean: - -del *.obj diff --git a/frmts/grib/degrib/makefile.vc b/frmts/grib/degrib/makefile.vc deleted file mode 100644 index b5dfe6b58356..000000000000 --- a/frmts/grib/degrib/makefile.vc +++ /dev/null @@ -1,10 +0,0 @@ -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: - cd degrib && $(MAKE) /f makefile.vc && cd .. - cd g2clib && $(MAKE) /f makefile.vc && cd .. - - - diff --git a/frmts/grib/makefile.vc b/frmts/grib/makefile.vc deleted file mode 100644 index d50483663f23..000000000000 --- a/frmts/grib/makefile.vc +++ /dev/null @@ -1,39 +0,0 @@ - -OBJ = gribdataset.obj gribcreatecopy.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -EXTRAFLAGS = -I..\mem - -!IF DEFINED(PNG_LIB) -LINK_PNG = $(PNG_LIB) -!ELSE -LINK_PNG = ..\png\libpng\*.obj -!ENDIF - -!IFDEF ZLIB_EXTERNAL_LIB -LINK_ZLIB = $(ZLIB_LIB) -!ELSE -LINK_ZLIB = ..\zlib\*.obj -!ENDIF - -default: $(OBJ) - cd degrib && $(MAKE) /f makefile.vc && cd .. - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - -del degrib\degrib\*.obj - -del degrib\g2clib\*.obj - -del *.dll - -del *.exp - -del *.lib - -plugin: gdal_GRIB.dll - -gdal_GRIB.dll: default - link /dll $(LDEBUG) /out:gdal_GRIB.dll \ - $(OBJ) degrib\degrib\*.obj degrib\g2clib\*.obj \ - $(GDALLIB) $(LINK_PNG) $(LINK_ZLIB) diff --git a/frmts/gsg/GNUmakefile b/frmts/gsg/GNUmakefile deleted file mode 100644 index e21476c0d3dd..000000000000 --- a/frmts/gsg/GNUmakefile +++ /dev/null @@ -1,13 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = gsagdataset.o gsbgdataset.o gs7bgdataset.o - - - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/gsg/makefile.vc b/frmts/gsg/makefile.vc deleted file mode 100644 index c38b5d9351ce..000000000000 --- a/frmts/gsg/makefile.vc +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = gsagdataset.obj gsbgdataset.obj gs7bgdataset.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/gta/GNUmakefile b/frmts/gta/GNUmakefile deleted file mode 100644 index 68c0faa7c823..000000000000 --- a/frmts/gta/GNUmakefile +++ /dev/null @@ -1,13 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = gtadataset.o - -CPPFLAGS := $(CPPFLAGS) $(NO_NON_VIRTUAL_DTOR_FLAG) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/gta/makefile.vc b/frmts/gta/makefile.vc deleted file mode 100644 index 442ad121d35c..000000000000 --- a/frmts/gta/makefile.vc +++ /dev/null @@ -1,15 +0,0 @@ - -OBJ = gtadataset.obj - -EXTRAFLAGS = $(GTA_CFLAGS) - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/gtiff/GNUmakefile b/frmts/gtiff/GNUmakefile deleted file mode 100644 index 414e7f573645..000000000000 --- a/frmts/gtiff/GNUmakefile +++ /dev/null @@ -1,88 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = geotiff.o gt_wkt_srs.o gt_citation.o gt_overview.o \ - tifvsi.o gt_jpeg_copy.o cogdriver.o - -SUBLIBS = - -TIFF_OPTS = -ifeq ($(TIFF_SETTING),internal) - -SUBLIBS := lib-tiff $(SUBLIBS) -TIFF_OPTS := -DINTERNAL_LIBTIFF -Ilibtiff $(TIFF_OPTS) -ifeq ($(RENAME_INTERNAL_LIBTIFF_SYMBOLS),yes) -TIFF_OPTS := -DRENAME_INTERNAL_LIBTIFF_SYMBOLS $(TIFF_OPTS) -endif - -ifeq ($(HAVE_JXL),yes) -OBJ := $(OBJ) tif_jxl.o -TIFF_OPTS := -DHAVE_JXL $(JXL_CFLAGS) $(TIFF_OPTS) -endif - -ifeq ($(LIBDEFLATE_SETTING),yes) -TIFF_OPTS := $(TIFF_OPTS) -DLIBDEFLATE_SUPPORT -endif - -endif - -ifeq ($(GEOTIFF_SETTING),internal) -SUBLIBS := lib-geotiff $(SUBLIBS) -TIFF_OPTS := -DINTERNAL_LIBGEOTIFF -Ilibgeotiff $(TIFF_OPTS) -ifeq ($(RENAME_INTERNAL_LIBGEOTIFF_SYMBOLS),yes) -TIFF_OPTS := -DRENAME_INTERNAL_LIBGEOTIFF_SYMBOLS $(TIFF_OPTS) -endif -endif - -ifneq ($(JPEG_SETTING),no) -TIFF_OPTS := $(TIFF_OPTS) -I../jpeg -DHAVE_LIBJPEG -endif - -ifeq ($(JPEG_SETTING),internal) -TIFF_OPTS := $(TIFF_OPTS) -I../jpeg/libjpeg -ifeq ($(RENAME_INTERNAL_LIBJPEG_SYMBOLS),yes) -TIFF_OPTS := -DRENAME_INTERNAL_LIBJPEG_SYMBOLS $(TIFF_OPTS) -endif -endif - -ifeq ($(WEBP_SETTING),yes) -TIFF_OPTS := -DWEBP_SUPPORT $(TIFF_OPTS) -endif - -CPPFLAGS := -iquote .. $(GEOTIFF_INCLUDE) $(PROJ_INCLUDE) $(PROJ_FLAGS) $(TIFF_OPTS) $(CPPFLAGS) - -CXXFLAGS := $(WARN_EFFCPLUSPLUS) $(CXXFLAGS) -# issue with $(WARN_OLD_STYLE_CAST) with x86_64-w64-mingw32-g++. See https://travis-ci.org/OSGeo/gdal/jobs/375654138 - -default: $(OBJ:.o=.$(OBJ_EXT)) $(SUBLIBS) - -clean: - rm -f *.o $(O_OBJ) - (cd libtiff; $(MAKE) clean) - (cd libgeotiff; $(MAKE) clean) - -gt_test: gt_test.$(OBJ_EXT) gt_gs.$(OBJ_EXT) - $(CC) gt_test.$(OBJ_EXT) gt_gs.$(OBJ_EXT) ../../port/*.$(OBJ_EXT) \ - libgeotiff/libgeotiff.a libtiff/libtiff.a $(LIBS) -o gt_test - -gt_write: gt_write.$(OBJ_EXT) gt_gs.$(OBJ_EXT) - $(CC) gt_write.$(OBJ_EXT) gt_gs.$(OBJ_EXT) ../../port/*.$(OBJ_EXT) \ - libgeotiff/libgeotiff.a libtiff/libtiff.a $(LIBS) -o gt_write - -epsg_to_wkt: epsg_to_wkt.$(OBJ_EXT) gt_wkt_srs.$(OBJ_EXT) - $(CXX) epsg_to_wkt.$(OBJ_EXT) gt_wkt_srs.$(OBJ_EXT) ../../port/*.$(OBJ_EXT) \ - libgeotiff/libgeotiff.a libtiff/libtiff.a \ - $(GDAL_LIB) $(LIBS) -o epsg_to_wkt - -lib-tiff: - (cd libtiff; $(MAKE) install-obj) - -lib-geotiff: - (cd libgeotiff; $(MAKE) install-obj) - -install-obj: $(SUBLIBS) $(O_OBJ:.o=.$(OBJ_EXT)) - -generate_quant_table_md5sum: generate_quant_table_md5sum.cpp - $(CXX) -O2 -g -Wall generate_quant_table_md5sum.cpp -o generate_quant_table_md5sum -iquote ../../port -iquote ../../generated_headers -iquote ../../gcore -iquote ../../ogr -L../../ -lgdal - ./generate_quant_table_md5sum > quant_table_md5sum.h - $(RM) -f generate_quant_table_md5sum diff --git a/frmts/gtiff/libgeotiff/GNUmakefile b/frmts/gtiff/libgeotiff/GNUmakefile deleted file mode 100644 index 6a445ba2d9a0..000000000000 --- a/frmts/gtiff/libgeotiff/GNUmakefile +++ /dev/null @@ -1,67 +0,0 @@ - -include ../../../GDALmake.opt - -OBJ = \ - xtiff.o \ - geo_free.o \ - geo_get.o \ - geo_names.o \ - geo_new.o \ - geo_print.o \ - geo_set.o \ - geo_tiffp.o \ - geo_write.o \ - geo_normalize.o \ - geotiff_proj4.o \ - geo_extra.o \ - geo_trans.o \ - geo_simpletags.o - -O_OBJ = $(foreach file,$(OBJ),../../o/$(file)) - -ALL_C_FLAGS = $(CPPFLAGS) $(CFLAGS) -DDONT_DEPRECATE_SPRINTF $(PROJ_INCLUDE) $(PROJ_FLAGS) - -ifeq ($(TIFF_SETTING),internal) -ALL_C_FLAGS := -I../libtiff $(ALL_C_FLAGS) -ifeq ($(RENAME_INTERNAL_LIBTIFF_SYMBOLS),yes) -ALL_C_FLAGS := -DRENAME_INTERNAL_LIBTIFF_SYMBOLS $(ALL_C_FLAGS) -endif -endif -ifeq ($(RENAME_INTERNAL_LIBGEOTIFF_SYMBOLS),yes) -ALL_C_FLAGS := -DRENAME_INTERNAL_LIBGEOTIFF_SYMBOLS $(ALL_C_FLAGS) -endif - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f $(O_OBJ) *.o *.a - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) - -../../o/%.$(OBJ_EXT): %.c - $(CC) -c $(ALL_C_FLAGS) $< -o $@ - -# -# Updating to the latest libgeotiff involves copying all matching source -# except for a few files that hook to GDALs own CPL services. -# -import: - @if test ! -d ~/libgeotiff ; then \ - echo reimport requires libgeotiff checked out ~/libgeotiff ; \ - exit 1; \ - fi - - rm -rf safe - mkdir safe - mv cpl_serv.h geo_config.h safe - - copymatch.sh ~/libgeotiff *.cpp *.c *.h *.inc - copymatch.sh ~/libgeotiff/libxtiff xtiff*.c xtiffio.h - - mv safe/* . - rm -rf safe - - @echo - @echo 'Now do something like:' - @echo '% cvs commit -m "updated to libgeotiff 1.1.x"' - @echo diff --git a/frmts/gtiff/libgeotiff/makefile.vc b/frmts/gtiff/libgeotiff/makefile.vc deleted file mode 100644 index f77e1f8c6204..000000000000 --- a/frmts/gtiff/libgeotiff/makefile.vc +++ /dev/null @@ -1,28 +0,0 @@ - -EXTRAFLAGS = -I..\libtiff -DBUILD_AS_DLL $(PROJ_FLAGS) $(PROJ_INCLUDE) - -OBJ = \ - xtiff.obj \ - geo_free.obj \ - geo_get.obj \ - geo_names.obj \ - geo_new.obj \ - geo_print.obj \ - geo_set.obj \ - geo_tiffp.obj \ - geo_write.obj \ - geo_normalize.obj \ - geo_extra.obj \ - geotiff_proj4.obj \ - geo_simpletags.obj - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\..\o - -clean: - del *.obj - diff --git a/frmts/gtiff/libtiff/GNUmakefile b/frmts/gtiff/libtiff/GNUmakefile deleted file mode 100644 index 3ac5776f3785..000000000000 --- a/frmts/gtiff/libtiff/GNUmakefile +++ /dev/null @@ -1,135 +0,0 @@ - -include ../../../GDALmake.opt - -OBJ = \ - tif_aux.o \ - tif_close.o \ - tif_codec.o \ - tif_color.o \ - tif_compress.o \ - tif_dir.o \ - tif_dirinfo.o \ - tif_dirread.o \ - tif_dirwrite.o \ - tif_dumpmode.o \ - tif_error.o \ - tif_extension.o \ - tif_fax3.o \ - tif_fax3sm.o \ - tif_getimage.o \ - tif_jpeg.o \ - tif_jpeg_12.o \ - tif_flush.o \ - tif_luv.o \ - tif_lzw.o \ - tif_next.o \ - tif_ojpeg.o \ - tif_open.o \ - tif_packbits.o \ - tif_pixarlog.o \ - tif_predict.o \ - tif_print.o \ - tif_read.o \ - tif_swab.o \ - tif_strip.o \ - tif_thunder.o \ - tif_tile.o \ - tif_vsi.o \ - tif_version.o \ - tif_warning.o \ - tif_write.o \ - tif_zip.o \ - tif_lzma.o \ - tif_zstd.o \ - tif_webp.o \ - tif_lerc.o - -O_OBJ = $(foreach file,$(OBJ),../../o/$(file)) - -# Note: HOST_FILLORDER value is set arbitrarily. This isn't used by GDAL -ALL_C_FLAGS = $(CFLAGS_NOFTRAPV) $(CPPFLAGS) -DDONT_DEPRECATE_SPRINTF -DHOST_FILLORDER=FILLORDER_LSB2MSB - -ifeq ($(LIBZ_SETTING),internal) -XTRA_OPT = -I../../zlib -else -XTRA_OPT = -endif - -ifeq ($(RENAME_INTERNAL_LIBTIFF_SYMBOLS),yes) -ALL_C_FLAGS := $(ALL_C_FLAGS) -DRENAME_INTERNAL_LIBTIFF_SYMBOLS -endif - -ifneq ($(LIBZ_SETTING),no) -ALL_C_FLAGS := $(ALL_C_FLAGS) -DPIXARLOG_SUPPORT -DZIP_SUPPORT $(XTRA_OPT) -endif - -ifneq ($(JPEG_SETTING),no) -ALL_C_FLAGS := $(ALL_C_FLAGS) -DJPEG_SUPPORT -DOJPEG_SUPPORT -# jpeg9: -DHAVE_BOOLEAN -Dboolean=int -endif - -ifeq ($(JPEG_SETTING),internal) -ALL_C_FLAGS := $(ALL_C_FLAGS) -I../../jpeg/libjpeg -ifeq ($(RENAME_INTERNAL_LIBJPEG_SYMBOLS),yes) -ALL_C_FLAGS := $(ALL_C_FLAGS) -DRENAME_INTERNAL_LIBJPEG_SYMBOLS -endif -endif - -ifeq ($(TIFF_JPEG12_ENABLED),yes) -ALL_C_FLAGS := $(ALL_C_FLAGS) -DJPEG_DUAL_MODE_8_12 -EXTRA_DEP = libjpeg12src -endif - -ifeq ($(LIBLZMA_SETTING),yes) -ALL_C_FLAGS := $(ALL_C_FLAGS) -DLZMA_SUPPORT -endif - -ifeq ($(ZSTD_SETTING),yes) -ALL_C_FLAGS := $(ALL_C_FLAGS) -DZSTD_SUPPORT -endif - -ifeq ($(WEBP_SETTING),yes) -ALL_C_FLAGS := $(ALL_C_FLAGS) -DWEBP_SUPPORT -endif - -ifeq ($(LIBDEFLATE_SETTING),yes) -ALL_C_FLAGS := $(ALL_C_FLAGS) -DLIBDEFLATE_SUPPORT -endif - -ifeq ($(HAVE_LERC),internal) -ALL_C_FLAGS := $(ALL_C_FLAGS) -DLERC_SUPPORT -I../../../third_party/LercLib -endif - -ifeq ($(HAVE_LERC),external) -ALL_C_FLAGS := $(ALL_C_FLAGS) -DLERC_SUPPORT $(LERC_INCLUDE) -endif - -default: $(EXTRA_DEP) $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f $(O_OBJ) *.o *.a - -import: - @if test ! -d ~/libtiff ; then \ - echo reimport requires libtiff checked out ~/libtiff ; \ - exit 1; \ - fi - - mv tif_config.h tif_config_safe.h - mv tiffconf.h tiffconf_safe.h - copymatch.sh ~/libtiff/libtiff *.c *.h - mv tif_config_safe.h tif_config.h - mv tiffconf_safe.h tiffconf.h - - @echo - @echo 'Now do something like:' - @echo '% svn commit -m "updated to libtiff 3.6.0"' - @echo - -install-obj: $(EXTRA_DEP) $(O_OBJ:.o=.$(OBJ_EXT)) - -../../o/%.$(OBJ_EXT): %.c t4.h tif_config.h tif_dir.h tif_fax3.h tif_predict.h tiff.h tiffconf.h tiffio.h tiffiop.h tiffvers.h uvcode.h - $(CC) -c $(ALL_C_FLAGS) $< -o $@ - -libjpeg12src: - (cd ../../jpeg; $(MAKE) libjpeg12/jcapimin12.c) diff --git a/frmts/gtiff/libtiff/makefile.vc b/frmts/gtiff/libtiff/makefile.vc deleted file mode 100644 index 5f13ca3355bc..000000000000 --- a/frmts/gtiff/libtiff/makefile.vc +++ /dev/null @@ -1,108 +0,0 @@ - -OBJ = \ - tif_aux.obj \ - tif_close.obj \ - tif_codec.obj \ - tif_color.obj \ - tif_compress.obj \ - tif_dir.obj \ - tif_dirinfo.obj \ - tif_dirread.obj \ - tif_dirwrite.obj \ - tif_dumpmode.obj \ - tif_error.obj \ - tif_extension.obj \ - tif_fax3.obj \ - tif_fax3sm.obj \ - tif_getimage.obj \ - tif_jpeg.obj \ - tif_jpeg_12.obj \ - tif_flush.obj \ - tif_luv.obj \ - tif_lzw.obj \ - tif_next.obj \ - tif_ojpeg.obj \ - tif_open.obj \ - tif_packbits.obj \ - tif_pixarlog.obj \ - tif_predict.obj \ - tif_print.obj \ - tif_read.obj \ - tif_swab.obj \ - tif_strip.obj \ - tif_thunder.obj \ - tif_tile.obj \ - tif_vsi.obj \ - tif_version.obj \ - tif_warning.obj \ - tif_write.obj \ - tif_zip.obj \ - tif_lzma.obj \ - tif_zstd.obj \ - tif_webp.obj \ - tif_lerc.obj - -GDAL_ROOT = ..\..\.. - -# /wd4324 silents warning C4324: '' : structure was padded due to __declspec(align()) -# in tif_jpeg.c:147 and tif_ojpeg.c:248 - -# Note: HOST_FILLORDER value is set arbitrarily. This isn't used by GDAL -EXTRAFLAGS = $(ZLIB_FLAGS) -DZIP_SUPPORT -DPIXARLOG_SUPPORT -DHOST_FILLORDER=FILLORDER_LSB2MSB \ - $(JPEG_FLAGS) $(JPEG12_FLAGS) $(LZMA_FLAGS) $(ZSTD_FLAGS) $(WEBP_FLAGS) $(LIBDEFLATE_FLAGS) $(LERC_FLAGS) /wd4324 - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -!IFDEF JPEG_SUPPORTED -!IFDEF JPEG_EXTERNAL_LIB -JPEG_FLAGS = -I$(JPEGDIR) -DJPEG_SUPPORT -DOJPEG_SUPPORT -!ELSE -JPEG_FLAGS = -I..\..\jpeg\libjpeg -DJPEG_SUPPORT -DOJPEG_SUPPORT -!ENDIF -!ENDIF - -!IFDEF ZLIB_EXTERNAL_LIB -ZLIB_FLAGS = $(ZLIB_INC) -!ELSE -ZLIB_FLAGS = -I..\..\zlib -!ENDIF - -!IFDEF JPEG12_SUPPORTED -JPEG12_FLAGS = -DJPEG_DUAL_MODE_8_12 -EXTRA_DEP = libjpeg12src -!ENDIF - -!IFDEF LZMA_CFLAGS -LZMA_FLAGS = $(LZMA_CFLAGS) -DLZMA_SUPPORT -!ENDIF - -!IFDEF ZSTD_CFLAGS -ZSTD_FLAGS = $(ZSTD_CFLAGS) -DZSTD_SUPPORT -!ENDIF - -!IFDEF WEBP_CFLAGS -WEBP_FLAGS = $(WEBP_CFLAGS) -DWEBP_SUPPORT -!ENDIF - -!IFDEF LIBDEFLATE_CFLAGS -LIBDEFLATE_FLAGS = $(LIBDEFLATE_CFLAGS) -DLIBDEFLATE_SUPPORT -!ENDIF - -!IF "$(HAVE_LERC)" == "internal" -LERC_FLAGS = -DLERC_SUPPORT -I../../../third_party/LercLib -!ENDIF - -!IF "$(HAVE_LERC)" == "external" -LERC_FLAGS = -DLERC_SUPPORT $(LERC_INCLUDE) -!ENDIF - -default: $(EXTRA_DEP) $(OBJ) - xcopy /D /Y *.obj ..\..\o - -clean: - del *.obj - -libjpeg12src: - cd ../../jpeg/libjpeg12 - $(MAKE) /f makefile.vc jcapimin12.c - cd ../../gtiff/libtiff diff --git a/frmts/gtiff/makefile.vc b/frmts/gtiff/makefile.vc deleted file mode 100644 index ea05fba008e0..000000000000 --- a/frmts/gtiff/makefile.vc +++ /dev/null @@ -1,64 +0,0 @@ - -OBJ = geotiff.obj gt_wkt_srs.obj gt_overview.obj \ - tifvsi.obj gt_citation.obj gt_jpeg_copy.obj cogdriver.obj - -EXTRAFLAGS = -I.. $(PROJ_FLAGS) $(PROJ_INCLUDE) $(TIFF_INC) $(GEOTIFF_INC) $(JPEG_FLAGS) $(LERC_INC) $(ZSTD_FLAGS) $(ZLIB_FLAGS) $(LIBDEFLATE_FLAGS) $(JXL_FLAGS) $(WEBP_FLAGS) - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -!IFDEF TIFF_INC -SUB_TIFF_TARGET = -!ELSE -TIFF_INC = -Ilibtiff -DINTERNAL_LIBTIFF -SUB_TIFF_TARGET = tiff - -!IFDEF LIBDEFLATE_CFLAGS -LIBDEFLATE_FLAGS = $(LIBDEFLATE_CFLAGS) -DLIBDEFLATE_SUPPORT -!ENDIF - -!IFDEF JXL_CFLAGS -JXL_FLAGS = $(JXL_CFLAGS) -DHAVE_JXL -!ENDIF - -!ENDIF - -!IFDEF GEOTIFF_INC -SUB_GEOTIFF_TARGET = -!ELSE -GEOTIFF_INC = -Ilibgeotiff -DINTERNAL_LIBGEOTIFF -SUB_GEOTIFF_TARGET = geotiff -!ENDIF - -!IFDEF JPEG_SUPPORTED -!IFDEF JPEG_EXTERNAL_LIB -JPEG_FLAGS = -I..\jpeg -I$(JPEGDIR) -DHAVE_LIBJPEG -!ELSE -JPEG_FLAGS = -I..\jpeg -I..\jpeg\libjpeg -DHAVE_LIBJPEG -!ENDIF -!ENDIF - -!IFDEF WEBP_CFLAGS -WEBP_FLAGS = $(WEBP_CFLAGS) -DWEBP_SUPPORT -!ENDIF - - -default: $(OBJ) $(LERC_OBJ) $(SUB_TIFF_TARGET) $(SUB_GEOTIFF_TARGET) - xcopy /D /Y *.obj ..\o - -tiff: - cd libtiff - $(MAKE) /f makefile.vc - cd .. - -geotiff: - cd libgeotiff - $(MAKE) /f makefile.vc - cd .. - -clean: - -del *.obj libtiff\*.obj libgeotiff\*.obj - - - diff --git a/frmts/gxf/GNUmakefile b/frmts/gxf/GNUmakefile deleted file mode 100644 index b446ec70afca..000000000000 --- a/frmts/gxf/GNUmakefile +++ /dev/null @@ -1,64 +0,0 @@ -VERSION = 1_0 -DISTDIR = gxf3_$(VERSION) -WEB_DIR = /u/www/projects/gxf -SHARED_LIB = gdal_GXF.so - - -include ../../GDALmake.opt - -GXFOBJ = gxfopen.o gxf_proj4.o gxf_ogcwkt.o -OBJ = gxfdataset.o $(GXFOBJ) - - - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o - -gxftest$(EXE): gxftest.$(OBJ_EXT) - $(LD) $(LDFLAGS) gxftest.$(OBJ_EXT) $(GXFOBJ) ../../port/*.$(OBJ_EXT) $(LIBS) -o gxftest$(EXE) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) - -$(SHARED_LIB): $(OBJ) - $(LD_SHARED) $(OBJ) $(GDAL_SLIB_LINK) $(LIBS) -o $(SHARED_LIB) - -install-lib: $(SHARED_LIB) - cp $(SHARED_LIB) ../../lib - -docs: - rm -rf html - mkdir html - doxygen - -update-web: dist - cp html/* $(WEB_DIR) - cp $(DISTDIR).tar.gz /u/ftp/pub/outgoing - cp $(DISTDIR).zip /u/ftp/pub/outgoing - - -dist: docs - rm -rf $(DISTDIR) - mkdir $(DISTDIR) - mkdir $(DISTDIR)/html - cp html/* $(DISTDIR)/html - autoconf - cp *.c *.h configure Makefile.in $(DISTDIR) - cp makefile.vc.dist $(DISTDIR)/makefile.vc - rm configure - cp ../../port/cpl_conv.cpp $(DISTDIR)/cpl_conv.c - cp ../../port/cpl_conv.h $(DISTDIR) - cp ../../port/cpl_string.cpp $(DISTDIR)/cpl_string.c - cp ../../port/cpl_string.h $(DISTDIR) - cp ../../port/cpl_vsisimple.cpp $(DISTDIR)/cpl_vsisimple.c - cp ../../port/cpl_vsi.h $(DISTDIR) - cp ../../port/cpl_error.cpp $(DISTDIR)/cpl_error.c - cp ../../port/cpl_error.h $(DISTDIR) - cp ../../port/cpl_port.h $(DISTDIR) - cp ../../port/cpl_config.h $(DISTDIR) - cp ../../port/cpl_config.h.in $(DISTDIR) - rm -f $(DISTDIR)/*.o - tar czf $(DISTDIR).tar.gz $(DISTDIR) - zip -r $(DISTDIR).zip $(DISTDIR) - diff --git a/frmts/gxf/makefile.vc b/frmts/gxf/makefile.vc deleted file mode 100644 index f61567340434..000000000000 --- a/frmts/gxf/makefile.vc +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = gxfopen.obj gxfdataset.obj gxf_ogcwkt.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/hdf4/GNUmakefile b/frmts/hdf4/GNUmakefile deleted file mode 100644 index 9456aa6a288d..000000000000 --- a/frmts/hdf4/GNUmakefile +++ /dev/null @@ -1,29 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = hdf4dataset.o hdf4imagedataset.o hdf4multidim.o - -SUBLIBS = lib-hdfeos - -CPPFLAGS := -iquote hdf-eos $(HDF4_INCLUDE) $(HDF4_FLAGS) $(CPPFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) $(SUBLIBS) - -clean: - rm -f *.o $(O_OBJ) - (cd hdf-eos; $(MAKE) clean) - -lib-hdfeos: - (cd hdf-eos; $(MAKE) install-obj) - -install-obj: $(SUBLIBS) $(O_OBJ:.o=.$(OBJ_EXT)) - -EOS_SO = ../o/EHapi.o ../o/GDapi.o ../o/SWapi.o ../o/gctp_wrap.o - -PLUGIN_SO = gdal_HDF4.$(SO_EXT) - -plugin: $(PLUGIN_SO) - -$(PLUGIN_SO): $(OBJ) - $(LD_SHARED) $(LNK_FLAGS) $(OBJ) $(EOS_SO) $(CONFIG_LIBS_INS) $(LIBS) \ - -o $(PLUGIN_SO) diff --git a/frmts/hdf4/hdf-eos/GNUmakefile b/frmts/hdf4/hdf-eos/GNUmakefile deleted file mode 100644 index 3b36ded03792..000000000000 --- a/frmts/hdf4/hdf-eos/GNUmakefile +++ /dev/null @@ -1,22 +0,0 @@ - -include ../../../GDALmake.opt - -OBJ = \ - EHapi.o \ - GDapi.o \ - SWapi.o \ - gctp_wrap.o - -O_OBJ = $(foreach file,$(OBJ),../../o/$(file)) - -CPPFLAGS := $(HDF4_INCLUDE) -iquote . -iquote .. $(HDF4_FLAGS) $(CPPFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - $(RM) *.o *.a $(O_OBJ) - -install-obj: $(SUBLIBS) $(O_OBJ:.o=.$(OBJ_EXT)) - -../../o/%.$(OBJ_EXT): %.c - $(CC) $(GDAL_INCLUDE) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< diff --git a/frmts/hdf4/hdf-eos/makefile.vc b/frmts/hdf4/hdf-eos/makefile.vc deleted file mode 100644 index b1cb9096376a..000000000000 --- a/frmts/hdf4/hdf-eos/makefile.vc +++ /dev/null @@ -1,21 +0,0 @@ - -OBJ = \ - SWapi.obj GDapi.obj EHapi.obj gctp_wrap.obj - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -EXTRAFLAGS = -I$(HDF4_INCLUDE) -I$(HDF4_DIR)\include -I.\ -I..\ -DFRMT_hdf4 -DWIN32 - -!IF "$(HDF4_HAS_MAXOPENFILES)" == "YES" -EXTRAFLAGS = $(EXTRAFLAGS) -DHDF4_HAS_MAXOPENFILES -!ENDIF - -default: $(OBJ) - xcopy /D /Y *.obj ..\..\o - -clean: - -del *.obj - -plugin: $(OBJ) diff --git a/frmts/hdf4/makefile.vc b/frmts/hdf4/makefile.vc deleted file mode 100644 index cf79e649b60c..000000000000 --- a/frmts/hdf4/makefile.vc +++ /dev/null @@ -1,42 +0,0 @@ -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -OBJ = hdf4dataset.obj hdf4imagedataset.obj hdf4multidim.obj - -PLUGIN_DLL = gdal_HDF4.dll - -EXTRAFLAGS = -I$(HDF4_INCLUDE) -I$(HDF4_DIR)\include -Ihdf-eos -DFRMT_hdf4 - -!IF "$(HDF4_PLUGIN)" == "YES" -EXTRAFLAGS = $(EXTRAFLAGS) -DHDF4_PLUGIN -!ENDIF - -!IF "$(HDF4_HAS_MAXOPENFILES)" == "YES" -EXTRAFLAGS = $(EXTRAFLAGS) -DHDF4_HAS_MAXOPENFILES -!ENDIF - - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - cd hdf-eos - $(MAKE) /f makefile.vc - -clean: - -del *.obj - cd hdf-eos - $(MAKE) /f makefile.vc clean - cd .. - -plugin: $(PLUGIN_DLL) - -$(PLUGIN_DLL): $(OBJ) - cd hdf-eos - $(MAKE) /f makefile.vc plugin - cd .. - link /dll $(LDEBUG) /out:$(PLUGIN_DLL) $(OBJ) hdf-eos\*.obj $(GDALLIB) $(HDF4_LIB) - if exist $(PLUGIN_DLL).manifest mt -manifest $(PLUGIN_DLL).manifest -outputresource:$(PLUGIN_DLL);2 - -plugin-install: - -mkdir $(PLUGINDIR) - $(INSTALL) $(PLUGIN_DLL) $(PLUGINDIR) diff --git a/frmts/hdf5/GNUmakefile b/frmts/hdf5/GNUmakefile deleted file mode 100644 index c171ea9af70d..000000000000 --- a/frmts/hdf5/GNUmakefile +++ /dev/null @@ -1,28 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = hdf5dataset.o hdf5imagedataset.o \ - bagdataset.o gh5_convenience.o iso19115_srs.o \ - hdf5multidim.o - -HDFEOS_OPTS = -SUBLIBS = - -CPPFLAGS := $(HDF5_INCLUDE) $(CPPFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) $(SUBLIBS) - -clean: - rm -f *.o $(O_OBJ) - -$(OBJ) $(O_OBJ): hdf5dataset.h - -install-obj: $(SUBLIBS) $(O_OBJ:.o=.$(OBJ_EXT)) - -PLUGIN_SO = gdal_HDF5.$(SO_EXT) - -plugin: $(PLUGIN_SO) - -$(PLUGIN_SO): $(OBJ) - $(LD_SHARED) $(LNK_FLAGS) $(OBJ) $(CONFIG_LIBS_INS) $(LIBS) \ - -o $(PLUGIN_SO) diff --git a/frmts/hdf5/makefile.vc b/frmts/hdf5/makefile.vc deleted file mode 100644 index e0bfd03ef028..000000000000 --- a/frmts/hdf5/makefile.vc +++ /dev/null @@ -1,49 +0,0 @@ -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -OBJ = hdf5dataset.obj hdf5imagedataset.obj \ - bagdataset.obj gh5_convenience.obj iso19115_srs.obj \ - hdf5multidim.obj - -PLUGIN_DLL = gdal_HDF5.dll - -EXTRAFLAGS = -I$(HDF5_DIR)\include -DWIN32 - -# From the HDF docs... -# Users who want to build and run an application with HDF5 in Visual Studio -# without using CMake should consult the USING_HDF5_VS.txt file. Building -# applications with the dynamic/shared hdf5 libraries requires that the -# "H5_BUILT_AS_DYNAMIC_LIB" compile definition be used. - -!IF "$(HDF5_H5_IS_DLL)" == "YES" -EXTRAFLAGS = $(EXTRAFLAGS) -DH5_BUILT_AS_DYNAMIC_LIB -!ELSE -EXTRAFLAGS = $(EXTRAFLAGS) -D_HDF5USEDLL_ -!ENDIF - -!IF "$(HDF5_PLUGIN)" == "YES" -EXTRAFLAGS = $(EXTRAFLAGS) -DHDF5_PLUGIN -!ENDIF - - -default: $(OBJ) - $(INSTALL) *.obj ..\o - -clean: - -del *.obj - -del *.dll - -del *.exp - -del *.lib - -del *.manifest - -plugin: $(PLUGIN_DLL) - -$(PLUGIN_DLL): $(OBJ) - link /dll $(LDEBUG) /out:$(PLUGIN_DLL) $(OBJ) $(GDALLIB) $(HDF5_LIB) - if exist $(PLUGIN_DLL).manifest mt -manifest $(PLUGIN_DLL).manifest -outputresource:$(PLUGIN_DLL);2 - -plugin-install: - -mkdir $(PLUGINDIR) - $(INSTALL) $(PLUGIN_DLL) $(PLUGINDIR) - diff --git a/frmts/heif/GNUmakefile b/frmts/heif/GNUmakefile deleted file mode 100644 index ff9fa2fcc687..000000000000 --- a/frmts/heif/GNUmakefile +++ /dev/null @@ -1,13 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = heifdataset.o - -CPPFLAGS := $(HEIF_CFLAGS) $(CPPFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/heif/makefile.vc b/frmts/heif/makefile.vc deleted file mode 100644 index 02859fd8d1d7..000000000000 --- a/frmts/heif/makefile.vc +++ /dev/null @@ -1,13 +0,0 @@ -OBJ = heifdataset.obj - -GDAL_ROOT = ..\.. - -EXTRAFLAGS = $(HEIF_INC) - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj diff --git a/frmts/hf2/GNUmakefile b/frmts/hf2/GNUmakefile deleted file mode 100644 index bc4d2b1b26ee..000000000000 --- a/frmts/hf2/GNUmakefile +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = hf2dataset.o - -include ../../GDALmake.opt - - - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/hf2/makefile.vc b/frmts/hf2/makefile.vc deleted file mode 100644 index 6d59406ed4b6..000000000000 --- a/frmts/hf2/makefile.vc +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = hf2dataset.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/hfa/GNUmakefile b/frmts/hfa/GNUmakefile deleted file mode 100644 index f5bef412068c..000000000000 --- a/frmts/hfa/GNUmakefile +++ /dev/null @@ -1,21 +0,0 @@ -include ../../GDALmake.opt - -HFAOBJ := hfaopen.o hfaentry.o hfadictionary.o hfafield.o hfatype.o -HFAOBJ += hfaband.o hfacompress.o -OBJ := $(HFAOBJ) hfadataset.o hfa_overviews.o - -ALL_C_FLAGS = $(CFLAGS) - -CPPFLAGS := $(PROJ_INCLUDE) $(CPPFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o hfatest $(O_OBJ) - -$(O_OBJ): hfa.h hfa_p.h - -hfatest: hfatest.$(OBJ_EXT) $(HFAOBJ:.o=.$(OBJ_EXT)) - $(LD) hfatest.$(OBJ_EXT) $(HFAOBJ:.o=.$(OBJ_EXT)) ../../port/*.$(OBJ_EXT) ../../ogr/ogrsf_frmts/o/json_*.o ../../ogr/ogrsf_frmts/o/printbuf.o ../../ogr/ogrsf_frmts/o/arraylist.o ../../ogr/ogrsf_frmts/o/linkhash.o ../../ogr/ograpispy.o ../../ogr/ogr_proj_p.o -L../.. -lgdal $(LIBS) -o hfatest - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/hfa/makefile.vc b/frmts/hfa/makefile.vc deleted file mode 100644 index e760eac9dac7..000000000000 --- a/frmts/hfa/makefile.vc +++ /dev/null @@ -1,27 +0,0 @@ - -OBJ = hfaband.obj hfadataset.obj hfadictionary.obj hfaentry.obj \ - hfafield.obj hfaopen.obj hfatype.obj hfacompress.obj \ - hfa_overviews.obj - -GDAL_ROOT = ..\.. - -EXTRAFLAGS = $(PROJ_INCLUDE) - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - -del *.exe - -del *.ilk - -del *.exp - -del *.lib - -del *.pdb - -del *.manifest - -hfatest.exe: hfatest.cpp $(GDALLIB) - $(CC) $(CFLAGS) hfatest.cpp $(OBJ) $(GDALLIB) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - del hfatest.obj diff --git a/frmts/idrisi/GNUmakefile b/frmts/idrisi/GNUmakefile deleted file mode 100644 index 8c95156a86d6..000000000000 --- a/frmts/idrisi/GNUmakefile +++ /dev/null @@ -1,15 +0,0 @@ -GDAL_ROOT = ../.. - -include $(GDAL_ROOT)/GDALmake.opt - -OBJ = IdrisiDataset.o - -CPPFLAGS := $(PROJ_INCLUDE) $(PROJ_FLAGS) $(CPPFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) - diff --git a/frmts/idrisi/makefile.vc b/frmts/idrisi/makefile.vc deleted file mode 100644 index 96fdb2f7ba55..000000000000 --- a/frmts/idrisi/makefile.vc +++ /dev/null @@ -1,16 +0,0 @@ -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -OBJ = idrisiDataset.obj - -EXTRAFLAGS = -D_USE_MATH_DEFINES $(PROJ_FLAGS) $(PROJ_INCLUDE) - - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - cd .. - -clean: - -del *.obj - cd .. diff --git a/frmts/ilwis/GNUmakefile b/frmts/ilwis/GNUmakefile deleted file mode 100644 index 4d30288432d4..000000000000 --- a/frmts/ilwis/GNUmakefile +++ /dev/null @@ -1,11 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = ilwisdataset.o ilwiscoordinatesystem.o - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/ilwis/makefile.vc b/frmts/ilwis/makefile.vc deleted file mode 100644 index 72d662826a5d..000000000000 --- a/frmts/ilwis/makefile.vc +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = ilwisdataset.obj ilwiscoordinatesystem.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/iris/GNUmakefile b/frmts/iris/GNUmakefile deleted file mode 100644 index a5f821714a2a..000000000000 --- a/frmts/iris/GNUmakefile +++ /dev/null @@ -1,13 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = irisdataset.o - - - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/iris/makefile.vc b/frmts/iris/makefile.vc deleted file mode 100644 index 31ec435a9897..000000000000 --- a/frmts/iris/makefile.vc +++ /dev/null @@ -1,15 +0,0 @@ - -OBJ = irisdataset.obj - -EXTRAFLAGS = - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/iso8211/GNUmakefile b/frmts/iso8211/GNUmakefile deleted file mode 100644 index 9c0eb9d37017..000000000000 --- a/frmts/iso8211/GNUmakefile +++ /dev/null @@ -1,88 +0,0 @@ - -include ../../GDALmake.opt - -VERSION = 1.4 -DISTDIR = iso8211lib-$(VERSION) -WEB_DIR = /u/www/projects/iso8211 - -CPPFLAGS := -iquote . -iquote ../../port $(CPPFLAGS) - -ISOLIB = libiso8211.a -OBJ = ddfmodule.o ddfutils.o ddffielddefn.o ddfrecord.o ddffield.o \ - ddfsubfielddefn.o - -default: $(ISOLIB) - -all: $(ISOLIB) 8211dump$(EXE) 8211view$(EXE) 8211createfromxml$(EXE) mkcatalog$(EXE) docs - -clean: - rm -rf *.o 8211dump$(EXE) 8211view$(EXE) 8211createfromxml$(EXE) $(DISTDIR) $(DISTDIR).tar.gz html/* \ - $(ISOLIB) - -dist-clean: clean - rm -rf $(DISTDIR) - -$(ISOLIB): $(OBJ:.o=.$(OBJ_EXT)) - $(AR) r $(ISOLIB) $? - $(RANLIB) $(ISOLIB) - -8211createfromxml$(EXE): 8211createfromxml.$(OBJ_EXT) - $(LD) $(LDFLAGS) 8211createfromxml.$(OBJ_EXT) $(CONFIG_LIBS) -o 8211createfromxml$(EXE) - -8211dump$(EXE): 8211dump.$(OBJ_EXT) $(ISOLIB) - $(LD) $(LDFLAGS) 8211dump.$(OBJ_EXT) $(ISOLIB) $(CONFIG_LIBS) -o 8211dump$(EXE) - -8211view$(EXE): 8211view.$(OBJ_EXT) $(ISOLIB) - $(LD) $(LDFLAGS) 8211view.$(OBJ_EXT) $(ISOLIB) $(CONFIG_LIBS) -o 8211view$(EXE) - -timetest$(EXE): timetest.$(OBJ_EXT) - $(LD) $(LDFLAGS) timetest.$(OBJ_EXT) $(CONFIG_LIBS) -o timetest$(EXE) - -upd_test$(EXE): upd_test.$(OBJ_EXT) - $(LD) $(LDFLAGS) upd_test.$(OBJ_EXT) $(CONFIG_LIBS) -o upd_test$(EXE) - -mkcatalog$(EXE): mkcatalog.$(OBJ_EXT) - $(LD) $(LDFLAGS) mkcatalog.$(OBJ_EXT) $(CONFIG_LIBS) -o mkcatalog$(EXE) - -docs: - rm -rf html - mkdir html - doxygen - -dist: docs - rm -rf $(DISTDIR) - mkdir $(DISTDIR) - mkdir $(DISTDIR)/html - cp html/* $(DISTDIR)/html - autoconf - cp *.cpp *.h configure Makefile.in $(DISTDIR) - rm configure - cp ../../port/{cpl_error{.h,.cpp},cpl_port.h,cpl_string.{h,cpp}} $(DISTDIR) - cp ../../port/{cpl_vsisimple.cpp,cpl_config.h.in} $(DISTDIR) - cp ../../port/{cpl_multiproc.cpp,cpl_multiproc.h} $(DISTDIR) - cp ../../port/{cpl_vsi.h,cpl_conv.{cpp,h},cpl_path.cpp} $(DISTDIR) - cp ../../port/cpl_{vsil.cpp,vsi_mem.cpp,vsil_win32.cpp} $(DISTDIR) - cp ../../port/cpl_{vsil_unix_stdio_64.cpp,dir.cpp} $(DISTDIR) - cp ../../port/cpl_{multiproc.{cpp,h},vsi_private.h} $(DISTDIR) - cp ../../port/cpl_config.h.vc.{begin,common,no_dll,end} $(DISTDIR) - tar czf $(DISTDIR).tar.gz $(DISTDIR) - zip -r $(DISTDIR).zip $(DISTDIR) - -update-web: dist docs - cp html/* $(WEB_DIR) - cp $(DISTDIR).tar.gz $(DISTDIR).zip $(WEB_DIR) - scp html/* $(DISTDIR).tar.gz $(DISTDIR).zip \ - warmerda@www.gdal.org:home.gdal.org/projects/iso8211 - - -test: 8211dump - @./teststream.sh > t1.out - @if test "`diff t1.out teststream.out`" = '' ; then \ - echo "******* Stream 1 Succeeded *********"; \ - rm t1.out; \ - else \ - echo "******* Stream 1 Failed *********"; \ - diff t1.out teststream.out; \ - fi - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/iso8211/makefile.vc b/frmts/iso8211/makefile.vc deleted file mode 100644 index c57d348296f4..000000000000 --- a/frmts/iso8211/makefile.vc +++ /dev/null @@ -1,48 +0,0 @@ - -OBJ = ddfmodule.obj ddfutils.obj ddffielddefn.obj ddfrecord.obj \ - ddffield.obj ddfsubfielddefn.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -!IFDEF ZLIB_EXTERNAL_LIB -LINK_ZLIB = $(ZLIB_LIB) -!ELSE -LINK_ZLIB = ..\zlib\*.obj -!ENDIF - -default: $(OBJ) - lib /out:libiso8211.lib $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - -del *.exe - -del *.dll - -del *.lib - -del *.manifest - -del *.exp - -all: default 8211view.exe 8211dump.exe 8211createfromxml.exe - -iso8211.dll: $(OBJ) $(CPLLIB) - link /dll $(LDEBUG) $(OBJ) $(CPLLIB) $(LINK_ZLIB) \ - /out:iso8211.dll /implib:iso8211_i.lib - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - -8211view.exe: 8211view.obj $(OBJ) $(CPLLIB) - $(CC) $(CFLAGS) 8211view.obj $(OBJ) $(CPLLIB) $(LIBICONV_LIBRARY) $(CURL_LIB) $(LINK_ZLIB) /link $(LINKER_FLAGS) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - del 8211view.obj - -8211dump.exe: 8211dump.obj $(OBJ) $(CPLLIB) - $(CC) $(CFLAGS) 8211dump.obj $(OBJ) $(CPLLIB) $(LIBICONV_LIBRARY) $(CURL_LIB) $(LINK_ZLIB) /link $(LINKER_FLAGS) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - del 8211dump.obj - -8211createfromxml.exe: 8211createfromxml.obj $(OBJ) $(CPLLIB) - $(CC) $(CFLAGS) 8211createfromxml.obj $(OBJ) $(CPLLIB) $(LIBICONV_LIBRARY) $(CURL_LIB) $(LINK_ZLIB) /link $(LINKER_FLAGS) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - del 8211createfromxml.obj - diff --git a/frmts/jaxapalsar/GNUmakefile b/frmts/jaxapalsar/GNUmakefile deleted file mode 100644 index 2d89b129d023..000000000000 --- a/frmts/jaxapalsar/GNUmakefile +++ /dev/null @@ -1,10 +0,0 @@ -include ../../GDALmake.opt - -OBJ = jaxapalsardataset.o - - -default: $(OBJ:.o=.$(OBJ_EXT)) -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/jaxapalsar/makefile.vc b/frmts/jaxapalsar/makefile.vc deleted file mode 100644 index 7965457e6a00..000000000000 --- a/frmts/jaxapalsar/makefile.vc +++ /dev/null @@ -1,12 +0,0 @@ -OBJ = jaxapalsardataset.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/jdem/GNUmakefile b/frmts/jdem/GNUmakefile deleted file mode 100644 index 8a7c5e211333..000000000000 --- a/frmts/jdem/GNUmakefile +++ /dev/null @@ -1,13 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = jdemdataset.o - - - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/jdem/makefile.vc b/frmts/jdem/makefile.vc deleted file mode 100644 index d9075b4df6d3..000000000000 --- a/frmts/jdem/makefile.vc +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = jdemdataset.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/jp2kak/GNUmakefile b/frmts/jp2kak/GNUmakefile deleted file mode 100644 index 7e6eb72c0f0b..000000000000 --- a/frmts/jp2kak/GNUmakefile +++ /dev/null @@ -1,33 +0,0 @@ - -include ../../GDALmake.opt - -ifneq (($KAKDIR),) -ifneq ($(HAVE_LIBTOOL),yes) -include $(GDAL_ROOT)/frmts/jp2kak/jp2kak.lst -endif -endif - -OBJ = jp2kakdataset.o - -KAKINC = -I$(KAKDIR)/coresys/common -I$(KAKDIR)/apps/compressed_io \ - -I$(KAKDIR)/apps/jp2 -I$(KAKDIR)/apps/image -I$(KAKDIR)/apps/args \ - -I$(KAKDIR)/apps/support -I$(KAKDIR)/apps/kdu_compress - -APPOBJ = $(KAK_OBJ) - -INSTOBJ = $(foreach d,$(APPOBJ),../o/$(notdir $(d))) - -#CXXFLAGS := $(CXXFLAGS) -DFILEIO_DEBUG - -CPPFLAGS := $(KAKINC) -iquote . $(CPPFLAGS) -DKDU_X86_INTRINSICS - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - rm -f $(INSTOBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) - cp $(APPOBJ) ../o - -$(OBJ) $(O_OBJ): jp2kakdataset.h subfile_source.h diff --git a/frmts/jp2kak/makefile.vc b/frmts/jp2kak/makefile.vc deleted file mode 100644 index c6ae31232491..000000000000 --- a/frmts/jp2kak/makefile.vc +++ /dev/null @@ -1,64 +0,0 @@ - -PLUGIN_DLL = gdal_JP2KAK.dll -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -KAKINC = -I$(KAKSRC)/managed/all_includes \ - -I$(KAKSRC)/apps/jp2 \ - $(KAKEXTRAINCS) - -OBJ_EXT = obj -OBJ_PREFIX = $(KAKOBJDIR) -OBJ_CONFIG = release - -# Starting with Kakadu V7.9.1, one can use both Kakadu DLLs -!IFDEF KAKOBJDIR -KAK_APPS_OBJ = \ - $(OBJ_PREFIX)\compress\$(OBJ_CONFIG)\args.obj \ - $(OBJ_PREFIX)\compress\$(OBJ_CONFIG)\image_in.obj \ - $(OBJ_PREFIX)\expand\$(OBJ_CONFIG)\image_out.obj \ - $(OBJ_PREFIX)\compress\$(OBJ_CONFIG)\jp2.obj \ - $(OBJ_PREFIX)\merge\$(OBJ_CONFIG)\mj2.obj \ - $(OBJ_PREFIX)\compress\$(OBJ_CONFIG)\roi_sources.obj \ - $(OBJ_PREFIX)\compress\$(OBJ_CONFIG)\palette.obj \ - $(OBJ_PREFIX)\buffered_expand\$(OBJ_CONFIG)\kdu_stripe_decompressor.obj \ - $(OBJ_PREFIX)\render\$(OBJ_CONFIG)\kdu_region_decompressor.obj \ - $(OBJ_PREFIX)\compress\$(OBJ_CONFIG)\kdu_tiff.obj \ - $(OBJ_PREFIX)\compress\$(OBJ_CONFIG)\jpx.obj - -!IFDEF KAKADU_7_5_OR_LATER -KAK_APPS_OBJ = $(KAK_APPS_OBJ) \ - $(OBJ_PREFIX)\buffered_expand\$(OBJ_CONFIG)\avx2_stripe_transfer.obj \ - $(OBJ_PREFIX)\buffered_expand\$(OBJ_CONFIG)\ssse3_stripe_transfer.obj \ - $(OBJ_PREFIX)\render\$(OBJ_CONFIG)\ssse3_region_decompressor.obj \ -!ENDIF -!ENDIF - -# TODO: add kdu_client_window.obj -#!IFDEF KAKADU_7_7_OR_LATER -# -#!ENDIF - -OBJ = jp2kakdataset.obj -EXTRAFLAGS = $(KAKINC) /DKDU_PENTIUM_MSVC /EHsc $(KAKFLAGS) - -default: $(OBJ) kakinstall - xcopy /D /Y *.obj ..\o - -kakinstall: - for %d in ( $(KAK_APPS_OBJ) ) do \ - xcopy /D /Y %d ..\o - -plugin: $(PLUGIN_DLL) -$(PLUGIN_DLL): $(OBJ) kakinstall - link /dll $(LDEBUG) /out:$(PLUGIN_DLL) $(OBJ) $(GDALLIB) $(KAKLIB) - -plugin-install: - -mkdir $(PLUGINDIR) - $(INSTALL) $(PLUGIN_DLL) $(PLUGINDIR) - -clean: - -del *.obj - -del $(PLUGIN_DLL) - diff --git a/frmts/jp2lura/GNUmakefile b/frmts/jp2lura/GNUmakefile deleted file mode 100644 index 96b910fbe1b5..000000000000 --- a/frmts/jp2lura/GNUmakefile +++ /dev/null @@ -1,22 +0,0 @@ -include ../../GDALmake.opt - -OBJ = jp2luracallbacks.o jp2lurarasterband.o jp2luradataset.o - -CPPFLAGS := -DFRMT_jp2lura -iquote .. $(CPPFLAGS) $(JP2LURA_INCLUDE) $(EXTRA_CFLAGS) - -PLUGIN_SO = gdal_JP2Lura.so - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) *.so - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) - -$(OBJ) $(O_OBJ): jp2luracallbacks.h jp2lurarasterband.h jp2luradataset.h - -plugin: $(PLUGIN_SO) - -$(PLUGIN_SO): $(OBJ) - $(LD_SHARED) $(LNK_FLAGS) $(OBJ) $(CONFIG_LIBS) $(EXTRA_LIBS) \ - -o $(PLUGIN_SO) diff --git a/frmts/jp2lura/makefile.vc b/frmts/jp2lura/makefile.vc deleted file mode 100644 index db274ac5560e..000000000000 --- a/frmts/jp2lura/makefile.vc +++ /dev/null @@ -1,32 +0,0 @@ - -OBJ = jp2luracallbacks.obj jp2lurarasterband.obj jp2luradataset.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -EXTRAFLAGS = -I.. $(LURATECH_CFLAGS) - -PLUGIN_DLL = gdal_JP2Lura.dll - - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - -del $(PLUGIN_DLL) - -del *.exp - -del *.manifest - -del *.lib - -plugin: $(PLUGIN_DLL) - -$(PLUGIN_DLL): $(OBJ) - link /dll $(LDEBUG) /out:$(PLUGIN_DLL) $(OBJ) $(GDALLIB) $(LURATECH_LIB) - if exist $(PLUGIN_DLL).manifest mt -manifest $(PLUGIN_DLL).manifest -outputresource:$(PLUGIN_DLL);2 - -plugin-install: - -mkdir $(PLUGINDIR) - $(INSTALL) $(PLUGIN_DLL) $(PLUGINDIR) - diff --git a/frmts/jpeg/GNUmakefile b/frmts/jpeg/GNUmakefile deleted file mode 100644 index d1f4dc238bc2..000000000000 --- a/frmts/jpeg/GNUmakefile +++ /dev/null @@ -1,74 +0,0 @@ - -include ../../GDALmake.opt - -ifeq ($(JPEG_SETTING),internal) -OBJ = \ - jcapimin.o jcapistd.o jccoefct.o jccolor.o jcdctmgr.o jchuff.o \ - jcinit.o jcmainct.o jcmarker.o jcmaster.o jcomapi.o jcparam.o \ - jcphuff.o jcprepct.o jcsample.o jctrans.o jdapimin.o jdapistd.o \ - jdatadst.o jdatasrc.o jdcoefct.o jdcolor.o jddctmgr.o jdhuff.o \ - jdinput.o jdmainct.o jdmarker.o jdmaster.o jdmerge.o jdphuff.o \ - jdpostct.o jdsample.o jdtrans.o jerror.o jfdctflt.o jfdctfst.o \ - jfdctint.o jidctflt.o jidctfst.o jidctint.o jidctred.o jquant1.o \ - jquant2.o jutils.o jmemmgr.o jmemnobs.o \ - \ - jpgdataset.o vsidataio.o -XTRA_OPT = -Ilibjpeg -else -OBJ = jpgdataset.o vsidataio.o -XTRA_OPT = -endif - -ifeq ($(JPEG12_ENABLED),yes) -XTRA_OPT_12 = -Ilibjpeg12 -XTRA_OPT := -DJPEG_DUAL_MODE_8_12 $(XTRA_OPT) -OBJ := jcapimin12.o jcapistd12.o jccoefct12.o jccolor12.o jcdctmgr12.o jchuff12.o \ - jcinit12.o jcmainct12.o jcmarker12.o jcmaster12.o jcomapi12.o jcparam12.o \ - jcphuff12.o jcprepct12.o jcsample12.o jctrans12.o jdapimin12.o jdapistd12.o \ - jdatadst12.o jdatasrc12.o jdcoefct12.o jdcolor12.o jddctmgr12.o jdhuff12.o \ - jdinput12.o jdmainct12.o jdmarker12.o jdmaster12.o jdmerge12.o jdphuff12.o \ - jdpostct12.o jdsample12.o jdtrans12.o jerror12.o jfdctflt12.o jfdctfst12.o \ - jfdctint12.o jidctflt12.o jidctfst12.o jidctint12.o jidctred12.o jquant112.o \ - jquant212.o jutils12.o jmemmgr12.o jmemnobs12.o \ - $(OBJ) jpgdataset_12.o vsidataio_12.o -endif - -CPPFLAGS := -iquote ../mem $(XTRA_OPT) $(CPPFLAGS) -# # Enable this to compile with -Wextra -Werror and get around the jump complaint. -# CPPFLAGS += -Wno-clobbered - -ifeq ($(RENAME_INTERNAL_LIBJPEG_SYMBOLS),yes) -CPPFLAGS := -DRENAME_INTERNAL_LIBJPEG_SYMBOLS $(CPPFLAGS) -endif - -default: install-obj - -$(O_OBJ): jpgdataset.cpp vsidataio.cpp - -clean: - rm -f *.o $(O_OBJ) libjpeg12/*.c libjpeg12/*.h - -../o/%.$(OBJ_EXT): libjpeg/%.c - $(CC) -c $(CPPFLAGS) $(CFLAGS) -DENABLE_LIBJPEG_NO_RETURN $< -o $@ - -../o/%.$(OBJ_EXT): libjpeg12/%.c - $(CC) -c $(XTRA_OPT_12) $(CPPFLAGS) $(CFLAGS) -DENABLE_LIBJPEG_NO_RETURN $< -o $@ - -all: $(OBJ:.o=.$(OBJ_EXT)) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) - -import: - mv libjpeg/jmorecfg.h libjpeg/jmorecfg.h.safe - mv libjpeg/jconfig.h libjpeg/jconfig.h.safe - (cd libjpeg; copymatch.sh ~/libjpeg *.c *.h) - mv libjpeg/jmorecfg.h.safe libjpeg/jmorecfg.h - mv libjpeg/jconfig.h.safe libjpeg/jconfig.h - -libjpeg12/jcapimin12.c: libjpeg/jcapimin.c - cp libjpeg/*.h libjpeg12 - cp libjpeg12/jmorecfg.h.12 libjpeg12/jmorecfg.h - for x in libjpeg/*.c ; do \ - b=`basename $$x .c`; \ - cp $$x libjpeg12/$${b}12.c; \ - done diff --git a/frmts/jpeg/libjpeg/makefile.vc b/frmts/jpeg/libjpeg/makefile.vc deleted file mode 100644 index 8d48e59fac98..000000000000 --- a/frmts/jpeg/libjpeg/makefile.vc +++ /dev/null @@ -1,25 +0,0 @@ -GDAL_ROOT = ..\..\.. -!INCLUDE $(GDAL_ROOT)\nmake.opt - - -OBJ = \ - jcapimin.obj jcapistd.obj jccoefct.obj jccolor.obj jcdctmgr.obj jchuff.obj \ - jcinit.obj jcmainct.obj jcmarker.obj jcmaster.obj jcomapi.obj jcparam.obj \ - jcphuff.obj jcprepct.obj jcsample.obj jctrans.obj jdapimin.obj jdapistd.obj \ - jdatadst.obj jdatasrc.obj jdcoefct.obj jdcolor.obj jddctmgr.obj jdhuff.obj \ - jdinput.obj jdmainct.obj jdmarker.obj jdmaster.obj jdmerge.obj jdphuff.obj \ - jdpostct.obj jdsample.obj jdtrans.obj jerror.obj jfdctflt.obj jfdctfst.obj \ - jfdctint.obj jidctflt.obj jidctfst.obj jidctint.obj jidctred.obj jquant1.obj \ - jquant2.obj jutils.obj jmemmgr.obj jmemnobs.obj - -GDAL_ROOT = ..\..\.. - -EXTRAFLAGS = $(SOFTWARNFLAGS) - -default: $(OBJ) - lib /out:libjpeg.lib $(OBJ) - xcopy /D /Y *.obj ..\..\o - -clean: - -del *.lib - -del *.obj diff --git a/frmts/jpeg/libjpeg12/makefile.vc b/frmts/jpeg/libjpeg12/makefile.vc deleted file mode 100644 index 1887ebbdb81b..000000000000 --- a/frmts/jpeg/libjpeg12/makefile.vc +++ /dev/null @@ -1,76 +0,0 @@ -GDAL_ROOT = ..\..\.. -!INCLUDE $(GDAL_ROOT)\nmake.opt - - -OBJ = \ - jcapimin12.obj jcapistd12.obj jccoefct12.obj jccolor12.obj jcdctmgr12.obj jchuff12.obj \ - jcinit12.obj jcmainct12.obj jcmarker12.obj jcmaster12.obj jcomapi12.obj jcparam12.obj \ - jcphuff12.obj jcprepct12.obj jcsample12.obj jctrans12.obj jdapimin12.obj jdapistd12.obj \ - jdatadst12.obj jdatasrc12.obj jdcoefct12.obj jdcolor12.obj jddctmgr12.obj jdhuff12.obj \ - jdinput12.obj jdmainct12.obj jdmarker12.obj jdmaster12.obj jdmerge12.obj jdphuff12.obj \ - jdpostct12.obj jdsample12.obj jdtrans12.obj jerror12.obj jfdctflt12.obj jfdctfst12.obj \ - jfdctint12.obj jidctflt12.obj jidctfst12.obj jidctint12.obj jidctred12.obj jquant112.obj \ - jquant212.obj jutils12.obj jmemmgr12.obj jmemnobs12.obj - -GDAL_ROOT = ..\..\.. - -EXTRAFLAGS = $(SOFTWARNFLAGS) - -default: jcapimin12.c $(OBJ) - xcopy /D /Y *.obj ..\..\o - -jcapimin12.c: ../libjpeg/jcapimin.c - xcopy /Y ..\libjpeg\*.h - xcopy /Y jmorecfg.h.12 jmorecfg.h - xcopy /Y ..\libjpeg\*.c - ren jcapimin.c jcapimin12.c - ren jcapistd.c jcapistd12.c - ren jccoefct.c jccoefct12.c - ren jccolor.c jccolor12.c - ren jcdctmgr.c jcdctmgr12.c - ren jchuff.c jchuff12.c - ren jcinit.c jcinit12.c - ren jcmainct.c jcmainct12.c - ren jcmarker.c jcmarker12.c - ren jcmaster.c jcmaster12.c - ren jcomapi.c jcomapi12.c - ren jcparam.c jcparam12.c - ren jcphuff.c jcphuff12.c - ren jcprepct.c jcprepct12.c - ren jcsample.c jcsample12.c - ren jctrans.c jctrans12.c - ren jdapimin.c jdapimin12.c - ren jdapistd.c jdapistd12.c - ren jdatadst.c jdatadst12.c - ren jdatasrc.c jdatasrc12.c - ren jdcoefct.c jdcoefct12.c - ren jdcolor.c jdcolor12.c - ren jddctmgr.c jddctmgr12.c - ren jdhuff.c jdhuff12.c - ren jdinput.c jdinput12.c - ren jdmainct.c jdmainct12.c - ren jdmarker.c jdmarker12.c - ren jdmaster.c jdmaster12.c - ren jdmerge.c jdmerge12.c - ren jdphuff.c jdphuff12.c - ren jdpostct.c jdpostct12.c - ren jdsample.c jdsample12.c - ren jdtrans.c jdtrans12.c - ren jerror.c jerror12.c - ren jfdctflt.c jfdctflt12.c - ren jfdctfst.c jfdctfst12.c - ren jfdctint.c jfdctint12.c - ren jidctflt.c jidctflt12.c - ren jidctfst.c jidctfst12.c - ren jidctint.c jidctint12.c - ren jidctred.c jidctred12.c - ren jmemnobs.c jmemnobs12.c - ren jmemmgr.c jmemmgr12.c - ren jquant1.c jquant112.c - ren jquant2.c jquant212.c - ren jutils.c jutils12.c - -clean: - -del *.obj - -del *.c - -del *.h diff --git a/frmts/jpeg/makefile.vc b/frmts/jpeg/makefile.vc deleted file mode 100644 index 718748fd3dd0..000000000000 --- a/frmts/jpeg/makefile.vc +++ /dev/null @@ -1,42 +0,0 @@ -GDAL_ROOT = ..\.. -!INCLUDE $(GDAL_ROOT)\nmake.opt - -OBJ = jpgdataset.obj jpgdataset_12.obj vsidataio.obj vsidataio_12.obj - -!IFDEF JPEG_EXTERNAL_LIB -EXTRAFLAGS = -I..\mem -I$(JPEGDIR) $(JPEG12_FLAGS) -!ELSE -EXTRAFLAGS = -I..\mem -Ilibjpeg $(JPEG12_FLAGS) -!ENDIF - -!IFDEF JPEG12_SUPPORTED -JPEG12_FLAGS = -DJPEG_DUAL_MODE_8_12 -EXTRA_DEP = libjpeg12src -!ENDIF - -default: $(EXTRA_DEP) $(OBJ) - xcopy /D /Y *.obj ..\o -!IFNDEF JPEG_EXTERNAL_LIB - cd libjpeg - $(MAKE) /f makefile.vc - cd .. -!ENDIF -!IFDEF JPEG12_SUPPORTED - cd libjpeg12 - $(MAKE) /f makefile.vc - cd .. -!ENDIF - -clean: - -del *.obj - cd libjpeg - $(MAKE) /f makefile.vc clean - cd .. - cd libjpeg12 - $(MAKE) /f makefile.vc clean - cd .. - -libjpeg12src: - cd libjpeg12 - $(MAKE) /f makefile.vc jcapimin12.c - cd .. diff --git a/frmts/jpipkak/GNUmakefile b/frmts/jpipkak/GNUmakefile deleted file mode 100644 index 64e50a9e0b62..000000000000 --- a/frmts/jpipkak/GNUmakefile +++ /dev/null @@ -1,40 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = jpipkakdataset.o kdu_cache.o - -KAKINC = -I$(KAKDIR)/coresys/common -I$(KAKDIR)/apps/compressed_io \ - -I$(KAKDIR)/apps/jp2 -I$(KAKDIR)/apps/image -I$(KAKDIR)/apps/args \ - -I$(KAKDIR)/apps/support -I$(KAKDIR)/apps/kdu_compress \ - -I$(KAKDIR)/apps/caching_sources - -APPOBJ = $(KAK_OBJ) - -INSTOBJ = $(foreach d,$(APPOBJ),../o/$(notdir $(d))) - -#CXXFLAGS := $(CXXFLAGS) -DFILEIO_DEBUG - -CPPFLAGS := $(KAKINC) -iquote . $(CPPFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -# kdu_cache.cpp does not appear to be built by default by the Kakadu -# apps makefiles, so we copy it and build it ourselves. Perhaps this -# won't be needed with newer versions of Kakadu. Tested with 6.2. -kdu_cache.cpp: $(KAKDIR)/apps/caching_sources/kdu_cache.cpp - echo "#include \"cpl_port.h\"" > kdu_cache_wrapper.h - echo "#ifdef HAVE_GCC_SYSTEM_HEADER" >> kdu_cache_wrapper.h - echo "#pragma GCC system_header" >> kdu_cache_wrapper.h - echo "#endif" >> kdu_cache_wrapper.h - cat $(KAKDIR)/apps/caching_sources/kdu_cache.cpp >> kdu_cache_wrapper.h - echo "#include \"kdu_cache_wrapper.h\"" > kdu_cache.cpp - -clean: - rm -f *.o $(O_OBJ) - rm -f $(INSTOBJ) - rm -f kdu_cache.cpp - rm -f kdu_cache_wrapper.h - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) - - diff --git a/frmts/jpipkak/makefile.vc b/frmts/jpipkak/makefile.vc deleted file mode 100644 index 13e7d0f43ecb..000000000000 --- a/frmts/jpipkak/makefile.vc +++ /dev/null @@ -1,36 +0,0 @@ -PLUGIN_DLL = gdal_JPIPKAK.dll -GDAL_ROOT = ..\.. - -KAKINC = -I$(KAKSRC)/managed/all_includes \ - -I$(KAKSRC)/apps/jp2 -I$(KAKSRC)/apps/caching_sources \ - $(KAKEXTRAINCS) - -OBJ = jpipkakdataset.obj -# Starting with Kakadu V7.9.1, one can use both Kakadu DLLs -!IFDEF KAKOBJDIR -# File "kdu_cache.obj" is already in Kakadu library -OBJ = $(OBJ) kdu_cache.obj -!ENDIF - -EXTRAFLAGS = $(KAKINC) -DKDU_PENTIUM_MSVC /EHsc - -!INCLUDE $(GDAL_ROOT)\nmake.opt - - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -kdu_cache.cpp: $(KAKSRC)\apps\caching_sources\kdu_cache.cpp - copy $(KAKSRC)\apps\caching_sources\kdu_cache.cpp - -plugin: $(PLUGIN_DLL) -$(PLUGIN_DLL): $(OBJ) - link /dll $(LDEBUG) /out:$(PLUGIN_DLL) $(OBJ) $(GDALLIB) $(KAKLIB) - -plugin-install: - -mkdir $(PLUGINDIR) - $(INSTALL) $(PLUGIN_DLL) $(PLUGINDIR) - -clean: - -del *.obj - -del *.dll diff --git a/frmts/kea/GNUmakefile b/frmts/kea/GNUmakefile deleted file mode 100644 index e63bc987860b..000000000000 --- a/frmts/kea/GNUmakefile +++ /dev/null @@ -1,15 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = keaband.o keacopy.o keadataset.o keadriver.o keamaskband.o keaoverview.o kearat.o - -CPPFLAGS := $(KEA_INC) $(CPPFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(OBJ) $(O_OBJ): keaband.h keacopy.h keadataset.h keamaskband.h keaoverview.h kearat.h - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/kea/makefile.vc b/frmts/kea/makefile.vc deleted file mode 100644 index 8e81161ab609..000000000000 --- a/frmts/kea/makefile.vc +++ /dev/null @@ -1,26 +0,0 @@ - -OBJ = keaband.obj keacopy.obj keadataset.obj keadriver.obj keamaskband.obj keaoverview.obj kearat.obj - -EXTRAFLAGS = $(KEA_CFLAGS) -DH5_BUILT_AS_DYNAMIC_LIB - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - -PLUGIN_DLL = gdal_KEA.dll - -plugin: $(PLUGIN_DLL) - -$(PLUGIN_DLL): $(OBJ) - link /dll $(LDEBUG) /out:$(PLUGIN_DLL) $(OBJ) $(GDALLIB) $(KEA_LIB) - if exist $(PLUGIN_DLL).manifest mt -manifest $(PLUGIN_DLL).manifest -outputresource:$(PLUGIN_DLL);2 - -plugin-install: - -mkdir $(PLUGINDIR) - $(INSTALL) $(PLUGIN_DLL) $(PLUGINDIR) diff --git a/frmts/kmlsuperoverlay/GNUmakefile b/frmts/kmlsuperoverlay/GNUmakefile deleted file mode 100644 index 8cccabd44f21..000000000000 --- a/frmts/kmlsuperoverlay/GNUmakefile +++ /dev/null @@ -1,15 +0,0 @@ - - -include ../../GDALmake.opt - -OBJ = kmlsuperoverlaydataset.o - - - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ:.o=.$(OBJ_EXT)) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) - diff --git a/frmts/kmlsuperoverlay/makefile.vc b/frmts/kmlsuperoverlay/makefile.vc deleted file mode 100644 index d2526ddfc4f8..000000000000 --- a/frmts/kmlsuperoverlay/makefile.vc +++ /dev/null @@ -1,20 +0,0 @@ -OBJ = kmlsuperoverlaydataset.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - $(INSTALL) *.obj ..\o - -all: default - -clean: - -del *.obj - -del *.dll - -del *.exp - -del *.lib - -del *.manifest - -del *.pdb - -del *.ilk - diff --git a/frmts/l1b/GNUmakefile b/frmts/l1b/GNUmakefile deleted file mode 100644 index df52ea6fa576..000000000000 --- a/frmts/l1b/GNUmakefile +++ /dev/null @@ -1,13 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = l1bdataset.o - - - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/l1b/makefile.vc b/frmts/l1b/makefile.vc deleted file mode 100644 index 507b6019cd59..000000000000 --- a/frmts/l1b/makefile.vc +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = l1bdataset.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/leveller/GNUmakefile b/frmts/leveller/GNUmakefile deleted file mode 100644 index 50cc6ae8f832..000000000000 --- a/frmts/leveller/GNUmakefile +++ /dev/null @@ -1,13 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = levellerdataset.o - - - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/leveller/makefile.vc b/frmts/leveller/makefile.vc deleted file mode 100644 index 8f12eefbbf52..000000000000 --- a/frmts/leveller/makefile.vc +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = levellerdataset.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/makefile.vc b/frmts/makefile.vc deleted file mode 100644 index 3bc68711f20c..000000000000 --- a/frmts/makefile.vc +++ /dev/null @@ -1,244 +0,0 @@ - -GDAL_ROOT = .. - -EXTRAFLAGS = -DFRMT_ceos -DFRMT_aigrid -DFRMT_elas -DFRMT_hfa -DFRMT_gtiff\ - -DFRMT_sdts -DFRMT_raw -DFRMT_gxf -DFRMT_ceos2 -DFRMT_png \ - -DFRMT_dted -DFRMT_mem -DFRMT_jdem -DFRMT_gif -DFRMT_esric \ - -DFRMT_envisat -DFRMT_aaigrid -DFRMT_usgsdem -DFRMT_l1b \ - -DFRMT_fit -DFRMT_vrt -DFRMT_xpm -DFRMT_bmp -DFRMT_rmf \ - -DFRMT_nitf -DFRMT_pcidsk -DFRMT_airsar -DFRMT_rs2 \ - -DFRMT_ilwis -DFRMT_msgn -DFRMT_rik -DFRMT_pcraster \ - -DFRMT_leveller -DFRMT_sgi -DFRMT_srtmhgt -DFRMT_idrisi \ - -DFRMT_jaxapalsar -DFRMT_ers -DFRMT_dimap \ - -DFRMT_gff -DFRMT_terragen -DFRMT_gsg -DFRMT_cosar -DFRMT_pds \ - -DFRMT_adrg -DFRMT_coasp -DFRMT_tsx -DFRMT_blx -DFRMT_til \ - -DFRMT_r -DFRMT_northwood -DFRMT_saga -DFRMT_xyz -DFRMT_hf2 \ - -DFRMT_kmlsuperoverlay -DFRMT_ozi -DFRMT_ctg \ - -DFRMT_zmap -DFRMT_ngsgeoid -DFRMT_iris -DFRMT_map -DFRMT_cals \ - -DFRMT_safe -DFRMT_sentinel2 -DFRMT_derived -DFRMT_prf \ - -DFRMT_sigdem -DFRMT_tga -DFRMT_stacit -DFRMT_stacta -DFRMT_zarr - -MOREEXTRA = - -DIRLIST = $(EXTRAFLAGS:-DFRMT_=) - -PLUGINFLAGS = - -PLUGINDIRLIST = $(PLUGINFLAGS:-DFRMT_=) - -!INCLUDE $(GDAL_ROOT)/nmake.opt - -!IFDEF PG_INC_DIR -EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_postgisraster -!ENDIF - -!IFDEF JPEG_SUPPORTED -EXTRAFLAGS = -DFRMT_jpeg $(EXTRAFLAGS) -!ENDIF - -!IFDEF BSB_SUPPORTED -EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_bsb -!ENDIF - -!IFDEF OGDIDIR -!ELSE -!IFNDEF ZLIB_EXTERNAL_LIB -EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_zlib -!ENDIF -!ENDIF - -!IFDEF OPENJPEG_ENABLED -EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_openjpeg -!ENDIF - -!IFDEF KAKDIR -!IF "$(JP2KAK_PLUGIN)" != "YES" -EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_jp2kak -DFRMT_jpipkak -!ELSE -PLUGINFLAGS = $(PLUGINFLAGS) -DFRMT_jp2kak -DFRMT_jpipkak -!ENDIF -!ENDIF - -!IFDEF ECWDIR -!IF "$(ECW_PLUGIN)" != "YES" -EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_ecw -!ELSE -PLUGINFLAGS = $(PLUGINFLAGS) -DFRMT_ecw -!ENDIF -!ENDIF - -!IFDEF LURATECH_CFLAGS -!IF "$(JP2LURA_PLUGIN)" != "YES" -EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_jp2lura -!ELSE -PLUGINFLAGS = $(PLUGINFLAGS) -DFRMT_jp2lura -!ENDIF -!ENDIF - -!IFDEF HDF4_DIR -!IF "$(HDF4_PLUGIN)" != "YES" -EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_hdf4 -!ELSE -PLUGINFLAGS = $(PLUGINFLAGS) -DFRMT_hdf4 -!ENDIF -!ENDIF - -!IFDEF HDF5_DIR -!IF "$(HDF5_PLUGIN)" != "YES" -EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_hdf5 -!ELSE -PLUGINFLAGS = $(PLUGINFLAGS) -DFRMT_hdf5 -!ENDIF -!ENDIF - -!IF DEFINED(MRSID_DIR) || DEFINED(MRSID_RASTER_DIR) -!INCLUDE mrsid\nmake.opt -!ENDIF - -!IFDEF MRSID_RASTER_DIR -!IF "$(MRSID_PLUGIN)" != "YES" -EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_mrsid -!ELSE -PLUGINFLAGS = $(PLUGINFLAGS) -DFRMT_mrsid -!ENDIF -!ENDIF - -!IFDEF FITS_INC_DIR -!IF "$(FITS_PLUGIN)" != "YES" -EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_fits -!ELSE -PLUGINFLAGS = $(PLUGINFLAGS) -DFRMT_fits -!ENDIF -!ENDIF - -!IF "$(PDF_PLUGIN)" != "YES" -EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_pdf -!ELSE -PLUGINFLAGS = $(PLUGINFLAGS) -DFRMT_pdf -!ENDIF - -!IFDEF NETCDF_SETTING -!IF "$(NETCDF_PLUGIN)" != "YES" -EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_netcdf -!ELSE -PLUGINFLAGS = $(PLUGINFLAGS) -DFRMT_netcdf -!ENDIF -!ENDIF - -!IFDEF GRIB_SETTING -EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_grib -!ENDIF - -!IFDEF CURL_LIB -EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_wcs -DFRMT_wms -DFRMT_plmosaic -DFRMT_wmts -DFRMT_eeda -DFRMT_daas -DFRMT_ogcapi -!ENDIF - -!IFDEF RASDAMAN_ENABLED -EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_rasdaman -!ENDIF - -!IFDEF OCI_LIB -!IF "$(OCI_PLUGIN)" != "YES" -EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_georaster -!ELSE -PLUGINFLAGS = $(PLUGINFLAGS) -DFRMT_georaster -!ENDIF -!ENDIF - -!IFDEF INCLUDE_OGR_FRMTS -!IFDEF SQLITE_LIB -EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_rasterlite -DFRMT_mbtiles -!ENDIF -!ENDIF - -!IFDEF WEBP_ENABLED -EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_webp -!ENDIF - -!IFDEF GTA_CFLAGS -EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_gta -!ENDIF - -!IFDEF INCLUDE_OGR_FRMTS -EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_arg -!ENDIF - -!IFDEF KEA_CFLAGS -!IF "$(KEA_PLUGIN)" != "YES" -EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_kea -!ELSE -PLUGINFLAGS = $(PLUGINFLAGS) -DFRMT_kea -!ENDIF -!ENDIF - -!IFDEF MRF_SETTING -EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_mrf -!ENDIF - -!IFDEF TILEDB_ENABLED -EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_tiledb -!ENDIF - -!IFDEF RDB_ENABLED -EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_rdb -!ENDIF - -!IFDEF CRUNCH_INC -EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_dds -!ENDIF - -!IFDEF OPENEXR_INC -EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_exr -!ENDIF - -!IFDEF HEIF_INC -EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_heif -!ENDIF - -default: o\gdalallregister.obj subdirs - -list: - echo $(DIRLIST) - echo $(PLUGINDIRLIST) - -subdirs: - for %d in ( $(DIRLIST) ) do \ - cd %d \ - && $(MAKE) /f makefile.vc \ - && cd .. \ - || exit 1 - -plugindirs: - -for %d in ( $(PLUGINDIRLIST) ) do \ - cd %d \ - && $(MAKE) /f makefile.vc plugin \ - && cd .. \ - || exit 1 - -o\gdalallregister.obj: gdalallregister.cpp ..\nmake.opt - $(CC) $(CFLAGS) $(MOREEXTRA) /c gdalallregister.cpp - copy gdalallregister.obj o - -clean: - -del o\*.obj *.obj - -for %d in ( $(DIRLIST) ) do \ - cd %d \ - && $(MAKE) /f makefile.vc clean \ - && cd .. \ - || exit 1 - -for %d in ( $(PLUGINDIRLIST) ) do \ - cd %d \ - && $(MAKE) /f makefile.vc clean \ - && cd .. \ - || exit 1 - cd iso8211 - $(MAKE) /f makefile.vc clean - -plugins-install: - -for %d in ( $(PLUGINDIRLIST) ) do \ - cd %d \ - && $(MAKE) /f makefile.vc plugin-install \ - && cd .. \ - || exit 1 - -mkdir $(PLUGINDIR) - $(INSTALL) drivers.ini $(PLUGINDIR) diff --git a/frmts/map/GNUmakefile b/frmts/map/GNUmakefile deleted file mode 100644 index ec2560c70892..000000000000 --- a/frmts/map/GNUmakefile +++ /dev/null @@ -1,11 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = mapdataset.o - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/map/makefile.vc b/frmts/map/makefile.vc deleted file mode 100644 index 24b7d0c26b69..000000000000 --- a/frmts/map/makefile.vc +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = mapdataset.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/mbtiles/GNUmakefile b/frmts/mbtiles/GNUmakefile deleted file mode 100644 index 953df4656dd3..000000000000 --- a/frmts/mbtiles/GNUmakefile +++ /dev/null @@ -1,23 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = mbtilesdataset.o - -ifeq ($(LIBZ_SETTING),internal) - XTRA_OPT := $(XTRA_OPT) -I../zlib -endif - -CPPFLAGS := -iquote ../../ogr/ogrsf_frmts/geojson -iquote ../../ogr/ogrsf_frmts/mvt $(JSON_INCLUDE) $(XTRA_OPT) $(CPPFLAGS) -iquote ../../ogr -iquote ../../ogr/ogrsf_frmts/gpkg -iquote ../../ogr/ogrsf_frmts/sqlite $(SQLITE_INC) -DHAVE_SQLITE - -ifeq ($(HAVE_GEOS),yes) -CPPFLAGS := -DHAVE_GEOS=1 $(CPPFLAGS) -endif - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) - -$(O_OBJ): ../../ogr/ogrsf_frmts/gpkg/gpkgmbtilescommon.h diff --git a/frmts/mbtiles/makefile.vc b/frmts/mbtiles/makefile.vc deleted file mode 100644 index e9438fac039e..000000000000 --- a/frmts/mbtiles/makefile.vc +++ /dev/null @@ -1,21 +0,0 @@ - -OBJ = mbtilesdataset.obj - -EXTRAFLAGS = -I../../ogr -I../../ogr/ogrsf_frmts/gpkg -I../../ogr/ogrsf_frmts/sqlite $(SQLITE_INC) -I../../ogr/ogrsf_frmts/geojson -I../../ogr/ogrsf_frmts/geojson/libjson -I../../ogr/ogrsf_frmts/mvt $(ZLIB_FLAGS) $(GEOS_CFLAGS) -DHAVE_SQLITE - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -!IFDEF ZLIB_EXTERNAL_LIB -ZLIB_FLAGS = $(ZLIB_INC) -!ELSE -ZLIB_FLAGS = -I..\zlib -!ENDIF - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/mem/GNUmakefile b/frmts/mem/GNUmakefile deleted file mode 100644 index 6a311918c94e..000000000000 --- a/frmts/mem/GNUmakefile +++ /dev/null @@ -1,17 +0,0 @@ - - -include ../../GDALmake.opt - -OBJ = memdataset.o - - - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) - -install: - $(INSTALL_DATA) memdataset.h $(DESTDIR)$(INST_INCLUDE) diff --git a/frmts/mem/makefile.vc b/frmts/mem/makefile.vc deleted file mode 100644 index b73044019d47..000000000000 --- a/frmts/mem/makefile.vc +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = memdataset.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/mrf/GNUmakefile b/frmts/mrf/GNUmakefile deleted file mode 100644 index b3f25cb1ce51..000000000000 --- a/frmts/mrf/GNUmakefile +++ /dev/null @@ -1,103 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -include ../../GDALmake.opt - -PLUGIN_PATH = $(prefix)/lib/gdalplugins/$(GDAL_VERSION_MAJOR).$(GDAL_VERSION_MINOR) -FILES = marfa_dataset mrf_band JPEG_band PNG_band JPNG_band Tif_band Packer_RLE mrf_util mrf_overview -OBJ = $(addsuffix .o, $(FILES)) -LO_O_OBJ = $(addsuffix .lo,$(basename $(O_OBJ))) -DEPENDS = marfa.h - -# For GDAL < 2.1 -CPPFLAGS := $(GDAL_INCLUDE) $(CPPFLAGS) -DHAVE_PNG -DHAVE_JPEG - -# JPEG12_ENABLED is set only with the internal jpeg library -ifeq ($(JPEG12_ENABLED),yes) -FILES := $(FILES) JPEG12_band -XTRA_OPT := $(XTRA_OPT) -DJPEG12_SUPPORTED -PREDEPEND = libjpeg12 -endif - -ifeq ($(JPEG_SETTING),internal) -XTRA_OPT := $(XTRA_OPT) -I../jpeg/libjpeg -ifeq ($(RENAME_INTERNAL_LIBJPEG_SYMBOLS),yes) -XTRA_OPT := $(XTRA_OPT) -DRENAME_INTERNAL_LIBJPEG_SYMBOLS -endif -endif - -ifeq ($(PNG_SETTING),internal) -XTRA_OPT := $(XTRA_OPT) -I../png/libpng -DINTERNAL_PNG - -ifeq ($(RENAME_INTERNAL_PNG_SYMBOLS),yes) -XTRA_OPT := $(XTRA_OPT) -DRENAME_INTERNAL_PNG_SYMBOLS -endif - -endif - -ifeq ($(LIBZ_SETTING),internal) -XTRA_OPT := $(XTRA_OPT) -I../zlib -endif - -ifeq ($(HAVE_LERC),internal) -LERCV1 = LERCV1 -OBJ := $(OBJ) LERC_band.o -XTRA_OPT := -DLERC -I../../third_party/LercLib $(XTRA_OPT) -SUBLIBS := lib-LERCV1 -endif - -ifeq ($(HAVE_LERC),external) -LERCV1 = LERCV1 -OBJ := $(OBJ) LERC_band.o -XTRA_OPT := -DLERC $(LERC_INCLUDE) $(XTRA_OPT) -SUBLIBS := lib-LERCV1 -endif - -ifeq ($(BRUNSLI_ENABLED),yes) -XTRA_OPT := $(XTRA_OPT) -DBRUNSLI $(BRUNSLI_INCLUDE) -endif - -ifeq ($(ZSTD_SETTING),yes) -XTRA_OPT := $(XTRA_OPT) -DZSTD_SUPPORT -endif - -ifeq ($(QB3_ENABLED),yes) -XTRA_OPT := $(XTRA_OPT) -DQB3_SUPPORT $(QB3_INCLUDE) -OBJ := $(OBJ) QB3_band.o -endif - -CPPFLAGS := $(XTRA_OPT) $(CPPFLAGS) - -default: $(PREDEPEND) $(OBJ:.o=.$(OBJ_EXT)) $(SUBLIBS) - -clean: - rm -rf *.o *.lo .libs/$(OBJ) .libs $(O_OBJ) $(LO_O_OBJ) gdal_mrf.so.1 -ifdef $(LERCV1) - (cd $(LERCV1); $(MAKE) clean) -endif - -install-obj: $(PREDEPEND) $(SUBLIBS) $(O_OBJ:.o=.$(OBJ_EXT)) - -lib-LERCV1: - (cd $(LERCV1); $(MAKE) install-obj) - -$(OBJ) $(O_OBJ): $(DEPENDS) - -plugin: $(OBJ) - g++ -shared -Wl,-soname,gdal_mrf.so.1 $(OBJ) -o gdal_mrf.so.1 - -iplugin: gdal_mrf.so.1 plugin - mkdir -p $(PLUGIN_PATH) - cp $< $(PLUGIN_PATH)/gdal_mrf.so - -libjpeg12: - (cd ../jpeg; $(MAKE) libjpeg12/jcapimin12.c) diff --git a/frmts/mrf/LERCV1/GNUmakefile b/frmts/mrf/LERCV1/GNUmakefile deleted file mode 100644 index 98038fe0f25b..000000000000 --- a/frmts/mrf/LERCV1/GNUmakefile +++ /dev/null @@ -1,20 +0,0 @@ -# $Id$ -# -# Makefile to build zlib using GNU Make and GCC. -# -include ../../../GDALmake.opt - -OBJ = Lerc1Image.o - -O_OBJ = $(foreach file,$(OBJ),../../o/$(file)) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f $(O_OBJ) *.o *.lo $(O_OBJ:.o=.$(OBJ_EXT)) - -../../o/%.$(OBJ_EXT): %.cpp - $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< -o $@ - diff --git a/frmts/mrf/LERCV1/makefile.vc b/frmts/mrf/LERCV1/makefile.vc deleted file mode 100644 index 62310bb640e4..000000000000 --- a/frmts/mrf/LERCV1/makefile.vc +++ /dev/null @@ -1,20 +0,0 @@ -GDAL_ROOT = ..\..\.. -!INCLUDE $(GDAL_ROOT)\nmake.opt - -OBJ = Lerc1Image.obj - -HEADERS = Lerc1Image.h - -LERCV1 = LERCV1.obj - -EXTRAFLAGS = -DLERC - -default: $(LERCV1) - -$(OBJ): $(HEADERS) - -$(LERCV1): $(OBJ) - lib /out:..\$(LERCV1) $(OBJ) - -clean: - -del ..\$(LERCV1) $(OBJ) diff --git a/frmts/mrf/makefile.vc b/frmts/mrf/makefile.vc deleted file mode 100644 index b6ea3f11388e..000000000000 --- a/frmts/mrf/makefile.vc +++ /dev/null @@ -1,103 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -GDAL_ROOT = ..\.. -!INCLUDE $(GDAL_ROOT)\nmake.opt - -OBJ = Packer_RLE.obj Tif_band.obj PNG_band.obj JPEG_band.obj JPNG_band.obj\ - mrf_band.obj mrf_overview.obj mrf_util.obj marfa_dataset.obj - -EXTRAFLAGS = -DHAVE_PNG -DHAVE_JPEG - - -# Internal libraries - -!IF "$(HAVE_LERC)" == "internal" -LERC1 = Lerc1Image.obj -OBJ = $(LERC1) LERC_Band.obj $(OBJ) -EXTRAFLAGS = -I../../third_party/LercLib -DLERC -ILERCV1 $(EXTRAFLAGS) -!ENDIF - -!IF DEFINED(JPEG_SUPPORTED) && !DEFINED(JPEG_EXTERNAL_LIB) -EXTRAFLAGS = /wd4611 -I../jpeg/libjpeg $(JPEG12_FLAGS) $(EXTRAFLAGS) -!IFDEF JPEG12_SUPPORTED -OBJ = $(OBJ) JPEG12_band.obj -EXTRAFLAGS = -DJPEG12_SUPPORTED $(EXTRAFLAGS) -!ENDIF -!ENDIF - -!IFNDEF ZLIB_EXTERNAL_LIB -EXTRAFLAGS = -I../zlib $(EXTRAFLAGS) -!ENDIF - -!IFNDEF PNG_EXTERNAL_LIB -EXTRAFLAGS = /wd4611 -I../png/libpng -DINTERNAL_PNG $(EXTRAFLAGS) -!ENDIF - - -# External libraries - -!IF "$(HAVE_LERC)" == "external" -LERC1 = Lerc1Image.obj -OBJ = $(LERC1) LERC_Band.obj $(OBJ) -EXTRAFLAGS = -DLERC -ILERCV1 $(EXTRAFLAGS) -I$(LERC_INCLUDE) -!ENDIF - -!IFDEF JPEG_EXTERNAL_LIB -EXTRAFLAGS = $(EXTRAFLAGS) -I$(JPEGDIR) -!ENDIF - -!IFDEF ZLIB_EXTERNAL_LIB -EXTRAFLAGS = $(EXTRAFLAGS) $(ZLIB_INC) -!ENDIF - -!IFDEF PNG_EXTERNAL_LIB -EXTRAFLAGS = $(EXTRAFLAGS) -I$(PNGDIR) -!ENDIF - -!IFDEF ZSTD_CFLAGS -EXTRAFLAGS = $(EXTRAFLAGS) -DZSTD_SUPPORT $(ZSTD_CFLAGS) -!ENDIF - -!IFDEF BRUNSLI_DIR -EXTRAFLAGS = $(EXTRAFLAGS) -DBRUNSLI -I$(BRUNSLI_INC) -!ENDIF - -!IFDEF QB3_DIR -OBJ = QB3_Band.obj $(OBJ) -EXTRAFLAGS = $(EXTRAFLAGS) -DQB3_SUPPORT -I$(QB3_INC) -!ENDIF - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -$(OBJ): marfa.h - -!IFDEF LERC1 -$(LERC1): - cd LERCV1 - nmake /f makefile.vc - cd .. -!ENDIF - -clean: - -del *.obj - -del *.dll - -del *.exp - -del *.lib - -del *.manifest - -del *.exe -!IFDEF LERC1 - cd LERCV1 - nmake /f makefile.vc clean - cd .. -!ENDIF diff --git a/frmts/mrsid/GNUmakefile b/frmts/mrsid/GNUmakefile deleted file mode 100644 index 69cfe88852ba..000000000000 --- a/frmts/mrsid/GNUmakefile +++ /dev/null @@ -1,33 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = mrsiddataset.o mrsidstream.o - -PLUGIN_DLL = gdal_MrSID.so - -ifeq ($(GEOTIFF_SETTING),internal) -GEOTIFF_INCLUDE = -I../../frmts/gtiff/libgeotiff -ifeq ($(RENAME_INTERNAL_LIBGEOTIFF_SYMBOLS),yes) -CPPFLAGS := -DRENAME_INTERNAL_LIBGEOTIFF_SYMBOLS $(CPPFLAGS) -endif -endif - -CPPFLAGS := $(MRSID_FLAGS) $(MRSID_INCLUDE) $(GEOTIFF_INCLUDE) $(CPPFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) - -plugin: $(PLUGIN_DLL) - -$(PLUGIN_DLL): $(OBJ) - $(LD_SHARED) $(OBJ) $(LDFLAGS) $(MRSID_LIBS) -o $(PLUGIN_DLL) - -#$(PLUGIN_DLL): $(OBJ:.o=.lo) -# $(LD) $(LDFLAGS) $(MRSID_LIBS) ../../$(LIBGDAL) -o $@ $(OBJ:.o=.lo) \ -# -rpath $(INST_LIB) \ -# -no-undefined -export-dynamic - diff --git a/frmts/mrsid/makefile.vc b/frmts/mrsid/makefile.vc deleted file mode 100644 index 0025e786be0a..000000000000 --- a/frmts/mrsid/makefile.vc +++ /dev/null @@ -1,47 +0,0 @@ - -OBJ = mrsiddataset.obj mrsidstream.obj - -PLUGIN_DLL = gdal_MrSID.dll - -EXTRAFLAGS = $(MRSID_INCLUDE) $(GEOTIFF_INC) $(MRSID_FLAGS) - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt -!INCLUDE nmake.opt - -!IFNDEF GEOTIFF_INC -GEOTIFF_INC = -I..\gtiff\libgeotiff -!ENDIF - -!IF "$(MRSID_PLUGIN)" == "YES" && "$(MRSID_RDLLBUILD)" != "YES" -MRSID_FLAGS = -DMRSID_USE_TIFFSYMS_WORKAROUND $(MRSID_FLAGS) -!IFNDEF GEOTIFF_LIB -GEOTIFF_LIB = ..\gtiff\libgeotiff\geo_tiffp.obj -!ENDIF -!IFNDEF TIFF_LIB -TIFF_LIB = ..\gtiff\libtiff\tif_vsi.obj -!ENDIF -!ENDIF - -default: $(OBJ) - $(INSTALL) *.obj ..\o - -clean: - -del *.obj - -del *.dll - -del *.exp - -del *.lib - -del *.manifest - -plugin: $(PLUGIN_DLL) - -$(PLUGIN_DLL): $(OBJ) - link /dll $(LDEBUG) /out:$(PLUGIN_DLL) $(OBJ) \ - $(GDALLIB) $(MRSID_LIB) $(GEOTIFF_LIB) $(TIFF_LIB) - if exist $(PLUGIN_DLL).manifest mt -manifest $(PLUGIN_DLL).manifest -outputresource:$(PLUGIN_DLL);2 - -plugin-install: - -mkdir $(PLUGINDIR) - $(INSTALL) $(PLUGIN_DLL) $(PLUGINDIR) - diff --git a/frmts/mrsid/nmake.opt b/frmts/mrsid/nmake.opt deleted file mode 100644 index c5890a7ce0ff..000000000000 --- a/frmts/mrsid/nmake.opt +++ /dev/null @@ -1,591 +0,0 @@ -# $Id:$ -# -# nmake.opt - configuration file for mrsid raster and lidar drivers -# -# This file will get automatically included if any of the following macros are -# specified in the root nmake.opt file: -# MRSID_DIR - Should indicate the path to your MrSID SDK. This nmake script -# will guess the type of SDK it is (raster and/or lidar). -# MRSID_RASTER_DIR - Can indicate the path to a MrSID Raster SDK, if lidar -# support needs to be disabled or built against a separate SDK. -# MRSID_LIDAR_DIR - Can indicate the path to a MrSID Lidar SDK, if raster -# support needs to be disabled or built against a separate SDK. -# -# Other optional values that can affect mrsid driver configuration: -# MRSID_JP2=(YES|NO) - Register the MrSID driver to handle JPEG 2000 files. -# By default this option will be disabled. -# MRSID_PLUGIN=(YES|NO) - Build the mrsid raster driver as a plugin. The -# default value is NO. -# MRSID_LIDAR_PLUGIN=(YES|NO) - Build the mrsid lidar driver as a plugin. -# The default value is NO. -# MRSID_RDLLBUILD=(YES|NO) - Some versions of the MrSID SDK shipped with -# both static and dynamic libraries. Use this macro to choose between -# static and dynamic linkage for the Raster SDK, if both are available. -# By default, your SDK will be inspected and the appropriate library -# used, with a preference for the DLL if both are found. -# MRSID_LDLLBUILD=(YES|NO) - Some versions of the MrSID SDK shipped with -# both static and dynamic libraries. Use this macro to choose between -# static and dynamic linkage for the Lidar SDK, if both are available. -# By default, your SDK will be inspected and the appropriate library -# used, with a preference for the DLL if both are found. -# MRSID_CONFIG=(Release|Debug|Release_md|Debug_md) - When linking -# statically, the value of this macro should correspond to the run-time -# library linkage specified in OPTFLAGS, as follows: -# Release=/MT, Debug=/MTd, Release_md=/MD (default), Debug_md=/MDd -# MRSID_RVER=000 - Indicate the MrSID Raster SDK version you expect. This -# value will be validated against the actual SDK you are building to. By -# default the auto-detected version will be assumed correct. -# MRSID_LVER=000 - Indicate the MrSID Lidar SDK version you expect. This -# value will be validated against the actual SDK you are building to. By -# default the auto-detected version will be assumed correct. -# MRSID_ESDK=(YES|NO) - Include write support for MrSID raster files. By -# default this option will be enabled if you have a MrSID Raster ESDK. -# MRSID_SHOW_CONFIG=(YES|NO) - Display a report of all MRSID_* macro values -# after this script has run. -# -############################################################################### -# -# Initialize some default values. -# -!IFNDEF MRSID_CONFIG -MRSID_CONFIG = Release_md -!ENDIF -!IFNDEF MRSID_JP2 -MRSID_JP2 = NO -!ENDIF - -!IFNDEF MRSID_PLATFORM -!IF "$(WIN64)" == "YES" -MRSID_PLATFORM = Win64 -!ELSE -MRSID_PLATFORM = Win32 -!ENDIF -!ENDIF - -############################################################################### -# -# If MRSID_DIR was specified, then we will try to guess whether it points to a -# lidar or a raster SDK (or both). By the end of this block, we want to end -# up with independent macros MRSID_RASTER_DIR and/or MRSID_LIDAR_DIR. Thence -# MRSID_DIR will be ignored. -# -!IF DEFINED(MRSID_DIR) - -# Guard against conflicting configuration. -!IF DEFINED(MRSID_RASTER_DIR) && DEFINED(MRSID_LIDAR_DIR) -!ERROR The MRSID_DIR value is redundant or conflicts with the values of MRSID_RASTER_DIR and MRSID_LIDAR_DIR. Please remove one of these values from the build configuration. -!ENDIF - -# If a raster path was not explicitly set, see if MRSID_DIR is one. -!IF !DEFINED(MRSID_RASTER_DIR) -!IF EXIST("$(MRSID_DIR)\Raster_ESDK\include\lt_base.h") -MRSID_RASTER_DIR = $(MRSID_DIR)\Raster_ESDK -!ELSE IF EXIST("$(MRSID_DIR)\Raster_DSDK\include\lt_base.h") -MRSID_RASTER_DIR = $(MRSID_DIR)\Raster_DSDK -!ELSE IF EXIST("$(MRSID_DIR)\include\lt_base.h") || EXIST("$(MRSID_DIR)\include\support\lt_base.h") -MRSID_RASTER_DIR = $(MRSID_DIR) -!ENDIF -!ENDIF - -# If a lidar path was not explicitly set, see if MRSID_DIR is one. -!IF !DEFINED(MRSID_LIDAR_DIR) && DEFINED(MRSID_DIR) -!IF EXIST("$(MRSID_DIR)\Lidar_ESDK\include\lidar\Base.h") -MRSID_LIDAR_DIR = $(MRSID_DIR)\Lidar_ESDK -!ELSE IF EXIST("$(MRSID_DIR)\Lidar_DSDK\include\lidar\Base.h") -MRSID_LIDAR_DIR = $(MRSID_DIR)\Lidar_DSDK -!ELSE IF EXIST("$(MRSID_DIR)\include\lidar\Base.h") -MRSID_LIDAR_DIR = $(MRSID_DIR) -!ENDIF -!ENDIF - -!ENDIF - -# Verify we have at least one kind of SDK. Otherwise, there is nothing to do. -!IF !DEFINED(MRSID_RASTER_DIR) && !DEFINED(MRSID_LIDAR_DIR) -!IF DEFINED(MRSID_DIR) -!ERROR No MrSID SDK was found at $(MRSID_DIR). -!ELSE -!ERROR You did not specify a path to a MrSID SDK. -!ENDIF -!ENDIF - -# Henceforth, we can ignore MRSID_DIR. - - - - -############################################################################### -# -# Configure the MrSID Raster SDK. -# -!IF DEFINED(MRSID_RASTER_DIR) - -# Initialize some macros to help with paths that have evolved over time. -!IF EXIST("$(MRSID_RASTER_DIR)\include\base") -I_BASE = \base -!ENDIF -!IF EXIST("$(MRSID_RASTER_DIR)\include\support") -I_SUPP = \support -!ENDIF -!IF EXIST("$(MRSID_RASTER_DIR)\include\mrsid_readers") -I_SIDR = \mrsid_readers -!ENDIF -!IF EXIST("$(MRSID_RASTER_DIR)\include\j2k_readers") -I_JP2R = \j2k_readers -!ENDIF -!IF EXIST("$(MRSID_RASTER_DIR)\include\mrsid_writers") -I_SIDW = \mrsid_writers -!ENDIF -!IF EXIST("$(MRSID_RASTER_DIR)\include\c_api") -I_CAPI = \c_api -!ENDIF -!IF EXIST("$(MRSID_RASTER_DIR)\include\metadata") -I_META = \metadata -!ENDIF - - -# -# Determine the detailed Raster SDK version. -R800 = "$(MRSID_RASTER_DIR)\include$(I_BASE)\lti_types.h" -R701 = "$(MRSID_RASTER_DIR)\include$(I_NITF)\nitf_types.h" -R700 = "$(MRSID_RASTER_DIR)\include$(I_NONE)\lti_referenceCountedObject.h" -R607 = "$(MRSID_RASTER_DIR)\include$(I_CAPI)\ltic_api.h" -R605 = "$(MRSID_RASTER_DIR)\include$(I_META)\lti_metadataTypes.h" -R604 = "$(MRSID_RASTER_DIR)\include$(I_BASE)\lti_imageStage.h" -R506 = "$(MRSID_RASTER_DIR)\include$(I_CAPI)\ltic_api.h" -R415 = "$(MRSID_RASTER_DIR)\include$(I_BASE)\lti_coreStatus.h" -R412 = "$(MRSID_RASTER_DIR)\include$(I_BASE)\lti_types.h" -R411 = "$(MRSID_RASTER_DIR)\include$(I_BASE)\lti_utils.h" -R410 = "$(MRSID_RASTER_DIR)\include$(I_BASE)\lti_geoImageReader.h" -R409 = "$(MRSID_RASTER_DIR)\include$(I_CAPI)\ltic_api.h" -R408 = "$(MRSID_RASTER_DIR)\include$(I_BASE)\lti_coreStatus.h" -R407 = "$(MRSID_RASTER_DIR)\include$(I_BASE)\lti_types.h" -R406 = "$(MRSID_RASTER_DIR)\include$(I_BASE)\lti_pixelData.h" -R405 = "$(MRSID_RASTER_DIR)\include$(I_META)\lti_metadataStatus.h" -R404 = "$(MRSID_RASTER_DIR)\include$(I_SUPP)\lt_platform.h" -R403 = "$(MRSID_RASTER_DIR)\include$(I_BASE)\lti_coreStatus.h" -R402 = "$(MRSID_RASTER_DIR)\include$(I_BASE)\lti_image.h" -R400 = "$(MRSID_RASTER_DIR)\include$(I_BASE)\lti_image.h" - -!IF [find "LTIEncodingModification" $(R800) > NUL 2>&1] == 0 -MRSID_AUTORVER = 800 -!ELSE IF [find "NITFTRELocation" $(R701) > NUL 2>&1] == 0 -MRSID_AUTORVER = 701 -!ELSE IF EXIST($(R700)) -MRSID_AUTORVER = 700 -!ELSE IF [find "ltic_getDimsAtMag" $(R607) > NUL 2>&1] == 0 -MRSID_AUTORVER = 607 -!ELSE IF [find "ENCODING_APPLICATION" $(R605) > NUL 2>&1] == 0 -MRSID_AUTORVER = 605 -!ELSE IF [find "overrideGeoCoord" $(R604) > NUL 2>&1] == 0 -MRSID_AUTORVER = 604 -!ELSE IF [find "ltic_openNITFImageFile" $(R506) > NUL 2>&1] == 0 -MRSID_AUTORVER = 506 -!ELSE IF [find "AllocFailed" $(R415) > NUL 2>&1] == 0 -MRSID_AUTORVER = 415 -!ELSE IF [find "LTIResampleMethod" $(R412) > NUL 2>&1] == 0 -MRSID_AUTORVER = 412 -!ELSE IF [find "isSigned" $(R411) > NUL 2>&1] == 0 -MRSID_AUTORVER = 411 -!ELSE IF EXIST($(R410)) -MRSID_AUTORVER = 410 -!ELSE IF EXIST($(R409)) -MRSID_AUTORVER = 409 -!ELSE IF [find "BBB" $(R408) > NUL 2>&1] == 0 -MRSID_AUTORVER = 408 -!ELSE IF [find "BadFormatForTag" $(R407) > NUL 2>&1] == 0 -MRSID_AUTORVER = 407 -!ELSE IF EXIST($(R405)) && !EXIST($(R406)) -MRSID_AUTORVER = 406 -!ELSE IF [find "BadFormatForTag" $(R405) > NUL 2>&1] == 0 -MRSID_AUTORVER = 405 -!ELSE IF EXIST($(R404)) && [find "macintosh" $(R404) > NUL 2>&1] > 0 -MRSID_AUTORVER = 404 -!ELSE IF [find "DatatypeMismatch" $(R403) > NUL 2>&1] == 0 -MRSID_AUTORVER = 403 -!ELSE IF [find "getDimsAtMag" $(R402) > NUL 2>&1] == 0 -MRSID_AUTORVER = 402 -!ELSE IF [find "class LTIImage" $(R400) > NUL 2>&1] == 0 -MRSID_AUTORVER = 400 # earliest supported raster SDK (2003) -!ELSE -!ERROR $(MRSID_RASTER_DIR) is not a MrSID Raster SDK. -!ENDIF - - -# -# Check if this might be an encoding SDK. -!IF EXIST("$(MRSID_RASTER_DIR)\include$(I_SIDW)\lti_mrsidWritersStatus.h") -MRSID_AUTOESDK = YES -!ELSE -MRSID_AUTOESDK = NO -!ENDIF - -!IF "$(MRSID_ESDK)" == "YES" && "$(MRSID_AUTOESDK)" != "YES" -!ERROR MrSID Raster SDK found at $(MRSID_RASTER_DIR) is not an ESDK. -!ENDIF -!IF !DEFINED(MRSID_ESDK) -MRSID_ESDK = $(MRSID_AUTOESDK) -!ENDIF - - -# -# Check if this SDK can write MG4. -!IF EXIST("$(MRSID_RASTER_DIR)\include$(I_SIDW)\MG4ImageWriter.h") -MRSID_AUTOMG4W = YES -!ELSE -MRSID_AUTOMG4W = NO -!ENDIF - -!IF "$(MRSID_HAVE_MG4WRITE)" == "YES" && "$(MRSID_AUTOMG4W)" != "YES" -!ERROR MrSID Raster SDK found at $(MRSID_RASTER_DIR) is not an ESDK. -!ENDIF -!IF !DEFINED(MRSID_HAVE_MG4WRITE) -MRSID_HAVE_MG4WRITE = $(MRSID_AUTOMG4W) -!ENDIF - - -# -# Check if this SDK supports JP2. -!IF EXIST("$(MRSID_RASTER_DIR)\include$(I_JP2R)\J2KImageReader.h") || EXIST("$(MRSID_RASTER_DIR)\include$(I_SIDR)\J2KImageReader.h") -MRSID_AUTOJP2 = YES -!ELSE -MRSID_AUTOJP2 = NO -!ENDIF - -!IF "$(MRSID_JP2)" == "YES" && "$(MRSID_AUTOJP2)" != "YES" -!ERROR MrSID Raster SDK found at $(MRSID_RASTER_DIR) does not support JP2. -!ENDIF -!IF !DEFINED(MRSID_JP2) -MRSID_JP2 = $(MRSID_AUTOJP2) -!ENDIF - - -# -# Validate the Raster SDK version if one was indicated. -!IF DEFINED(MRSID_RVER) && "$(MRSID_RVER)" != "$(MRSID_AUTORVER)" -!ERROR MrSID Raster SDK at $(MRSID_RASTER_DIR) is version $(MRSID_AUTORVER), but you specified $(MRSID_RVER). -!ENDIF -MRSID_RVER = $(MRSID_AUTORVER) - - -# -# Guess linkage if it was not set explicitly. -!IF !DEFINED(MRSID_RDLLBUILD) -!IF "$(MRSID_ESDK)" == "YES" || $(MRSID_RVER)0 < 8000 -MRSID_RDLLBUILD = NO -!ELSE -MRSID_RDLLBUILD = YES -!ENDIF -!ENDIF - -!ELSE # MRSID_RASTER_DIR was not defined, so disallow other raster options - -!IF DEFINED(MRSID_RVER) -!ERROR MRSID_RVER specified, but no MrSID Raster SDK was found. -!ENDIF - -!IF "$(MRSID_ESDK)" == "YES" -!ERROR MRSID_ESDK specified, but no MrSID Raster SDK was found. -!ENDIF - -!IF "$(MRSID_JP2)" == "YES" -!ERROR MRSID_JP2 specified, but no MrSID Raster SDK was found. -!ENDIF - -!ENDIF # end configuration of Raster SDK - - - -############################################################################### -# -# Configure the MrSID Lidar SDK. -# -!IF DEFINED(MRSID_LIDAR_DIR) - -# Determine the detailed Lidar SDK version. -L111 = "$(MRSID_LIDAR_DIR)\include\lidar\Types.h" -L110 = "$(MRSID_LIDAR_DIR)\include\lidar\PointData.h" -L101 = "$(MRSID_LIDAR_DIR)\include\lidar\core_status.h" -L100 = "$(MRSID_LIDAR_DIR)\include\lidar\Mutex.h" -L090 = "$(MRSID_LIDAR_DIR)\include\lidar\IO.h" -L060 = "$(MRSID_LIDAR_DIR)\include\lidar\Base.h" - -!IF [find "&Huge(" $(L111) > NUL 2>&1] == 0 -MRSID_AUTOLVER = 111 -!ELSE IF [find "class PointInfo" $(L110) > NUL 2>&1] == 0 -MRSID_AUTOLVER = 110 -!ELSE IF [find "UNSUPPORTED_VERSION" $(L101) > NUL 2>&1] == 0 -MRSID_AUTOLVER = 101 -!ELSE IF EXIST($(L100)) -MRSID_AUTOLVER = 100 -!ELSE IF [find "struct Location" $(L090) > NUL 2>&1] == 0 -MRSID_AUTOLVER = 90 -!ELSE IF [find "LT_END_LIDAR_NAMESPACE" $(L060) > NUL 2>&1] == 0 -MRSID_AUTOLVER = 60 -!ENDIF - -# Validate the Lidar SDK version if one was indicated. -!IF DEFINED(MRSID_LVER) && "$(MRSID_LVER)" != "$(MRSID_AUTOLVER)" -!ERROR MrSID Lidar SDK at $(MRSID_LIDAR_DIR) is version $(MRSID_AUTOLVER), but you specified $(MRSID_LVER). -!ENDIF -MRSID_LVER = $(MRSID_AUTOLVER) - -# Guess linkage if it was not set explicitly. -!IF !DEFINED(MRSID_LDLLBUILD) -!IF $(MRSID_LVER)0 < 1110 -MRSID_LDLLBUILD = NO -!ELSE -MRSID_LDLLBUILD = YES -!ENDIF -!ENDIF - -!ELSE # MRSID_LIDAR_DIR was not defined, so disallow other lidar options - -!IF DEFINED(MRSID_LVER) -!ERROR MRSID_LVER specified, but no MrSID Lidar SDK was found. -!ENDIF - -!ENDIF - - - -############################################################################### -# -# Set up the build environment: MRSID_FLAGS, MRSID_INCLUDE, MRSID_LIB -# - -# -# MRSID_FLAGS -# -!IF DEFINED(MRSID_RASTER_DIR) - -!IF "$(MRSID_JP2)" == "YES" -MRSID_FLAGS = -DMRSID_J2K $(MRSID_FLAGS) -!ENDIF - -!IF "$(MRSID_ESDK)" == "YES" -MRSID_FLAGS = -DMRSID_ESDK $(MRSID_FLAGS) -!IF "$(MRSID_HAVE_MG4WRITE)" == "YES" -MRSID_FLAGS = -DMRSID_HAVE_MG4WRITE $(MRSID_FLAGS) -!ENDIF -!ENDIF - -MRSID_FLAGS = -DMRSID_RVER=$(MRSID_RVER) $(MRSID_FLAGS) - -!ENDIF # end raster flags - -!IF DEFINED(MRSID_LIDAR_DIR) - -MRSID_FLAGS = -DMRSID_LVER=$(MRSID_LVER) $(MRSID_FLAGS) - -!ENDIF # end lidar flags - - -# -# MRSID_INCLUDE -# -!IF DEFINED(MRSID_RASTER_DIR) - -!IF $(MRSID_RVER)0 >= 7000 -MRSID_INCLUDE = -I"$(MRSID_RASTER_DIR)\include" $(MRSID_INCLUDE) -!ENDIF -!IF EXIST("$(MRSID_RASTER_DIR)\include\base") -MRSID_INCLUDE = -I"$(MRSID_RASTER_DIR)\include\base" $(MRSID_INCLUDE) -!ENDIF -#!IF EXIST("$(MRSID_RASTER_DIR)\include\c_api") -#MRSID_INCLUDE = -I"$(MRSID_RASTER_DIR)\include\c_api" $(MRSID_INCLUDE) -#!ENDIF -!IF EXIST("$(MRSID_RASTER_DIR)\include\filters") -MRSID_INCLUDE = -I"$(MRSID_RASTER_DIR)\include\filters" $(MRSID_INCLUDE) -!ENDIF -!IF "$(MRSID_JP2)" == "YES" && EXIST("$(MRSID_RASTER_DIR)\include\j2k_readers") -MRSID_INCLUDE = -I"$(MRSID_RASTER_DIR)\include\j2k_readers" $(MRSID_INCLUDE) -!ENDIF -!IF "$(MRSID_JP2)" == "YES" && "$(MRSID_ESDK)" == "YES" && EXIST("$(MRSID_RASTER_DIR)\include\j2k_writers") -MRSID_INCLUDE = -I"$(MRSID_RASTER_DIR)\include\j2k_writers" $(MRSID_INCLUDE) -!ENDIF -!IF EXIST("$(MRSID_RASTER_DIR)\include\metadata") -MRSID_INCLUDE = -I"$(MRSID_RASTER_DIR)\include\metadata" $(MRSID_INCLUDE) -!ENDIF -!IF EXIST("$(MRSID_RASTER_DIR)\include\mrsid_readers") -MRSID_INCLUDE = -I"$(MRSID_RASTER_DIR)\include\mrsid_readers" $(MRSID_INCLUDE) -!ENDIF -!IF "$(MRSID_ESDK)" == "YES" && EXIST("$(MRSID_RASTER_DIR)\include\mrsid_writers") -MRSID_INCLUDE = -I"$(MRSID_RASTER_DIR)\include\mrsid_writers" $(MRSID_INCLUDE) -!ENDIF -#!IF EXIST("$(MRSID_RASTER_DIR)\include\readers") -#MRSID_INCLUDE = -I"$(MRSID_RASTER_DIR)\include\readers" $(MRSID_INCLUDE) -#!ENDIF -!IF EXIST("$(MRSID_RASTER_DIR)\include\support") -MRSID_INCLUDE = -I"$(MRSID_RASTER_DIR)\include\support" $(MRSID_INCLUDE) -!ENDIF -#!IF EXIST("$(MRSID_RASTER_DIR)\include\writers") -#MRSID_INCLUDE = -I"$(MRSID_RASTER_DIR)\include\writers" $(MRSID_INCLUDE) -#!ENDIF - -!ENDIF # end raster includes - -!IF DEFINED(MRSID_LIDAR_DIR) - -# lidar include paths -MRSID_INCLUDE = -I"$(MRSID_LIDAR_DIR)\include" $(MRSID_INCLUDE) - -!ENDIF # end lidar includes - -# -# MRSID_LIB -# -!IF DEFINED(MRSID_RASTER_DIR) - -!IF "$(MRSID_RDLLBUILD)" == "YES" - -# -# Find and validate the specific DLL and add it to MRSID_LIB -!IF "$(MRSID_ESDK)" == "YES" -!ERROR Cannot link dynamically against the MrSID Raster ESDK. Try linking statically by setting MRSID_RDLLBUILD to NO. -!ELSE IF EXIST("$(MRSID_RASTER_DIR)\lib\lti_dsdk.dll") -MRSID_LIB = "$(MRSID_RASTER_DIR)\lib\lti_dsdk.lib" $(MRSID_LIB) -!ELSE IF EXIST("$(MRSID_RASTER_DIR)\lib\$(MRSID_PLATFORM)\lti_dsdk.dll") -MRSID_LIB = "$(MRSID_RASTER_DIR)\lib\$(MRSID_PLATFORM)\lti_dsdk.lib" $(MRSID_LIB) -!ELSE IF EXIST("$(MRSID_RASTER_DIR)\lib\lti_dsdk_9.0.dll") -MRSID_LIB = "$(MRSID_RASTER_DIR)\lib\lti_dsdk.lib" $(MRSID_LIB) -!ELSE IF EXIST("$(MRSID_RASTER_DIR)\lib\lti_dsdk_9.1.dll") -MRSID_LIB = "$(MRSID_RASTER_DIR)\lib\lti_dsdk.lib" $(MRSID_LIB) -!ELSE IF EXIST("$(MRSID_RASTER_DIR)\lib\lti_dsdk_9.5.dll") -MRSID_LIB = "$(MRSID_RASTER_DIR)\lib\lti_dsdk.lib" $(MRSID_LIB) -!ELSE IF EXIST("$(MRSID_RASTER_DIR)\lib\$(MRSID_PLATFORM)\lti_dsdk_9.5.dll") -MRSID_LIB = "$(MRSID_RASTER_DIR)\lib\$(MRSID_PLATFORM)\lti_dsdk.lib" -!ELSE IF EXIST("$(MRSID_RASTER_DIR)\lib\$(MRSID_CONFIG)\lti_dsdk_dll.dll") -MRSID_LIB = "$(MRSID_RASTER_DIR)\lib\$(MRSID_CONFIG)\lti_dsdk_dll.lib" $(MRSID_LIB) -!ELSE IF EXIST("$(MRSID_RASTER_DIR)\lib\Release_md\lti_dsdk_dll.dll") -# sdks 5 and older shipped only one configuration of the dll -!ERROR Found a MrSID Raster DLL under $(MRSID_RASTER_DIR)\lib\Release_md, but specified config was $(MRSID_CONFIG). Try setting MRSID_CONFIG to Release_md. -!ELSE IF $(MRSID_RVER)0 < 4090 -# mrsid sdks first had dlls in v4.0.9 -!ERROR This version of the MrSID Raster SDK ($(MRSID_RVER)) did not ship with DLLs. Try linking statically by setting MRSID_RDLLBUILD to NO. -!ELSE -!ERROR No suitable MrSID Raster DLL was found in $(MRSID_RASTER_DIR)\lib. -!ENDIF # end DLL search - -!ELSE # not building against the DLL; use the static lib(s) - -# -# Find and validate the specific DSDK static lib and add it to MRSID_LIB. -!IF $(MRSID_RVER)0 >= 8000 -!IF EXIST("$(MRSID_RASTER_DIR)\lib\$(MRSID_CONFIG)\lti_esdk.lib") -# v8+ esdk has the dsdk symbols folded into a single lib -MRSID_LIB = "$(MRSID_RASTER_DIR)\lib\$(MRSID_CONFIG)\lti_esdk.lib" $(MRSID_LIB) -!ELSE -# v8+ dsdk can only be linked dynamically -!ERROR Cannot link statically against this version of the MrSID Raster DSDK ($(MRSID_RVER)). Try linking dynamically by setting MRSID_RDLLBUILD to YES. -!ENDIF -!ELSE IF EXIST("$(MRSID_RASTER_DIR)\lib\$(MRSID_CONFIG)\lti_dsdk.lib") -MRSID_LIB = "$(MRSID_RASTER_DIR)\lib\$(MRSID_CONFIG)\lti_dsdk.lib" $(MRSID_LIB) -!ELSE IF EXIST("$(MRSID_RASTER_DIR)\lib\$(MRSID_PLATFORM)\lti_dsdk.lib") -MRSID_LIB = "$(MRSID_RASTER_DIR)\lib\$(MRSID_PLATFORM)\lti_dsdk.lib" $(MRSID_LIB) -!ELSE IF EXIST("$(MRSID_RASTER_DIR)\lib\$(MRSID_CONFIG)\lti_sdk.lib") -# very old sdk indeed -MRSID_LIB = "$(MRSID_RASTER_DIR)\lib\$(MRSID_CONFIG)\lti_sdk.lib" $(MRSID_LIB) -!ELSE -!ERROR No suitable MrSID Raster libs were found in $(MRSID_RASTER_DIR)\lib. -!ENDIF # end DSDK lib search - -# -# Find and validate the specific JP2 static lib and add it to MRSID_LIB. -!IF "$(MRSID_JP2)" == "YES" -!IF EXIST("$(MRSID_RASTER_DIR)\3rd-party\lib\$(MRSID_CONFIG)\lt_lib_kakadu.lib") -MRSID_LIB = "$(MRSID_RASTER_DIR)\3rd-party\lib\$(MRSID_CONFIG)\lt_lib_kakadu.lib" $(MRSID_LIB) -!ELSE IF EXIST("$(MRSID_RASTER_DIR)\3rd-party\lib\$(MRSID_CONFIG)\ltikdu.lib") -MRSID_LIB = "$(MRSID_RASTER_DIR)\3rd-party\lib\$(MRSID_CONFIG)\ltikdu.lib" $(MRSID_LIB) -!ELSE IF $(MRSID_RVER)0 < 5000 -!ERROR This version of the MrSID Raster SDK ($(MRSID_RVER)) does not support JPEG 2000. -!ELSE -!ERROR The library needed for MrSID Raster SDK to support JPEG 2000 is missing. -!ENDIF -!ENDIF # end JP2 lib search - -# -# Find and validate the specific ESDK static lib(s) and add to MRSID_LIB. -!IF "$(MRSID_ESDK)" == "YES" -# if we still need to add lti_esdk.lib do that first -!IF $(MRSID_RVER)0 < 8000 && EXIST("$(MRSID_RASTER_DIR)\lib\$(MRSID_CONFIG)\lti_esdk.lib") -MRSID_LIB = "$(MRSID_RASTER_DIR)\lib\$(MRSID_CONFIG)\lti_esdk.lib" $(MRSID_LIB) -!ENDIF - -!IF EXISTS("$(MRSID_RASTER_DIR)\3rd-party\lib\$(MRSID_CONFIG)\cryptlib.lib") -MRSID_LIB = "$(MRSID_RASTER_DIR)\3rd-party\lib\$(MRSID_CONFIG)\cryptlib.lib" $(MRSID_LIB) -!ENDIF - -!IF EXISTS("$(MRSID_RASTER_DIR)\3rd-party\lib\$(MRSID_CONFIG)\xmlparse.lib") -MRSID_LIB = "$(MRSID_RASTER_DIR)\3rd-party\lib\$(MRSID_CONFIG)\xmlparse.lib" $(MRSID_LIB) -!ENDIF - -!ENDIF # end ESDK lib search - -MRSID_LIB = $(MRSID_LIB) advapi32.lib user32.lib - -!ENDIF # end static raster build environment - -!ENDIF # end raster libs - -# -# Add Lidar libs to MRSID_LIB -!IF DEFINED(MRSID_LIDAR_DIR) - -!IF "$(MRSID_LDLLBUILD)" == "YES" - -# -# Find and validate the specific DLL and add it to MRSID_LIB -!IF EXIST("$(MRSID_LIDAR_DIR)\lib\lti_lidar_dsdk.dll") -MRSID_LIB = "$(MRSID_LIDAR_DIR)\lib\lti_lidar_dsdk.lib" $(MRSID_LIB) -!ELSE IF EXIST("$(MRSID_LIDAR_DIR)\lib\$(MRSID_PLATFORM)\lti_lidar_dsdk.dll") -MRSID_LIB = "$(MRSID_RASTER_DIR)\lib\$(MRSID_PLATFORM)\lti_lidar_dsdk.lib" $(MRSID_LIB) -!ELSE IF EXIST("$(MRSID_LIDAR_DIR)\lib\lti_lidar_dsdk_1.1.dll") -MRSID_LIB = "$(MRSID_LIDAR_DIR)\lib\lti_lidar_dsdk.lib" $(MRSID_LIB) -!ELSE IF $(MRSID_LVER)0 < 1110 -!ERROR Cannot link dynamically against this version of the MrSID Lidar SDK ($(MRSID_LVER)). Try linking statically by setting MRSID_LDLLBUILD to NO. -!ELSE -!ERROR No suitable MrSID Lidar DLL was found in $(MRSID_LIDAR_DIR)\lib. -!ENDIF - -!ELSE # not building against the DLL; use the static lib(s) - -# -# Find and validate the specific lidar static lib and add it to MRSID_LIB -!IF EXIST("$(MRSID_LIDAR_DIR)\lib\$(MRSID_CONFIG)\lti_lidar_dsdk.lib") -MRSID_LIB = "$(MRSID_LIDAR_DIR)\lib\$(MRSID_CONFIG)\lti_lidar_dsdk.lib" $(MRSID_LIB) -!ELSE IF EXIST("$(MRSID_LIDAR_DIR)\lib\$(MRSID_PLATFORM)\lti_lidar_dsdk.lib") -MRSID_LIB = "$(MRSID_RASTER_DIR)\lib\$(MRSID_PLATFORM)\lti_lidar_dsdk.lib" $(MRSID_LIB) -!ELSE IF $(MRSID_LVER)0 >= 1110 -# v8+ dsdk can only be linked dynamically -!ERROR Cannot link statically against this version of the MrSID Lidar DSDK ($(MRSID_LVER)). Try linking dynamically by setting MRSID_LDLLBUILD to YES. -!ELSE -!ERROR No suitable MrSID Lidar libs were found under $(MRSID_LIDAR_DIR)\lib. -!ENDIF - -!ENDIF # end static lidar build environment - -!ENDIF # end lidar build environment - - -############################################################################### -# -# Report the configuration summary -# -!IF DEFINED(MRSID_SHOW_CONFIG) -!MESSAGE MRSID_RASTER_DIR = $(MRSID_RASTER_DIR) -!MESSAGE MRSID_RVER = $(MRSID_RVER) -!MESSAGE MRSID_JP2 = $(MRSID_JP2) -!MESSAGE MRSID_ESDK = $(MRSID_ESDK) -!MESSAGE MRSID_RDLLBUILD = $(MRSID_RDLLBUILD) -!MESSAGE MRSID_PLUGIN = $(MRSID_PLUGIN) -!MESSAGE MRSID_LIDAR_DIR = $(MRSID_LIDAR_DIR) -!MESSAGE MRSID_LVER = $(MRSID_LVER) -!MESSAGE MRSID_LDLLBUILD = $(MRSID_LDLLBUILD) -!MESSAGE MRSID_LIDAR_PLUGIN=$(MRSID_LIDAR_PLUGIN) -!MESSAGE MRSID_CONFIG = $(MRSID_CONFIG) -!MESSAGE MRSID_FLAGS = $(MRSID_FLAGS) -!MESSAGE MRSID_INCLUDE = $(MRSID_INCLUDE) -!MESSAGE MRSID_LIB = $(MRSID_LIB) -!ENDIF - diff --git a/frmts/msg/GNUmakefile b/frmts/msg/GNUmakefile deleted file mode 100644 index 560ad6a14930..000000000000 --- a/frmts/msg/GNUmakefile +++ /dev/null @@ -1,24 +0,0 @@ -include ../../GDALmake.opt - -OBJ = msgdataset.o xritheaderparser.o prologue.o msgcommand.o reflectancecalculator.o PublicDecompWT_all.o - -CPPFLAGS := -I PublicDecompWT/DISE -I PublicDecompWT/COMP/WT/Inc -I PublicDecompWT/COMP/Inc -iquote . $(CPPFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o PublicDecompWT_all.h - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) - -PublicDecompWT_all.cpp: PublicDecompWT_all.h - -# Trick to avoid lots of warnings from the PublicDecompWT SDK -PublicDecompWT_all.h: - @echo "// This is a generated file. Do not edit !" > PublicDecompWT_all.h - @echo "#if ((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)) && !defined(_MSC_VER))" >> PublicDecompWT_all.h - @echo "#pragma GCC system_header" >> PublicDecompWT_all.h - @echo "#endif" >> PublicDecompWT_all.h - for x in $(wildcard PublicDecompWT/COMP/WT/Src/*.cpp) $(wildcard PublicDecompWT/COMP/Src/*.cpp) $(wildcard PublicDecompWT/DISE/*.cpp) ; do\ - echo "#include \"$$x\"" >> PublicDecompWT_all.h; \ - done diff --git a/frmts/msg/makefile.vc b/frmts/msg/makefile.vc deleted file mode 100644 index e631257a4243..000000000000 --- a/frmts/msg/makefile.vc +++ /dev/null @@ -1,26 +0,0 @@ - -OBJ = msgdataset.obj xritheaderparser.obj prologue.obj msgcommand.obj reflectancecalculator.obj - -EXTRAFLAGS = -I PublicDecompWT\DISE -I PublicDecompWT\COMP\WT\Inc -I PublicDecompWT\COMP\Inc - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) waveletlib - xcopy /D /Y *.obj ..\o - -waveletlib: - cd PublicDecompWT\COMP\WT\Src \ - && $(MAKE) /f makefile.vc \ - && cd ..\..\..\.. - cd PublicDecompWT\COMP\Src \ - && $(MAKE) /f makefile.vc \ - && cd ..\..\.. - cd PublicDecompWT\DISE \ - && $(MAKE) /f makefile.vc \ - && cd ..\.. - -clean: - -del *.obj - diff --git a/frmts/msgn/GNUmakefile b/frmts/msgn/GNUmakefile deleted file mode 100644 index b84de967e0ae..000000000000 --- a/frmts/msgn/GNUmakefile +++ /dev/null @@ -1,13 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = msgndataset.o msg_basic_types.o msg_reader_core.o - -CPPFLAGS := $(CPPFLAGS) -iquote . -DGDAL_SUPPORT - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/msgn/makefile.vc b/frmts/msgn/makefile.vc deleted file mode 100644 index c5df738b4f48..000000000000 --- a/frmts/msgn/makefile.vc +++ /dev/null @@ -1,15 +0,0 @@ - -OBJ = msgndataset.obj msg_basic_types.obj msg_reader_core.obj - -EXTRAFLAGS = -I. -DGDAL_SUPPORT - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/netcdf/GNUmakefile b/frmts/netcdf/GNUmakefile deleted file mode 100644 index bfc6118fc548..000000000000 --- a/frmts/netcdf/GNUmakefile +++ /dev/null @@ -1,47 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = netcdfdataset.o \ - netcdflayer.o \ - netcdfwriterconfig.o \ - netcdfsg.o \ - netcdflayersg.o \ - netcdfsgwriterutil.o \ - netcdfmultidim.o \ - netcdfvirtual.o \ - netcdf_sentinel3_sral_mwr.o - -XTRA_OPT = -ifeq ($(NETCDF_HAS_NC4),yes) -XTRA_OPT := -DNETCDF_HAS_NC4 $(XTRA_OPT) -endif -ifeq ($(NETCDF_HAS_HDF4),yes) -XTRA_OPT := -DNETCDF_HAS_HDF4 $(XTRA_OPT) -endif -ifeq ($(HAVE_HDF4),yes) -XTRA_OPT := -DHAVE_HDF4 $(XTRA_OPT) -endif -ifeq ($(HAVE_HDF5),yes) -XTRA_OPT := -DHAVE_HDF5 $(XTRA_OPT) -endif - -CPPFLAGS := $(CPPFLAGS) $(XTRA_OPT) - -ifeq ($(NETCDF_MEM),yes) -CPPFLAGS := $(CPPFLAGS) -DHAVE_NETCDF_MEM -endif - -ifeq ($(ENABLE_UFFD),yes) -ifeq ($(NETCDF_MEM),yes) -CPPFLAGS := $(CPPFLAGS) -DENABLE_UFFD -endif -endif - -$(O_OBJ): netcdfdataset.h - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/netcdf/makefile.vc b/frmts/netcdf/makefile.vc deleted file mode 100644 index 16debdec6f7e..000000000000 --- a/frmts/netcdf/makefile.vc +++ /dev/null @@ -1,59 +0,0 @@ - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -OBJ = netcdfdataset.obj \ - netcdflayer.obj \ - netcdfwriterconfig.obj \ - netcdfsg.obj \ - netcdflayersg.obj \ - netcdfsgwriterutil.obj \ - netcdfmultidim.obj \ - netcdfvirtual.obj \ - netcdf_sentinel3_sral_mwr.obj - -PLUGIN_DLL = gdal_netCDF.dll - -EXTRAFLAGS = /I$(NETCDF_INC_DIR) - -!IF "$(NETCDF_PLUGIN)" == "YES" -EXTRAFLAGS = $(EXTRAFLAGS) -DNETCDF_PLUGIN -!ENDIF - -!IFDEF NETCDF_HAS_NC4 -EXTRAFLAGS = $(EXTRAFLAGS) -DNETCDF_HAS_NC4 -!ENDIF -!IFDEF NETCDF_HAS_HDF4 -EXTRAFLAGS = $(EXTRAFLAGS) -DNETCDF_HAS_HDF4 -!ENDIF -!IFDEF HDF4_DIR -EXTRAFLAGS = $(EXTRAFLAGS) -DHAVE_HDF4 -!ENDIF -!IFDEF HDF5_DIR -EXTRAFLAGS = $(EXTRAFLAGS) -DHAVE_HDF5 -!ENDIF -!IFDEF NETCDF_HAS_NETCDF_MEM -EXTRAFLAGS = $(EXTRAFLAGS) -DHAVE_NETCDF_MEM -!ENDIF - -default: $(OBJ) - $(INSTALL) *.obj ..\o - -clean: - -del *.obj - -del *.dll - -del *.exp - -del *.lib - -del *.manifest - -plugin: $(PLUGIN_DLL) - -$(PLUGIN_DLL): $(OBJ) - link /dll $(LDEBUG) /out:$(PLUGIN_DLL) $(OBJ) $(GDALLIB) $(NETCDF_LIB) - if exist $(PLUGIN_DLL).manifest mt -manifest $(PLUGIN_DLL).manifest -outputresource:$(PLUGIN_DLL);2 - -plugin-install: - -mkdir $(PLUGINDIR) - $(INSTALL) $(PLUGIN_DLL) $(PLUGINDIR) - diff --git a/frmts/ngsgeoid/GNUmakefile b/frmts/ngsgeoid/GNUmakefile deleted file mode 100644 index c0273bf261f4..000000000000 --- a/frmts/ngsgeoid/GNUmakefile +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = ngsgeoiddataset.o - -include ../../GDALmake.opt - - - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/ngsgeoid/makefile.vc b/frmts/ngsgeoid/makefile.vc deleted file mode 100644 index 72cd3b7cc93f..000000000000 --- a/frmts/ngsgeoid/makefile.vc +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = ngsgeoiddataset.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/nitf/GNUmakefile b/frmts/nitf/GNUmakefile deleted file mode 100644 index 9df9a229a6d4..000000000000 --- a/frmts/nitf/GNUmakefile +++ /dev/null @@ -1,50 +0,0 @@ - - -include ../../GDALmake.opt - -GDAL_OBJ = nitfdataset.o rpftocdataset.o nitfwritejpeg.o \ - nitfwritejpeg_12.o nitfrasterband.o ecrgtocdataset.o -NITFLIB_OBJ = nitffile.o nitfimage.o mgrs.o nitfaridpcm.o \ - nitfbilevel.o rpftocfile.o nitfdes.o nitf_gcprpc.o - -CPPFLAGS := -iquote ../vrt -iquote ../gtiff $(CPPFLAGS) - -ifeq ($(TIFF_SETTING),internal) -ifeq ($(RENAME_INTERNAL_LIBTIFF_SYMBOLS),yes) -CPPFLAGS := $(CPPFLAGS) -DRENAME_INTERNAL_LIBTIFF_SYMBOLS -endif -CPPFLAGS := -I../gtiff/libtiff $(CPPFLAGS) -endif - -ifneq ($(JPEG_SETTING),no) -CPPFLAGS := $(CPPFLAGS) -DJPEG_SUPPORTED -endif - -ifeq ($(JPEG_SETTING),internal) -ifeq ($(RENAME_INTERNAL_LIBJPEG_SYMBOLS),yes) -CPPFLAGS := $(CPPFLAGS) -DRENAME_INTERNAL_LIBJPEG_SYMBOLS -endif -CPPFLAGS := -I../jpeg/libjpeg $(CPPFLAGS) -endif - -ifeq ($(JPEG12_ENABLED),yes) -CPPFLAGS := $(CPPFLAGS) -DJPEG_DUAL_MODE_8_12 -PREDEPEND = libjpeg12 -endif - -OBJ = $(GDAL_OBJ) $(NITFLIB_OBJ) - -default: $(PREDEPEND) $(OBJ:.o=.$(OBJ_EXT)) - -$(OBJ) $(O_OBJ): ../../gcore/gdal_proxy.h ../vrt/vrtdataset.h nitflib.h nitfwritejpeg.cpp - -clean: - rm -f *.o $(O_OBJ) nitfdump$(EXE) - -nitfdump$(EXE): nitfdump.$(OBJ_EXT) - $(LD) $(LDFLAGS) nitfdump.$(OBJ_EXT) $(CONFIG_LIBS) -o nitfdump$(EXE) - -install-obj: $(PREDEPEND) $(O_OBJ:.o=.$(OBJ_EXT)) - -libjpeg12: - (cd ../jpeg; $(MAKE) libjpeg12/jcapimin12.c) diff --git a/frmts/nitf/makefile.vc b/frmts/nitf/makefile.vc deleted file mode 100644 index 90da63dd4a9c..000000000000 --- a/frmts/nitf/makefile.vc +++ /dev/null @@ -1,37 +0,0 @@ - -GDAL_OBJ = nitfdataset.obj rpftocdataset.obj nitfwritejpeg.obj \ - nitfwritejpeg_12.obj nitfrasterband.obj ecrgtocdataset.obj - -NITFLIB_OBJ = nitffile.obj nitfimage.obj mgrs.obj nitfaridpcm.obj \ - nitfbilevel.obj rpftocfile.obj nitfdes.obj nitf_gcprpc.obj - -OBJ = $(GDAL_OBJ) $(NITFLIB_OBJ) - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -!IFDEF JPEG_SUPPORTED -!IFDEF JPEG_EXTERNAL_LIB -JPEG_FLAGS = -I$(JPEGDIR) -DJPEG_SUPPORTED -!ELSE -JPEG_FLAGS = -I..\jpeg\libjpeg -DJPEG_SUPPORTED -!ENDIF -!ENDIF - -!IFDEF JPEG12_SUPPORTED -JPEG12_FLAGS = -DJPEG_DUAL_MODE_8_12 -!ENDIF - -EXTRAFLAGS = -I..\gtiff -I..\gtiff\libtiff -I..\vrt $(JPEG_FLAGS) $(JPEG12_FLAGS) - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - -nitfdump.exe: nitfdump.c $(NITFLIB_OBJ) - $(CC) $(CFLAGS) nitfdump.c $(GDALLIB) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - del nitfdump.obj diff --git a/frmts/northwood/GNUmakefile b/frmts/northwood/GNUmakefile deleted file mode 100644 index 485103b7ef33..000000000000 --- a/frmts/northwood/GNUmakefile +++ /dev/null @@ -1,18 +0,0 @@ -GDAL_ROOT = ../.. - -include $(GDAL_ROOT)/GDALmake.opt - -OBJ = grddataset.o grcdataset.o northwood.o - -CPPFLAGS := $(CPPFLAGS) $(XTRA_OPT) - -CXXFLAGS := $(WARN_EFFCPLUSPLUS) $(WARN_OLD_STYLE_CAST) $(CXXFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o - -all: $(OBJ:.o=.$(OBJ_EXT)) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/northwood/makefile.vc b/frmts/northwood/makefile.vc deleted file mode 100644 index 656eba3e23dc..000000000000 --- a/frmts/northwood/makefile.vc +++ /dev/null @@ -1,15 +0,0 @@ - -OBJ = grddataset.obj grcdataset.obj northwood.obj - -EXTRAFLAGS = -I..\..\ogr\ogrsf_frmts - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/null/GNUmakefile b/frmts/null/GNUmakefile deleted file mode 100644 index 86bb96979f9c..000000000000 --- a/frmts/null/GNUmakefile +++ /dev/null @@ -1,12 +0,0 @@ - - -include ../../GDALmake.opt - -OBJ = nulldataset.o - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/ogcapi/GNUmakefile b/frmts/ogcapi/GNUmakefile deleted file mode 100644 index b2ed0eb14944..000000000000 --- a/frmts/ogcapi/GNUmakefile +++ /dev/null @@ -1,13 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = gdalogcapidataset.o - -CPPFLAGS := -iquote ../../gcore -iquote ../../ogr -iquote ../../ogr/ogrsf_frmts/gml $(CPPFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(OBJ) $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/ogcapi/makefile.vc b/frmts/ogcapi/makefile.vc deleted file mode 100644 index d745861bab47..000000000000 --- a/frmts/ogcapi/makefile.vc +++ /dev/null @@ -1,16 +0,0 @@ - -OBJ = gdalogcapidataset.obj - -EXTRAFLAGS = $(CURL_CFLAGS) $(CURL_INC) -I$(GDAL_ROOT)/ogr/ogrsf_frmts/gml - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - -del *.dll diff --git a/frmts/openjpeg/GNUmakefile b/frmts/openjpeg/GNUmakefile deleted file mode 100644 index 8896f4269893..000000000000 --- a/frmts/openjpeg/GNUmakefile +++ /dev/null @@ -1,21 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = openjpegdataset.o - -CPPFLAGS := -iquote .. $(CPPFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f $(OBJ) $(O_OBJ) *.so *.lo - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) - -PLUGIN_SO = gdal_JP2OpenJPEG.so - -plugin: $(PLUGIN_SO) - -$(PLUGIN_SO): $(OBJ) - $(LD_SHARED) $(LNK_FLAGS) $(OBJ) $(CONFIG_LIBS_INS) $(LIBS) \ - -o $(PLUGIN_SO) diff --git a/frmts/openjpeg/makefile.vc b/frmts/openjpeg/makefile.vc deleted file mode 100644 index 618a3f46fe07..000000000000 --- a/frmts/openjpeg/makefile.vc +++ /dev/null @@ -1,30 +0,0 @@ - -OBJ = openjpegdataset.obj - -GDAL_ROOT = ..\.. - -PLUGIN_DLL = gdal_JP2OpenJPEG.dll - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -EXTRAFLAGS = -I.. $(OPENJPEG_CFLAGS) - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - -del *.dll - -del *.exp - -del *.lib - -del *.manifest - -plugin: $(PLUGIN_DLL) - -$(PLUGIN_DLL): $(OBJ) - link /dll $(LDEBUG) /out:$(PLUGIN_DLL) $(OBJ) $(OPENJPEG_LIB) $(GDALLIB) - if exist $(PLUGIN_DLL).manifest mt -manifest $(PLUGIN_DLL).manifest -outputresource:$(PLUGIN_DLL);2 - -plugin-install: - -mkdir $(PLUGINDIR) - $(INSTALL) $(PLUGIN_DLL) $(PLUGINDIR) \ No newline at end of file diff --git a/frmts/ozi/GNUmakefile b/frmts/ozi/GNUmakefile deleted file mode 100644 index f773ebfee94c..000000000000 --- a/frmts/ozi/GNUmakefile +++ /dev/null @@ -1,19 +0,0 @@ - -OBJ = ozidataset.o - -include ../../GDALmake.opt - -ifeq ($(LIBZ_SETTING),internal) -XTRA_OPT = -I../zlib -else -XTRA_OPT = -endif - -CPPFLAGS := $(CPPFLAGS) $(XTRA_OPT) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/ozi/makefile.vc b/frmts/ozi/makefile.vc deleted file mode 100644 index abd4caa88636..000000000000 --- a/frmts/ozi/makefile.vc +++ /dev/null @@ -1,19 +0,0 @@ - -OBJ = ozidataset.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -!IFDEF ZLIB_EXTERNAL_LIB -EXTRAFLAGS = $(ZLIB_INC) -!ELSE -EXTRAFLAGS = -I..\zlib -!ENDIF - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/pcidsk/GNUmakefile b/frmts/pcidsk/GNUmakefile deleted file mode 100644 index a41178a8ba10..000000000000 --- a/frmts/pcidsk/GNUmakefile +++ /dev/null @@ -1,134 +0,0 @@ - -include ../../GDALmake.opt - -ifneq ($(JPEG_SETTING),no) -JPEG_FLAGS = -DHAVE_LIBJPEG -endif - -ifeq ($(JPEG_SETTING),internal) -JPEG_INCLUDE = -I../jpeg/libjpeg -ifeq ($(RENAME_INTERNAL_LIBJPEG_SYMBOLS),yes) -JPEG_FLAGS := -DRENAME_INTERNAL_LIBJPEG_SYMBOLS $(JPEG_FLAGS) -endif -endif - -ifeq ($(PCIDSK_SETTING),no) -# Do nothing. -else -OBJ = pcidskdataset2.o ogrpcidsklayer.o vsi_pcidsk_io.o gdal_edb.o $(SDKOBJ) -ifeq ($(PCIDSK_SETTING),internal) -CPPFLAGS := $(JPEG_FLAGS) $(JPEG_INCLUDE) -DPCIDSK_INTERNAL \ - -Isdk $(CPPFLAGS) - -SDKOBJ = \ - asciitiledir.o \ - asciitilelayer.o \ - binarytiledir.o \ - binarytilelayer.o \ - blockdir.o \ - blockfile.o \ - blocklayer.o \ - blocktiledir.o \ - blocktilelayer.o \ - cbandinterleavedchannel.o \ - cpcidskchannel.o \ - cpixelinterleavedchannel.o \ - ctiledchannel.o \ - cexternalchannel.o \ - cpcidskfile.o \ - cpcidskblockfile.o \ - libjpeg_io.o \ - edb_pcidsk.o \ - metadataset_p.o \ - pcidskbuffer.o \ - pcidskcreate.o \ - pcidskexception.o \ - pcidskinterfaces.o \ - pcidskopen.o \ - pcidsk_pubutils.o \ - pcidsk_raster.o \ - pcidsk_scanint.o \ - pcidsk_utils.o \ - cpcidskgeoref.o \ - cpcidsksegment.o \ - cpcidskvectorsegment.o \ - cpcidskvectorsegment_consistencycheck.o \ - systiledir.o \ - vecsegheader.o \ - vecsegdataindex.o \ - metadatasegment_p.o \ - cpcidsklut.o \ - cpcidskblut.o \ - cpcidskpct.o \ - cpcidskbpct.o \ - cpcidskpolymodel.o \ - cpcidskrpcmodel.o \ - cpcidskgcp2segment.o \ - cpcidskbitmap.o \ - cpcidsk_tex.o \ - clinksegment.o \ - cpcidsktoutinmodel.o \ - cpcidskbinarysegment.o \ - cpcidsk_array.o \ - cpcidskephemerissegment.o - -else -CPPFLAGS := $(PCIDSK_INCLUDE) $(CPPFLAGS) -endif -endif - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -../o/%.$(OBJ_EXT): sdk/%.cpp - $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ - -../o/%.$(OBJ_EXT): sdk/blockdir/%.cpp - $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ - -../o/%.$(OBJ_EXT): sdk/channel/%.cpp - $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ - -../o/%.$(OBJ_EXT): sdk/core/%.cpp - $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ - -../o/%.$(OBJ_EXT): sdk/port/%.cpp - $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ - -../o/%.$(OBJ_EXT): sdk/segment/%.cpp - $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ - -%.$(OBJ_EXT): sdk/%.cpp - $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ - -%.$(OBJ_EXT): sdk/blockdir/%.cpp - $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ - -%.$(OBJ_EXT): sdk/channel/%.cpp - $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ - -%.$(OBJ_EXT): sdk/core/%.cpp - $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ - -%.$(OBJ_EXT): sdk/port/%.cpp - $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ - -%.$(OBJ_EXT): sdk/segment/%.cpp - $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) - -import: - cp ~/pcidsk/src/*.h sdk - cp ~/pcidsk/src/raster/*.h* sdk/raster - cp ~/pcidsk/src/blockdir/*.cpp sdk/blockdir - cp ~/pcidsk/src/blockdir/*.h sdk/blockdir - cp ~/pcidsk/src/channel/*.cpp sdk/channel - cp ~/pcidsk/src/channel/*.h sdk/channel - cp ~/pcidsk/src/segment/*.cpp sdk/segment - cp ~/pcidsk/src/segment/*.h sdk/segment - cp ~/pcidsk/src/core/*.cpp sdk/core - cp ~/pcidsk/src/core/*.h sdk/core - cp ~/pcidsk/src/port/*.cpp sdk/port diff --git a/frmts/pcidsk/makefile.vc b/frmts/pcidsk/makefile.vc deleted file mode 100644 index 43f4ac2cfcb9..000000000000 --- a/frmts/pcidsk/makefile.vc +++ /dev/null @@ -1,87 +0,0 @@ - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -!IF "$(PCIDSK_SETTING)" == "OLD" -PCIDSKFLAGS = -OBJ = pcidskdataset.obj pcidsktiledrasterband.obj -!ENDIF - -!IF "$(PCIDSK_SETTING)" == "EXTERNAL" -PCIDSKFLAGS = $(PCIDSK_INCLUDE) -OBJ = pcidskdataset2.obj ogrpcidsklayer.obj vsi_pcidsk_io.obj gdal_edb.obj -!ENDIF - -!IF "$(PCIDSK_SETTING)" == "INTERNAL" -PCIDSKFLAGS = -Isdk -DPCIDSK_INTERNAL -DHAVE_LIBJPEG - -OBJ = pcidskdataset2.obj ogrpcidsklayer.obj vsi_pcidsk_io.obj gdal_edb.obj \ - sdk\blockdir\asciitiledir.obj \ - sdk\blockdir\asciitilelayer.obj \ - sdk\blockdir\binarytiledir.obj \ - sdk\blockdir\binarytilelayer.obj \ - sdk\blockdir\blockdir.obj \ - sdk\blockdir\blockfile.obj \ - sdk\blockdir\blocklayer.obj \ - sdk\blockdir\blocktiledir.obj \ - sdk\blockdir\blocktilelayer.obj \ - sdk\channel\cbandinterleavedchannel.obj \ - sdk\channel\cpcidskchannel.obj \ - sdk\channel\cpixelinterleavedchannel.obj \ - sdk\channel\ctiledchannel.obj \ - sdk\channel\cexternalchannel.obj \ - sdk\core\cpcidskfile.obj \ - sdk\core\cpcidskblockfile.obj \ - sdk\core\libjpeg_io.obj \ - sdk\core\edb_pcidsk.obj \ - sdk\core\metadataset_p.obj \ - sdk\core\pcidskbuffer.obj \ - sdk\core\pcidskcreate.obj \ - sdk\core\pcidskexception.obj \ - sdk\core\pcidskinterfaces.obj \ - sdk\core\pcidskopen.obj \ - sdk\core\pcidsk_pubutils.obj \ - sdk\core\pcidsk_raster.obj \ - sdk\core\pcidsk_scanint.obj \ - sdk\core\pcidsk_utils.obj \ - sdk\core\clinksegment.obj \ - sdk\segment\cpcidskgeoref.obj \ - sdk\segment\cpcidsklut.obj \ - sdk\segment\cpcidskblut.obj \ - sdk\segment\cpcidskpct.obj \ - sdk\segment\cpcidskbpct.obj \ - sdk\segment\cpcidsksegment.obj \ - sdk\segment\cpcidskvectorsegment.obj \ - sdk\segment\cpcidskvectorsegment_consistencycheck.obj \ - sdk\segment\systiledir.obj \ - sdk\segment\vecsegheader.obj \ - sdk\segment\vecsegdataindex.obj \ - sdk\segment\metadatasegment_p.obj \ - sdk\segment\cpcidskpolymodel.obj \ - sdk\segment\cpcidskrpcmodel.obj \ - sdk\segment\cpcidskgcp2segment.obj \ - sdk\segment\cpcidskbitmap.obj \ - sdk\segment\cpcidsk_tex.obj \ - sdk\segment\cpcidsktoutinmodel.obj \ - sdk\segment\cpcidskbinarysegment.obj \ - sdk\segment\cpcidsk_array.obj \ - sdk\segment\cpcidskephemerissegment.obj - -!ENDIF - -!IFDEF JPEG_EXTERNAL_LIB -JPEGFLAGS = -I$(JPEGDIR) -!ELSE -JPEGFLAGS = -I..\jpeg\libjpeg -!ENDIF - -.cpp.obj: - $(CC) $(CFLAGS) $(PCIDSKFLAGS) $(JPEGFLAGS) /c $*.cpp /Fo$*.obj - xcopy /D /Y $*.obj ..\o - -default: $(OBJ) - -clean: - -del $(OBJ) - diff --git a/frmts/pcidsk/sdk/GNUmakefile b/frmts/pcidsk/sdk/GNUmakefile deleted file mode 100644 index 19a7aae485a4..000000000000 --- a/frmts/pcidsk/sdk/GNUmakefile +++ /dev/null @@ -1,94 +0,0 @@ - -# Comment out to skip use of libjpeg -JPEG_FLAGS = -DHAVE_LIBJPEG -JPEG_LDFLAGS = -ljpeg - -OBJ = \ - blockdir/asciitiledir.o \ - blockdir/asciitilelayer.o \ - blockdir/binarytiledir.o \ - blockdir/binarytilelayer.o \ - blockdir/blockdir.o \ - blockdir/blockfile.o \ - blockdir/blocklayer.o \ - blockdir/blocktiledir.o \ - blockdir/blocktilelayer.o \ - channel/cbandinterleavedchannel.o \ - channel/cexternalchannel.o \ - channel/cpcidskchannel.o \ - channel/cpixelinterleavedchannel.o \ - channel/ctiledchannel.o \ - core/clinksegment.o \ - core/cpcidskblockfile.o \ - core/cpcidskfile.o \ - core/edb_pcidsk.o \ - core/libjpeg_io.o \ - core/libkakadu_io.o \ - core/metadataset_p.o \ - core/pcidskbuffer.o \ - core/pcidskcreate.o \ - core/pcidskexception.o \ - core/pcidskinterfaces.o \ - core/pcidskopen.o \ - core/pcidsk_pubutils.o \ - core/pcidsk_raster.o \ - core/pcidsk_scanint.o \ - core/pcidsk_utils.o \ - port/io_stdio.o \ - port/pthread_mutex.o \ - segment/cpcidsk_array.o \ - segment/cpcidskbinarysegment.o \ - segment/cpcidskbitmap.o \ - segment/cpcidskblut.o \ - segment/cpcidskbpct.o \ - segment/cpcidskephemerissegment.o \ - segment/cpcidskgcp2segment.o \ - segment/cpcidskgeoref.o \ - segment/cpcidsklut.o \ - segment/cpcidskpct.o \ - segment/cpcidskpolymodel.o \ - segment/cpcidskrpcmodel.o \ - segment/cpcidsksegment.o \ - segment/cpcidsk_tex.o \ - segment/cpcidsktoutinmodel.o \ - segment/cpcidskvectorsegment_consistencycheck.o \ - segment/cpcidskvectorsegment.o \ - segment/metadatasegment_p.o \ - segment/systiledir.o \ - segment/vecsegdataindex.o \ - segment/vecsegheader.o - -CXXFLAGS = -g -O0 -Wall -fPIC -iquote . $(JPEG_FLAGS) - -default: pcidsk.a libpcidsk.so - -pcidsk.a: $(OBJ) - ar r pcidsk.a $(OBJ) - -libpcidsk.so: $(OBJ) - g++ -fPIC $(JPEG_LDFLAGS) -ldl -shared -o libpcidsk.so $(OBJ) - -clean: - rm -f $(OBJ) - -rm -f *.o - -rm -f *.a - -rm -f *.so - -core_comp: - (cd core; $(MAKE)) - (cd channel; $(MAKE)) - (cd segment; $(MAKE)) - (cd blockdir; $(MAKE)) - (cd port; $(MAKE)) - -check: default - (cd ../tests; $(MAKE) check) - -$(OBJ): pcidsk.h pcidsk_config.h - -%.o: %.cpp - $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< - -docs: - doxygen - diff --git a/frmts/pcraster/GNUmakefile b/frmts/pcraster/GNUmakefile deleted file mode 100644 index b252cc69ba48..000000000000 --- a/frmts/pcraster/GNUmakefile +++ /dev/null @@ -1,28 +0,0 @@ - -include ../../GDALmake.opt - -CPPFLAGS := $(XTRA_OPT) $(CPPFLAGS) - -ifeq ($(PCRASTER_SETTING),internal) -CPPFLAGS += -DUSE_IN_GDAL -Ilibcsf -OBJ = _getcell.o _getrow.o _gsomece.o _putcell.o _rputrow.o angle.o attravai.o attrsize.o cellsize.o create2.o csfglob.o csfsup.o delattr.o dumconv.o endian.o file.o filename.o gattrblk.o gattridx.o gcellrep.o gdattype.o getattr.o getx0.o gety0.o ggisfid.o gmaxval.o gminval.o gnrcols.o gnrrows.o gproj.o gputproj.o gvalscal.o gvartype.o gversion.o ismv.o kernlcsf.o legend.o mclose.o mopen.o moreattr.o mperror.o pgisfid.o pmaxval.o pminval.o putallmv.o putattr.o putsomec.o putx0.o puty0.o pvalscal.o rattrblk.o rcomp.o rcoords.o rdup2.o reseterr.o rextend.o rmalloc.o rrowcol.o ruseas.o setangle.o setmv.o setvtmv.o strconst.o strpad.o swapio.o trackmm.o vs2.o vsdef.o vsis.o vsvers.o wattrblk.o -endif - -OBJ += pcrasterdataset.o pcrastermisc.o pcrasterrasterband.o pcrasterutil.o - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o libcsf/*.o $(O_OBJ) - rm -fR html - -../o/%.$(OBJ_EXT): libcsf/%.c - $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@ - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) - -docs: - doxygen doxygen.cfg - -ctags: - ctags *cpp *h diff --git a/frmts/pcraster/libcsf/makefile.vc b/frmts/pcraster/libcsf/makefile.vc deleted file mode 100644 index 14958c5fc9e3..000000000000 --- a/frmts/pcraster/libcsf/makefile.vc +++ /dev/null @@ -1,29 +0,0 @@ -GDAL_ROOT = ..\..\.. -EXTRAFLAGS=-DUSE_IN_GDAL $(SOFTWARNFLAGS) -!INCLUDE $(GDAL_ROOT)\nmake.opt - - -OBJ = endian.obj swapio.obj vs2.obj vsdef.obj rextend.obj\ -vsvers.obj legend.obj strpad.obj strconst.obj vsis.obj ruseas.obj rmalloc.obj create2.obj \ -_getcell.obj _getrow.obj _gsomece.obj _putcell.obj _rputrow.obj\ -attravai.obj attrsize.obj csfglob.obj csfsup.obj delattr.obj\ -file.obj filename.obj gattrblk.obj gattridx.obj gcellrep.obj \ - cellsize.obj gdattype.obj getattr.obj getx0.obj\ -gety0.obj ggisfid.obj gmaxval.obj gminval.obj gnrcols.obj gnrrows.obj\ -gproj.obj gputproj.obj gvalscal.obj gvartype.obj gversion.obj ismv.obj\ -kernlcsf.obj mclose.obj mopen.obj mperror.obj \ -pgisfid.obj pmaxval.obj pminval.obj putallmv.obj putattr.obj\ -putsomec.obj putx0.obj puty0.obj pvalscal.obj rattrblk.obj rcomp.obj\ -rcoords.obj rdup2.obj reseterr.obj \ -rrowcol.obj setmv.obj setvtmv.obj moreattr.obj\ -wattrblk.obj setangle.obj angle.obj dumconv.obj trackmm.obj - -GDAL_ROOT = ..\..\.. - - -default: $(OBJ) - xcopy /D /Y *.obj ..\..\o - -clean: - -del *.obj - diff --git a/frmts/pcraster/makefile.vc b/frmts/pcraster/makefile.vc deleted file mode 100644 index e6b3a95d7f17..000000000000 --- a/frmts/pcraster/makefile.vc +++ /dev/null @@ -1,30 +0,0 @@ - -# nmake makefile for gdal -# should go as makefile.vc in frmts/pcraster - -OBJ = pcrasterdataset.obj pcrastermisc.obj pcrasterutil.obj \ - pcrasterrasterband.obj - -!IFNDEF PCRASTER_EXTERNAL_LIB -EXTRAFLAGS = -Ilibcsf -DUSE_IN_GDAL -!ENDIF - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj \ - ..\o -!IFNDEF PCRASTER_EXTERNAL_LIB - cd libcsf - $(MAKE) /f makefile.vc - cd .. -!ENDIF - -clean: - -del *.obj - cd libcsf - $(MAKE) /f makefile.vc clean - cd .. - diff --git a/frmts/pdf/GNUmakefile b/frmts/pdf/GNUmakefile deleted file mode 100644 index eb36b405a3fd..000000000000 --- a/frmts/pdf/GNUmakefile +++ /dev/null @@ -1,53 +0,0 @@ -include ../../GDALmake.opt - -OBJ = pdfdataset.o pdfio.o pdfobject.o pdfcreatecopy.o ogrpdflayer.o pdfwritabledataset.o pdfreadvectors.o pdfcreatefromcomposition.o - -PLUGIN_DL = gdal_PDF.so - -ifeq ($(MACOSX_FRAMEWORK),yes) -PLUGIN_DL = gdal_PDF.dylib -LDFLAGS += -Wl,-undefined -Wl,dynamic_lookup -LD_SHARED = $(LD) -bundle -endif - -ifeq ($(HAVE_POPPLER),yes) -# Poppler 2022.1 requires c++17 -ifeq ($(shell test $(POPPLER_MAJOR_VERSION) -gt 21; echo $$?),0) -CXX := $(subst -std=c++11,,${CXX}) -CXX := $(subst -std=c++14,,${CXX}) -CXX := ${CXX} -std=c++17 -endif -CPPFLAGS += -DHAVE_POPPLER -DPOPPLER_MAJOR_VERSION=$(POPPLER_MAJOR_VERSION) -DPOPPLER_MINOR_VERSION=$(POPPLER_MINOR_VERSION) -endif - -ifeq ($(HAVE_PODOFO),yes) -CPPFLAGS += -DHAVE_PODOFO -endif - -ifeq ($(HAVE_PDFIUM),yes) -CPPFLAGS += -DHAVE_PDFIUM -CXX := $(subst -std=c++11,-std=c++14,${CXX}) -# -Wzero-as-null-pointer-constant isn't compatible of pdfium headers -# /home/even/pdfium/install/include/pdfium/third_party/base/numerics/safe_conversions.h: In instantiation of ‘Dst pdfium::base::checked_cast(Src) [with Dst = int; Src = long unsigned int]’: -# /home/even/pdfium/install/include/pdfium/core/include/fxcrt/fx_string.h:43:26: required from here -# /home/even/pdfium/install/include/pdfium/third_party/base/numerics/safe_conversions.h:29:3: erreur: invalid cast from type ‘std::nullptr_t’ to type ‘volatile char*’ -# CHECK(IsValueInRangeForNumericType(value)); -CXX := $(subst -Wzero-as-null-pointer-constant,,${CXX}) -endif - -$(O_OBJ): pdfobject.h pdfio.h pdfcreatecopy.h pdfcreatefromcomposition.h gdal_pdf.h ../../ogr/ogrsf_frmts/mem/ogr_mem.h - -CPPFLAGS := -iquote ../vrt -iquote ../mem -iquote ../../ogr/ogrsf_frmts/mem $(CPPFLAGS) $(POPPLER_INC) $(PODOFO_INC) $(PDFIUM_INC) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - rm -f $(PLUGIN_DL) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) - -plugin: $(PLUGIN_DL) - -$(PLUGIN_DL): $(OBJ) - $(LD_SHARED) $(OBJ) ../../ogr/ogrsf_frmts/o/ogrmemdatasource.o ../../ogr/ogrsf_frmts/o/ogrmemdriver.o ../../ogr/ogrsf_frmts/o/ogrmemlayer.o $(LDFLAGS) -o $(PLUGIN_DL) $(PDFIUM_PLUGIN_LIB) $(POPPLER_PLUGIN_LIB) $(PODOFO_PLUGIN_LIB) $(CONFIG_LIBS) diff --git a/frmts/pdf/makefile.vc b/frmts/pdf/makefile.vc deleted file mode 100644 index f34a8e5bacb1..000000000000 --- a/frmts/pdf/makefile.vc +++ /dev/null @@ -1,53 +0,0 @@ - -OBJ = pdfdataset.obj pdfio.obj pdfobject.obj pdfcreatecopy.obj ogrpdflayer.obj pdfwritabledataset.obj pdfreadvectors.obj pdfcreatefromcomposition.obj - -PLUGIN_DLL = gdal_PDF.dll - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -!IFDEF PDF_PLUGIN -OBJ = $(OBJ) ..\..\ogr\ogrsf_frmts\mem\ogrmemdatasource.obj ..\..\ogr\ogrsf_frmts\mem\ogrmemdriver.obj ..\..\ogr\ogrsf_frmts\mem\ogrmemlayer.obj -!ENDIF - -EXTRAFLAGS = -I..\vrt -I..\mem -I..\..\ogr\ogrsf_frmts\mem $(POPPLER_EXTRAFLAGS) $(PODOFO_EXTRAFLAGS) $(PDFIUM_EXTRAFLAGS) - -!IFDEF POPPLER_ENABLED -POPPLER_EXTRAFLAGS = $(POPPLER_CFLAGS) $(POPPLER_VERSION_FLAGS) -DHAVE_POPPLER - -!IFDEF POPPLER_0_69_OR_LATER -POPPLER_VERSION_FLAGS = -DPOPPLER_MAJOR_VERSION=0 -DPOPPLER_MINOR_VERSION=69 -!ELSEIFDEF POPPLER_0_58_OR_LATER -POPPLER_VERSION_FLAGS = -DPOPPLER_MAJOR_VERSION=0 -DPOPPLER_MINOR_VERSION=58 -!ELSEIFDEF POPPLER_MAJOR_VERSION -POPPLER_VERSION_FLAGS = -DPOPPLER_MAJOR_VERSION=$(POPPLER_MAJOR_VERSION) -DPOPPLER_MINOR_VERSION=$(POPPLER_MINOR_VERSION) -!ELSE -POPPLER_VERSION_FLAGS = -DPOPPLER_MAJOR_VERSION=0 -DPOPPLER_MINOR_VERSION=23 -!ENDIF - -!ENDIF - -!IFDEF PODOFO_ENABLED -PODOFO_EXTRAFLAGS = $(PODOFO_CFLAGS) -DHAVE_PODOFO -!ENDIF - -!IFDEF PDFIUM_ENABLED -PDFIUM_EXTRAFLAGS = $(PDFIUM_CFLAGS) -DHAVE_PDFIUM -DNOMINMAX /wd4512 -!ENDIF - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - -plugin: $(PLUGIN_DLL) - -$(PLUGIN_DLL): $(OBJ) - link /dll $(LDEBUG) /out:$(PLUGIN_DLL) $(OBJ) $(GDALLIB) $(POPPLER_LIBS) $(PODOFO_LIBS) $(PDFIUM_LIBS) - if exist $(PLUGIN_DLL).manifest mt -manifest $(PLUGIN_DLL).manifest -outputresource:$(PLUGIN_DLL);2 - -plugin-install: - -mkdir $(PLUGINDIR) - $(INSTALL) $(PLUGIN_DLL) $(PLUGINDIR) diff --git a/frmts/pds/GNUmakefile b/frmts/pds/GNUmakefile deleted file mode 100644 index 7ed4b11e6869..000000000000 --- a/frmts/pds/GNUmakefile +++ /dev/null @@ -1,33 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = pdsdataset.o isis2dataset.o isis3dataset.o vicardataset.o \ - vicarkeywordhandler.o \ - pds4dataset.o pds4vector.o - -ifeq ($(GEOTIFF_SETTING),internal) -GEOTIFF_INCLUDE = -iquote ../gtiff/libgeotiff -ifeq ($(RENAME_INTERNAL_LIBGEOTIFF_SYMBOLS),yes) -CPPFLAGS := -DRENAME_INTERNAL_LIBGEOTIFF_SYMBOLS $(CPPFLAGS) -endif -endif - -LIBTIFF_OPTS = -ifeq ($(TIFF_SETTING),internal) -LIBTIFF_OPTS := -iquote ../gtiff/libtiff $(LIBTIFF_OPTS) -ifeq ($(RENAME_INTERNAL_LIBTIFF_SYMBOLS),yes) -LIBTIFF_OPTS := -DRENAME_INTERNAL_LIBTIFF_SYMBOLS $(LIBTIFF_OPTS) -endif -endif - -CPPFLAGS := -iquote ../vrt -iquote ../../ogr/ogrsf_frmts/geojson -iquote ../../ogr/ogrsf_frmts/generic -iquote ../../ogr/ogrsf_frmts/vrt $(JSON_INCLUDE) $(GEOTIFF_INCLUDE) $(LIBTIFF_OPTS) -iquote ../gtiff $(CPPFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -$(O_OBJ): ../../gcore/nasakeywordhandler.h vicarkeywordhandler.h pds4dataset.h ../vrt/vrtdataset.h ../../gcore/rawdataset.h - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) - diff --git a/frmts/pds/makefile.vc b/frmts/pds/makefile.vc deleted file mode 100644 index 9db4ee59d8d5..000000000000 --- a/frmts/pds/makefile.vc +++ /dev/null @@ -1,25 +0,0 @@ - -OBJ = pdsdataset.obj isis2dataset.obj isis3dataset.obj \ - vicardataset.obj vicarkeywordhandler.obj \ - pds4dataset.obj pds4vector.obj - -GDAL_ROOT = ..\.. - -EXTRAFLAGS = -I..\..\gcore -I..\vrt -I..\..\ogr\ogrsf_frmts\geojson -I..\..\ogr\ogrsf_frmts\geojson\libjson -I..\..\ogr\ogrsf_frmts\generic -I..\..\ogr\ogrsf_frmts\vrt $(GEOTIFF_INC) $(TIFF_INC) -I..\gtiff - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -!IFNDEF GEOTIFF_INC -GEOTIFF_INC = -I..\gtiff\libgeotiff -!ENDIF - -!IFNDEF TIFF_INC -TIFF_INC = -I..\gtiff\libtiff -!ENDIF - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/plmosaic/GNUmakefile b/frmts/plmosaic/GNUmakefile deleted file mode 100644 index 4869c28e1937..000000000000 --- a/frmts/plmosaic/GNUmakefile +++ /dev/null @@ -1,13 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = plmosaicdataset.o - -CPPFLAGS := -iquote ../../ogr/ogrsf_frmts/geojson $(JSON_INCLUDE) $(CPPFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(OBJ) $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/plmosaic/makefile.vc b/frmts/plmosaic/makefile.vc deleted file mode 100644 index 8bd163fbd4ae..000000000000 --- a/frmts/plmosaic/makefile.vc +++ /dev/null @@ -1,16 +0,0 @@ - -OBJ = plmosaicdataset.obj - -EXTRAFLAGS = $(CURL_CFLAGS) $(CURL_INC) -I..\..\ogr\ogrsf_frmts\geojson -I../../ogr/ogrsf_frmts/geojson/libjson - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - -del *.dll diff --git a/frmts/png/GNUmakefile b/frmts/png/GNUmakefile deleted file mode 100644 index 17552466083a..000000000000 --- a/frmts/png/GNUmakefile +++ /dev/null @@ -1,55 +0,0 @@ -# $Id$ -# -# Makefile to build libpng using GNU Make and GCC. -# - -include ../../GDALmake.opt - -ifeq ($(PNG_SETTING),internal) -XTRA_OPT = -DPNG_IMPEXP= -Ilibpng -OBJ = \ - png.o \ - pngerror.o \ - pngget.o \ - pngmem.o \ - pngpread.o \ - pngread.o \ - pngrio.o \ - pngrtran.o \ - pngrutil.o \ - pngset.o \ - pngtrans.o \ - pngwio.o \ - pngwrite.o \ - pngwtran.o \ - pngwutil.o \ - pngdataset.o - -else -OBJ = pngdataset.o -endif - -ifeq ($(LIBZ_SETTING),internal) -XTRA_OPT := $(XTRA_OPT) -I../zlib -endif - -CPPFLAGS := $(XTRA_OPT) $(CPPFLAGS) -# Enable this to compile with -Wextra -Werror and get around the jump complaint. -# CPPFLAGS += -Wno-clobbered - -ifeq ($(RENAME_INTERNAL_PNG_SYMBOLS),yes) -CPPFLAGS := $(CPPFLAGS) -DRENAME_INTERNAL_PNG_SYMBOLS -endif - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o libpng/*.o $(O_OBJ) - -# Disable Neon optimizations for internal libpng as we don't include the needed source file -../o/%.$(OBJ_EXT): libpng/%.c - $(CC) -c $(CPPFLAGS) $(CFLAGS_NOFTRAPV) -DPNG_ARM_NEON_IMPLEMENTATION=0 -DPNG_ARM_NEON_OPT=0 $< -o $@ - -all: $(OBJ:.o=.$(OBJ_EXT)) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/png/libpng/makefile.vc b/frmts/png/libpng/makefile.vc deleted file mode 100644 index 0bf41c474b8b..000000000000 --- a/frmts/png/libpng/makefile.vc +++ /dev/null @@ -1,42 +0,0 @@ -# $Id$ -# -# Makefile to build libpng using NMAKE and Visual C++ compiler. -# -OBJ = \ - png.obj \ - pngerror.obj \ - pngget.obj \ - pngmem.obj \ - pngpread.obj \ - pngread.obj \ - pngrio.obj \ - pngrtran.obj \ - pngrutil.obj \ - pngset.obj \ - pngtrans.obj \ - pngwio.obj \ - pngwrite.obj \ - pngwtran.obj \ - pngwutil.obj - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -!IFDEF ZLIB_EXTERNAL_LIB -ZLIB_FLAGS = $(ZLIB_INC) -!ELSE -ZLIB_FLAGS = -I..\..\zlib -!ENDIF - -EXTRAFLAGS = $(ZLIB_FLAGS) /wd4267 /wd4310 - -default: $(OBJ) - xcopy /D /Y *.obj ..\..\o - -libpng.lib: $(OBJ) - LIB /OUT:libpng.lib $(OBJ) - -clean: - -del *.obj - diff --git a/frmts/png/makefile.vc b/frmts/png/makefile.vc deleted file mode 100644 index 390c246ba342..000000000000 --- a/frmts/png/makefile.vc +++ /dev/null @@ -1,33 +0,0 @@ -GDAL_ROOT = ..\.. -!INCLUDE $(GDAL_ROOT)\nmake.opt - -OBJ = \ - pngdataset.obj - -!IFDEF ZLIB_EXTERNAL_LIB -ZLIB_FLAGS = $(ZLIB_INC) -!ELSE -ZLIB_FLAGS = -I..\zlib -!ENDIF - -#EXTRAFLAGS = $(ZLIB_FLAGS) -Ilibpng -!IFDEF PNG_EXTERNAL_LIB -EXTRAFLAGS = $(ZLIB_FLAGS) -I$(PNGDIR) -!ELSE -EXTRAFLAGS = $(ZLIB_FLAGS) -Ilibpng -!ENDIF - -default: $(OBJ) - xcopy /D /Y *.obj ..\o -!IFNDEF PNG_EXTERNAL_LIB - cd libpng - $(MAKE) /f makefile.vc - cd .. -!ENDIF - -clean: - -del *.obj - cd libpng - $(MAKE) /f makefile.vc clean - cd .. - diff --git a/frmts/postgisraster/GNUmakefile b/frmts/postgisraster/GNUmakefile deleted file mode 100644 index 53aa3c658084..000000000000 --- a/frmts/postgisraster/GNUmakefile +++ /dev/null @@ -1,25 +0,0 @@ -# USER CONFIGURATION -# END OF USER CONFIGURATION - -include ../../GDALmake.opt - -OBJ = postgisrasterdriver.o postgisrasterdataset.o postgisrasterrasterband.o postgisrastertiledataset.o postgisrastertilerasterband.o postgisrastertools.o - - -CPPFLAGS := -iquote ../mem -iquote ../vrt $(XTRA_OPT) $(PG_INC) $(CPPFLAGS) - -CXXFLAGS := $(WARN_EFFCPLUSPLUS) $(WARN_OLD_STYLE_CAST) $(CXXFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -$(O_OBJ): postgisraster.h ../vrt/vrtdataset.h ../mem/memdataset.h - -clean: - rm -f *.o $(O_OBJ) - -../o/%.$(OBJ_EXT): - $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@ - -all: $(OBJ:.o=.$(OBJ_EXT)) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/postgisraster/makefile.vc b/frmts/postgisraster/makefile.vc deleted file mode 100644 index 151b629da033..000000000000 --- a/frmts/postgisraster/makefile.vc +++ /dev/null @@ -1,15 +0,0 @@ - -OBJ = postgisrasterdataset.obj postgisrasterrasterband.obj postgisrasterdriver.obj postgisrastertiledataset.obj postgisrastertilerasterband.obj postgisrastertools.obj - -EXTRAFLAGS = -I ../mem -I ../vrt -I$(PG_INC_DIR) - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/prf/GNUmakefile b/frmts/prf/GNUmakefile deleted file mode 100644 index f7f74adaeebb..000000000000 --- a/frmts/prf/GNUmakefile +++ /dev/null @@ -1,10 +0,0 @@ -include ../../GDALmake.opt - -OBJ := phprfdataset.o - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/prf/makefile.vc b/frmts/prf/makefile.vc deleted file mode 100644 index 6bf1b6a15ddb..000000000000 --- a/frmts/prf/makefile.vc +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = phprfdataset.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/r/GNUmakefile b/frmts/r/GNUmakefile deleted file mode 100644 index 01efd2041575..000000000000 --- a/frmts/r/GNUmakefile +++ /dev/null @@ -1,13 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = rdataset.o rcreatecopy.o - - - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/r/makefile.vc b/frmts/r/makefile.vc deleted file mode 100644 index f1cc3d25af3a..000000000000 --- a/frmts/r/makefile.vc +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = rdataset.obj rcreatecopy.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/rasdaman/GNUmakefile b/frmts/rasdaman/GNUmakefile deleted file mode 100644 index f936c2c3ba8e..000000000000 --- a/frmts/rasdaman/GNUmakefile +++ /dev/null @@ -1,13 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = rasdamandataset.o - -CPPFLAGS := $(CPPFLAGS) $(RASDAMAN_INC) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/rasdaman/makefile.vc b/frmts/rasdaman/makefile.vc deleted file mode 100644 index f5d7831b6108..000000000000 --- a/frmts/rasdaman/makefile.vc +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = rasdamandataset.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/rasterlite/GNUmakefile b/frmts/rasterlite/GNUmakefile deleted file mode 100644 index 797c4248038f..000000000000 --- a/frmts/rasterlite/GNUmakefile +++ /dev/null @@ -1,13 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = rasterlitedataset.o rasterlitecreatecopy.o rasterliteoverviews.o - -CPPFLAGS := $(CPPFLAGS) -iquote ../../ogr -iquote ../mem - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/rasterlite/makefile.vc b/frmts/rasterlite/makefile.vc deleted file mode 100644 index 2b19763541a7..000000000000 --- a/frmts/rasterlite/makefile.vc +++ /dev/null @@ -1,15 +0,0 @@ - -OBJ = rasterlitedataset.obj rasterlitecreatecopy.obj rasterliteoverviews.obj - -EXTRAFLAGS = -I../../ogr -I../mem - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/raw/GNUmakefile b/frmts/raw/GNUmakefile deleted file mode 100644 index 4fbecb8a4b48..000000000000 --- a/frmts/raw/GNUmakefile +++ /dev/null @@ -1,24 +0,0 @@ -include ../../GDALmake.opt - -OBJ = ehdrdataset.o pauxdataset.o doq1dataset.o \ - doq2dataset.o mffdataset.o hkvdataset.o pnmdataset.o \ - envidataset.o gscdataset.o fastdataset.o \ - atlsci_spheroid.o btdataset.o landataset.o cpgdataset.o \ - ndfdataset.o dipxdataset.o genbindataset.o \ - lcpdataset.o eirdataset.o gtxdataset.o loslasdataset.o \ - ntv2dataset.o ace2dataset.o snodasdataset.o ctable2dataset.o \ - krodataset.o roipacdataset.o iscedataset.o rrasterdataset.o \ - byndataset.o - -CXXFLAGS := $(WARN_EFFCPLUSPLUS) $(CXXFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) - -$(OBJ) $(O_OBJ): ../../gcore/rawdataset.h - -install: diff --git a/frmts/raw/makefile.vc b/frmts/raw/makefile.vc deleted file mode 100644 index c6e49d31935e..000000000000 --- a/frmts/raw/makefile.vc +++ /dev/null @@ -1,22 +0,0 @@ - -OBJ = ehdrdataset.obj pauxdataset.obj doq1dataset.obj\ - hkvdataset.obj mffdataset.obj pnmdataset.obj \ - doq2dataset.obj envidataset.obj \ - gscdataset.obj fastdataset.obj atlsci_spheroid.obj \ - btdataset.obj landataset.obj cpgdataset.obj \ - ndfdataset.obj dipxdataset.obj genbindataset.obj \ - lcpdataset.obj eirdataset.obj gtxdataset.obj loslasdataset.obj \ - ntv2dataset.obj ace2dataset.obj snodasdataset.obj \ - ctable2dataset.obj krodataset.obj roipacdataset.obj iscedataset.obj \ - rrasterdataset.obj byndataset.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/rdb/GNUmakefile b/frmts/rdb/GNUmakefile deleted file mode 100644 index e09788973aed..000000000000 --- a/frmts/rdb/GNUmakefile +++ /dev/null @@ -1,13 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = rdbdataset.o - -CPPFLAGS := -iquote ../../ogr/ogrsf_frmts/geojson $(JSON_INCLUDE) $(CPPFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/rdb/makefile.vc b/frmts/rdb/makefile.vc deleted file mode 100644 index 11d288c6e87b..000000000000 --- a/frmts/rdb/makefile.vc +++ /dev/null @@ -1,15 +0,0 @@ - -OBJ = ./rdbdataset.obj - -EXTRAFLAGS = -I..\..\ogr\ogrsf_frmts\geojson -I../../ogr/ogrsf_frmts/geojson/libjson $(RDB_CFLAGS) - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/rik/GNUmakefile b/frmts/rik/GNUmakefile deleted file mode 100644 index b7de07ff40aa..000000000000 --- a/frmts/rik/GNUmakefile +++ /dev/null @@ -1,19 +0,0 @@ - -include ../../GDALmake.opt - -ifeq ($(LIBZ_SETTING),internal) -XTRA_OPT = -I../zlib -else -XTRA_OPT = -endif - -OBJ = rikdataset.o - -CPPFLAGS := $(XTRA_OPT) $(CPPFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/rik/makefile.vc b/frmts/rik/makefile.vc deleted file mode 100644 index f290707f43f5..000000000000 --- a/frmts/rik/makefile.vc +++ /dev/null @@ -1,19 +0,0 @@ - -OBJ = rikdataset.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -!IFDEF ZLIB_EXTERNAL_LIB -EXTRAFLAGS = $(ZLIB_INC) -!ELSE -EXTRAFLAGS = -I..\zlib -!ENDIF - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/rmf/GNUmakefile b/frmts/rmf/GNUmakefile deleted file mode 100644 index 5150f9ab9f82..000000000000 --- a/frmts/rmf/GNUmakefile +++ /dev/null @@ -1,15 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = rmfdataset.o rmflzw.o rmfdem.o rmfjpeg.o - -ifneq ($(JPEG_SETTING),no) -CPPFLAGS := $(CPPFLAGS) -DHAVE_LIBJPEG -endif - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/rmf/makefile.vc b/frmts/rmf/makefile.vc deleted file mode 100644 index c1aa08ffe925..000000000000 --- a/frmts/rmf/makefile.vc +++ /dev/null @@ -1,17 +0,0 @@ - -OBJ = rmfdataset.obj rmfdem.obj rmfjpeg.obj rmflzw.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -!IFDEF JPEG_SUPPORTED -EXTRAFLAGS = -DHAVE_LIBJPEG -!ENDIF - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/rs2/GNUmakefile b/frmts/rs2/GNUmakefile deleted file mode 100644 index 1c42e7000d3b..000000000000 --- a/frmts/rs2/GNUmakefile +++ /dev/null @@ -1,13 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = rs2dataset.o - - - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/rs2/makefile.vc b/frmts/rs2/makefile.vc deleted file mode 100644 index ce12ca693d59..000000000000 --- a/frmts/rs2/makefile.vc +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = rs2dataset.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/safe/GNUmakefile b/frmts/safe/GNUmakefile deleted file mode 100644 index 32f948e80085..000000000000 --- a/frmts/safe/GNUmakefile +++ /dev/null @@ -1,13 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = safedataset.o - - - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/safe/makefile.vc b/frmts/safe/makefile.vc deleted file mode 100644 index c65015c0b7eb..000000000000 --- a/frmts/safe/makefile.vc +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = safedataset.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/saga/GNUmakefile b/frmts/saga/GNUmakefile deleted file mode 100644 index 985aa34508a1..000000000000 --- a/frmts/saga/GNUmakefile +++ /dev/null @@ -1,11 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = sagadataset.o - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/saga/makefile.vc b/frmts/saga/makefile.vc deleted file mode 100644 index 57fa2d2d8dac..000000000000 --- a/frmts/saga/makefile.vc +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = sagadataset.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/sdts/GNUmakefile b/frmts/sdts/GNUmakefile deleted file mode 100644 index c067c062942e..000000000000 --- a/frmts/sdts/GNUmakefile +++ /dev/null @@ -1,71 +0,0 @@ -VERSION = 1_3 -DISTDIR = sdts_$(VERSION) -WEB_DIR = /u/www/projects/sdts - -SHPDIR = ../shapelib -ISO8211DIR = ../iso8211 - -include ../../GDALmake.opt - -OBJ = sdtsiref.o sdtscatd.o sdtslinereader.o sdtslib.o \ - sdtspointreader.o sdtsattrreader.o sdtstransfer.o \ - sdtspolygonreader.o sdtsxref.o sdtsrasterreader.o \ - sdtsindexedreader.o - -CPPFLAGS := -iquote $(ISO8211DIR) $(CPPFLAGS) - -SDTSLIB = libsdts_al.a -LIBS := $(SDTSLIB) $(ISO8211DIR)/libiso8211.a $(GDAL_LIB) $(LIBS) - -default: $(SDTSLIB) sdtsdataset.$(OBJ_EXT) - -$(O_OBJ): sdts_al.h - -all: $(SDTSLIB) sdts2shp - -clean: clean-dist - rm -rf *.o sdts2shp html man $(SDTSLIB) - -clean-dist: - rm -rf $(DISTDIR) $(DISTDIR).zip $(DISTDIR).tar.gz - -$(SDTSLIB): $(OBJ:.o=.$(OBJ_EXT)) - ar r $(SDTSLIB) $? - -sdts2shp: sdts2shp.cpp $(SDTSLIB) - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -iquote $(SHPDIR) sdts2shp.cpp \ - $(SHPDIR)/shpopen.$(OBJ_EXT) $(SHPDIR)/dbfopen.$(OBJ_EXT) \ - $(LIBS) -o sdts2shp - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) ../o/sdtsdataset.$(OBJ_EXT) - -docs: - rm -rf html - mkdir html - doxygen - rm html/index.html - cp html/sdts_al_main.html html/index.html - -dist: docs - rm -rf $(DISTDIR) - mkdir $(DISTDIR) - mkdir $(DISTDIR)/html - cp html/* $(DISTDIR)/html - autoconf - cp *.cpp *.h configure Makefile.in $(DISTDIR) - cp makefile.vc.dist $(DISTDIR)/Makefile.vc - rm $(DISTDIR)/sdtsdataset.cpp - cp $(ISO8211DIR)/{*.cpp,*.h} $(DISTDIR) - rm configure - cp ../../port/{cpl_error*,cpl_port*,cpl_string*} $(DISTDIR) - cp ../../port/{cpl_vsisimple.cpp,cpl_config.h.in} $(DISTDIR) - cp ../../port/{cpl_vsi.h,cpl_conv.*,cpl_path.cpp} $(DISTDIR) - cp ../../port/cpl_config.h.in $(DISTDIR)/cpl_config.h - cp $(SHPDIR)/{shpopen.c,dbfopen.c,shapefil.h} $(DISTDIR) - rm $(DISTDIR)/*.o - tar czf $(DISTDIR).tar.gz $(DISTDIR) - zip -r $(DISTDIR).zip $(DISTDIR) - -update-web: dist docs - cp html/* $(WEB_DIR) - cp $(DISTDIR).tar.gz $(DISTDIR).zip /u/ftp/pub/outgoing diff --git a/frmts/sdts/makefile.vc b/frmts/sdts/makefile.vc deleted file mode 100644 index 2d5695ad53cc..000000000000 --- a/frmts/sdts/makefile.vc +++ /dev/null @@ -1,34 +0,0 @@ - -BOBJ = sdtsiref.obj sdtscatd.obj sdtslinereader.obj sdtslib.obj \ - sdtspointreader.obj sdtsattrreader.obj sdtstransfer.obj \ - sdtspolygonreader.obj sdtsxref.obj sdtsrasterreader.obj \ - sdtsindexedreader.obj -OBJ = sdtsdataset.obj $(BOBJ) - -EXTRAFLAGS = -I..\iso8211 - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -base: $(BOBJ) - -clean: - -del *.obj - -del *.exe - -del *.lib - -sdts2shp.exe: sdts2shp.cpp $(BOBJ) - $(CC) $(CFLAGS) /I..\shapelib sdts2shp.cpp $(BOBJ) \ - ..\iso8211\ddfmodule.cpp \ - ..\iso8211\ddfutils.cpp \ - ..\iso8211\ddffielddefn.cpp \ - ..\iso8211\ddfrecord.cpp \ - ..\iso8211\ddffield.cpp \ - ..\iso8211\ddfsubfielddefn.cpp \ - ..\shapelib\shpopen.c ..\shapelib\dbfopen.c \ - $(GDAL_ROOT)\port\cpl.lib $(LIBS) - diff --git a/frmts/sentinel2/GNUmakefile b/frmts/sentinel2/GNUmakefile deleted file mode 100644 index c5bf2e41389a..000000000000 --- a/frmts/sentinel2/GNUmakefile +++ /dev/null @@ -1,11 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = sentinel2dataset.o - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/sentinel2/makefile.vc b/frmts/sentinel2/makefile.vc deleted file mode 100644 index 3daceba1e105..000000000000 --- a/frmts/sentinel2/makefile.vc +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = sentinel2dataset.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/sgi/GNUmakefile b/frmts/sgi/GNUmakefile deleted file mode 100644 index e45417744ded..000000000000 --- a/frmts/sgi/GNUmakefile +++ /dev/null @@ -1,18 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = sgidataset.o - -CPPFLAGS := $(XTRA_OPT) $(CPPFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -../o/%.$(OBJ_EXT): - $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@ - -all: $(OBJ:.o=.$(OBJ_EXT)) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/sgi/makefile.vc b/frmts/sgi/makefile.vc deleted file mode 100644 index fca56bb5e4cb..000000000000 --- a/frmts/sgi/makefile.vc +++ /dev/null @@ -1,14 +0,0 @@ -GDAL_ROOT = ..\.. -!INCLUDE $(GDAL_ROOT)\nmake.opt - - -OBJ = sgidataset.obj - -EXTRAFLAGS = -I./ - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/sigdem/GNUmakefile b/frmts/sigdem/GNUmakefile deleted file mode 100644 index 25ea13d713a3..000000000000 --- a/frmts/sigdem/GNUmakefile +++ /dev/null @@ -1,17 +0,0 @@ -include ../../GDALmake.opt - -OBJ = sigdemdataset.o - -CXXFLAGS := $(WARN_EFFCPLUSPLUS) $(CXXFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) - -$(OBJ) $(O_OBJ): sigdemdataset.h - -install: - $(INSTALL_DATA) sigdemdataset.h $(DESTDIR)$(INST_INCLUDE) diff --git a/frmts/sigdem/makefile.vc b/frmts/sigdem/makefile.vc deleted file mode 100644 index 4d3c800ffe46..000000000000 --- a/frmts/sigdem/makefile.vc +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = sigdemdataset.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/srtmhgt/GNUmakefile b/frmts/srtmhgt/GNUmakefile deleted file mode 100644 index 663095b581b1..000000000000 --- a/frmts/srtmhgt/GNUmakefile +++ /dev/null @@ -1,18 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = srtmhgtdataset.o - -CPPFLAGS := $(XTRA_OPT) $(CPPFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -../o/%.$(OBJ_EXT): - $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@ - -all: $(OBJ:.o=.$(OBJ_EXT)) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/srtmhgt/makefile.vc b/frmts/srtmhgt/makefile.vc deleted file mode 100644 index eac1b44d2976..000000000000 --- a/frmts/srtmhgt/makefile.vc +++ /dev/null @@ -1,14 +0,0 @@ -GDAL_ROOT = ..\.. -!INCLUDE $(GDAL_ROOT)\nmake.opt - - -OBJ = srtmhgtdataset.obj - -EXTRAFLAGS = -I./ - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/stacit/GNUmakefile b/frmts/stacit/GNUmakefile deleted file mode 100644 index a5ede0c23df5..000000000000 --- a/frmts/stacit/GNUmakefile +++ /dev/null @@ -1,14 +0,0 @@ -include ../../GDALmake.opt - -OBJ = stacitdataset.o - -CXXFLAGS := $(WARN_EFFCPLUSPLUS) $(CXXFLAGS) -iquote ../vrt - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) - -install: diff --git a/frmts/stacit/makefile.vc b/frmts/stacit/makefile.vc deleted file mode 100644 index 5714be0c56c7..000000000000 --- a/frmts/stacit/makefile.vc +++ /dev/null @@ -1,15 +0,0 @@ - -OBJ = stacitdataset.obj - -GDAL_ROOT = ..\.. - -EXTRAFLAGS = -I..\vrt - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/stacta/GNUmakefile b/frmts/stacta/GNUmakefile deleted file mode 100644 index d0aeffe12f05..000000000000 --- a/frmts/stacta/GNUmakefile +++ /dev/null @@ -1,14 +0,0 @@ -include ../../GDALmake.opt - -OBJ = stactadataset.o - -CXXFLAGS := $(WARN_EFFCPLUSPLUS) $(CXXFLAGS) -iquote ../mem - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) - -install: diff --git a/frmts/stacta/makefile.vc b/frmts/stacta/makefile.vc deleted file mode 100644 index 556c0d347c3c..000000000000 --- a/frmts/stacta/makefile.vc +++ /dev/null @@ -1,15 +0,0 @@ - -OBJ = stactadataset.obj - -GDAL_ROOT = ..\.. - -EXTRAFLAGS = -I..\mem - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/terragen/GNUmakefile b/frmts/terragen/GNUmakefile deleted file mode 100644 index 113c183b0dd0..000000000000 --- a/frmts/terragen/GNUmakefile +++ /dev/null @@ -1,13 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = terragendataset.o - - - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/terragen/makefile.vc b/frmts/terragen/makefile.vc deleted file mode 100644 index 4b6de67bb0b5..000000000000 --- a/frmts/terragen/makefile.vc +++ /dev/null @@ -1,11 +0,0 @@ -OBJ = terragendataset.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj diff --git a/frmts/tga/GNUmakefile b/frmts/tga/GNUmakefile deleted file mode 100644 index cf72b708e553..000000000000 --- a/frmts/tga/GNUmakefile +++ /dev/null @@ -1,14 +0,0 @@ - - -include ../../GDALmake.opt - -OBJ = tgadataset.o - -CPPFLAGS := $(CPPFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/tga/makefile.vc b/frmts/tga/makefile.vc deleted file mode 100644 index 9349544bf75f..000000000000 --- a/frmts/tga/makefile.vc +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = tgadataset.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/til/GNUmakefile b/frmts/til/GNUmakefile deleted file mode 100644 index db521d1a636c..000000000000 --- a/frmts/til/GNUmakefile +++ /dev/null @@ -1,15 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = tildataset.o - -CPPFLAGS := -iquote ../vrt $(CPPFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -$(OBJ) $(O_OBJ): ../vrt/vrtdataset.h - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/til/makefile.vc b/frmts/til/makefile.vc deleted file mode 100644 index 0bfe2d86c8f0..000000000000 --- a/frmts/til/makefile.vc +++ /dev/null @@ -1,15 +0,0 @@ - -OBJ = tildataset.obj - -GDAL_ROOT = ..\.. - -EXTRAFLAGS = -I..\vrt - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/tiledb/GNUmakefile b/frmts/tiledb/GNUmakefile deleted file mode 100644 index 1e2378a8c6df..000000000000 --- a/frmts/tiledb/GNUmakefile +++ /dev/null @@ -1,18 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = tiledbdataset.o - -CPPFLAGS := $(CPPFLAGS) $(TILEDB_CFLAGS) - -ifeq ($(findstring c++17,$(TILEDB_CFLAGS)),c++17) -CXX := $(subst -std=c++11,,${CXX}) -CXX := $(subst -std=c++14,,${CXX}) -endif - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/tiledb/makefile.vc b/frmts/tiledb/makefile.vc deleted file mode 100644 index a46fc1e36e64..000000000000 --- a/frmts/tiledb/makefile.vc +++ /dev/null @@ -1,15 +0,0 @@ - -OBJ = tiledbdataset.obj - -EXTRAFLAGS = $(TILEDB_CFLAGS) - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/tsx/GNUmakefile b/frmts/tsx/GNUmakefile deleted file mode 100644 index a53ce4f6775f..000000000000 --- a/frmts/tsx/GNUmakefile +++ /dev/null @@ -1,10 +0,0 @@ -include ../../GDALmake.opt - -OBJ = tsxdataset.o - - -default: $(OBJ:.o=.$(OBJ_EXT)) -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/tsx/makefile.vc b/frmts/tsx/makefile.vc deleted file mode 100644 index 741106d6aa61..000000000000 --- a/frmts/tsx/makefile.vc +++ /dev/null @@ -1,12 +0,0 @@ -OBJ = tsxdataset.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/usgsdem/GNUmakefile b/frmts/usgsdem/GNUmakefile deleted file mode 100644 index 0afe9d76571f..000000000000 --- a/frmts/usgsdem/GNUmakefile +++ /dev/null @@ -1,13 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = usgsdemdataset.o usgsdem_create.o - -CPPFLAGS := -iquote ../../alg -iquote ../mem $(CPPFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/usgsdem/makefile.vc b/frmts/usgsdem/makefile.vc deleted file mode 100644 index 395b27874ae6..000000000000 --- a/frmts/usgsdem/makefile.vc +++ /dev/null @@ -1,15 +0,0 @@ - -OBJ = usgsdemdataset.obj usgsdem_create.obj - -EXTRAFLAGS = -I..\..\alg -I..\mem - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/vrt/GNUmakefile b/frmts/vrt/GNUmakefile deleted file mode 100644 index 02120262c33f..000000000000 --- a/frmts/vrt/GNUmakefile +++ /dev/null @@ -1,28 +0,0 @@ -include ../../GDALmake.opt - -OBJ := vrtdataset.o vrtrasterband.o vrtdriver.o vrtsources.o -OBJ += vrtfilters.o vrtsourcedrasterband.o vrtrawrasterband.o -OBJ += vrtwarped.o vrtderivedrasterband.o vrtpansharpened.o -OBJ += pixelfunctions.o vrtmultidim.o - -CPPFLAGS := $(CPPFLAGS) -CXXFLAGS := $(WARN_EFFCPLUSPLUS) $(WARN_OLD_STYLE_CAST) $(CXXFLAGS) - -ifeq ($(HAVE_GEOS),yes) -CPPFLAGS := -DHAVE_GEOS=1 $(CPPFLAGS) -endif - - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) - -$(OBJ) $(O_OBJ): vrtdataset.h ../../alg/gdalwarper.h -$(OBJ) $(O_OBJ): ../../gcore/gdal_proxy.h - -install: - $(INSTALL_DATA) vrtdataset.h $(DESTDIR)$(INST_INCLUDE) - $(INSTALL_DATA) gdal_vrt.h $(DESTDIR)$(INST_INCLUDE) diff --git a/frmts/vrt/makefile.vc b/frmts/vrt/makefile.vc deleted file mode 100644 index 42c2067c774e..000000000000 --- a/frmts/vrt/makefile.vc +++ /dev/null @@ -1,18 +0,0 @@ - -OBJ = vrtdataset.obj vrtrasterband.obj vrtdriver.obj \ - vrtsources.obj vrtfilters.obj vrtsourcedrasterband.obj \ - vrtrawrasterband.obj vrtderivedrasterband.obj vrtwarped.obj \ - vrtpansharpened.obj pixelfunctions.obj vrtmultidim.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -EXTRAFLAGS = $(GEOS_CFLAGS) - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/wcs/GNUmakefile b/frmts/wcs/GNUmakefile deleted file mode 100644 index a9822a98e491..000000000000 --- a/frmts/wcs/GNUmakefile +++ /dev/null @@ -1,13 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = wcsdataset.o httpdriver.o gmlcoverage.o wcsutils.o wcsdataset100.o wcsdataset110.o wcsdataset201.o wcsrasterband.o - -CPPFLAGS := -iquote ../../gcore -iquote ../../ogr -iquote ../../ogr/ogrsf_frmts/gml $(CPPFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(OBJ) $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/wcs/makefile.vc b/frmts/wcs/makefile.vc deleted file mode 100644 index d91e18830e1e..000000000000 --- a/frmts/wcs/makefile.vc +++ /dev/null @@ -1,16 +0,0 @@ - -OBJ = httpdriver.obj gmlcoverage.obj wcsutils.obj wcsdataset.obj wcsdataset100.obj wcsdataset110.obj wcsdataset201.obj wcsrasterband.obj - -EXTRAFLAGS = -DHAVE_CURL $(CURL_CFLAGS) $(CURL_INC) -I$(GDAL_ROOT)/gcore -I$(GDAL_ROOT)/ogr -I$(GDAL_ROOT)/ogr/ogrsf_frmts/gml - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - -del *.dll diff --git a/frmts/webp/GNUmakefile b/frmts/webp/GNUmakefile deleted file mode 100644 index 835a60aa91d7..000000000000 --- a/frmts/webp/GNUmakefile +++ /dev/null @@ -1,13 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = webpdataset.o - - - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/webp/makefile.vc b/frmts/webp/makefile.vc deleted file mode 100644 index 5e5220b05b11..000000000000 --- a/frmts/webp/makefile.vc +++ /dev/null @@ -1,15 +0,0 @@ - -OBJ = webpdataset.obj - -EXTRAFLAGS = $(WEBP_CFLAGS) - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/wms/GNUmakefile b/frmts/wms/GNUmakefile deleted file mode 100644 index b25216223652..000000000000 --- a/frmts/wms/GNUmakefile +++ /dev/null @@ -1,26 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = gdalwmscache.o gdalwmsdataset.o gdalwmsrasterband.o \ - gdalhttp.o minidriver.o \ - wmsutils.o wmsdriver.o minidriver_wms.o \ - minidriver_tileservice.o minidriver_worldwind.o \ - minidriver_tms.o minidriver_tiled_wms.o wmsmetadataset.o \ - minidriver_virtualearth.o minidriver_arcgis_server.o \ - minidriver_iip.o minidriver_mrf.o minidriver_ogcapimaps.o \ - minidriver_ogcapicoverage.o - -CPPFLAGS := $(CPPFLAGS) -DHAVE_CURL $(CURL_INC) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(OBJ) $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) - -$(OBJ) $(O_OBJ): gdalhttp.h minidriver_tileservice.h \ - minidriver_wms.h minidriver_worldwind.h minidriver_tms.h \ - minidriver_tiled_wms.h wmsdriver.h wmsmetadataset.h \ - minidriver_virtualearth.h minidriver_arcgis_server.h \ - minidriver_mrf.h diff --git a/frmts/wms/makefile.vc b/frmts/wms/makefile.vc deleted file mode 100644 index 039dc0321766..000000000000 --- a/frmts/wms/makefile.vc +++ /dev/null @@ -1,23 +0,0 @@ - -OBJ = \ - gdalwmscache.obj gdalwmsdataset.obj gdalwmsrasterband.obj wmsutils.obj \ - gdalhttp.obj minidriver.obj wmsdriver.obj \ - minidriver_wms.obj minidriver_tileservice.obj \ - minidriver_worldwind.obj minidriver_tms.obj minidriver_tiled_wms.obj \ - wmsmetadataset.obj minidriver_virtualearth.obj minidriver_arcgis_server.obj \ - minidriver_iip.obj minidriver_mrf.obj minidriver_ogcapimaps.obj \ - minidriver_ogcapicoverage.obj - -EXTRAFLAGS = -DHAVE_CURL $(CURL_CFLAGS) $(CURL_INC) - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - -del *.dll diff --git a/frmts/wmts/GNUmakefile b/frmts/wmts/GNUmakefile deleted file mode 100644 index 5230b316b0e9..000000000000 --- a/frmts/wmts/GNUmakefile +++ /dev/null @@ -1,11 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = wmtsdataset.o - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(OBJ) $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/wmts/makefile.vc b/frmts/wmts/makefile.vc deleted file mode 100644 index 7f74718ec7eb..000000000000 --- a/frmts/wmts/makefile.vc +++ /dev/null @@ -1,14 +0,0 @@ - -OBJ = wmtsdataset.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - -del *.dll diff --git a/frmts/xpm/GNUmakefile b/frmts/xpm/GNUmakefile deleted file mode 100644 index ffd4757f25f0..000000000000 --- a/frmts/xpm/GNUmakefile +++ /dev/null @@ -1,15 +0,0 @@ - -OBJ = xpmdataset.o - -include ../../GDALmake.opt - -XTRAOPTS = -iquote ../mem - -CPPFLAGS := $(XTRAOPTS) $(CPPFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/xpm/makefile.vc b/frmts/xpm/makefile.vc deleted file mode 100644 index 51d7f0240b47..000000000000 --- a/frmts/xpm/makefile.vc +++ /dev/null @@ -1,15 +0,0 @@ - -OBJ = xpmdataset.obj - -GDAL_ROOT = ..\.. - -EXTRAFLAGS = -I..\mem - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/xyz/GNUmakefile b/frmts/xyz/GNUmakefile deleted file mode 100644 index 7fb5fbe5f353..000000000000 --- a/frmts/xyz/GNUmakefile +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = xyzdataset.o - -include ../../GDALmake.opt - - - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/xyz/makefile.vc b/frmts/xyz/makefile.vc deleted file mode 100644 index f8996920d164..000000000000 --- a/frmts/xyz/makefile.vc +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = xyzdataset.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/zarr/GNUmakefile b/frmts/zarr/GNUmakefile deleted file mode 100644 index 8df05f0a4470..000000000000 --- a/frmts/zarr/GNUmakefile +++ /dev/null @@ -1,22 +0,0 @@ - -OBJ = zarrdriver.o zarr_array.o zarr_attribute.o zarr_group.o - -include ../../GDALmake.opt - -XTRA_OPT= -ifeq ($(HAVE_BLOSC),yes) -XTRA_OPT := $(XTRA_OPT) -DHAVE_BLOSC -endif - -CPPFLAGS := -iquote ../mem -iquote ../netcdf $(CPPFLAGS) $(XTRA_OPT) - -CXXFLAGS := $(WARN_EFFCPLUSPLUS) $(WARN_OLD_STYLE_CAST) $(CXXFLAGS) - -$(O_OBJ): zarr.h - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/zarr/makefile.vc b/frmts/zarr/makefile.vc deleted file mode 100644 index ef8581e6a6d7..000000000000 --- a/frmts/zarr/makefile.vc +++ /dev/null @@ -1,19 +0,0 @@ - -OBJ = zarrdriver.obj zarr_array.obj zarr_attribute.obj zarr_group.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -EXTRAFLAGS= -I..\mem -I..\netcdf - -!IFDEF BLOSC_CFLAGS -EXTRAFLAGS = $(EXTRAFLAGS) $(BLOSC_CFLAGS) -DHAVE_BLOSC -!ENDIF - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/zlib/GNUmakefile b/frmts/zlib/GNUmakefile deleted file mode 100644 index ca79ec2c932c..000000000000 --- a/frmts/zlib/GNUmakefile +++ /dev/null @@ -1,27 +0,0 @@ -# $Id$ -# -# Makefile to build zlib using GNU Make and GCC. -# -include ../../GDALmake.opt - -OBJ = \ - adler32.o \ - compress.o \ - crc32.o \ - deflate.o \ - infback.o \ - inffast.o \ - inflate.o \ - inftrees.o \ - trees.o \ - uncompr.o \ - zutil.o - -CPPFLAGS := $(CPPFLAGS) -DDONT_DEPRECATE_SPRINTF - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/zlib/makefile.vc b/frmts/zlib/makefile.vc deleted file mode 100644 index 7e1c084eca65..000000000000 --- a/frmts/zlib/makefile.vc +++ /dev/null @@ -1,29 +0,0 @@ -# $Id$ -# -# Makefile to build zlib using NMAKE and Visual C++ compiler. -# -OBJ = \ - adler32.obj \ - compress.obj \ - crc32.obj \ - deflate.obj \ - infback.obj \ - inffast.obj \ - inflate.obj \ - inftrees.obj \ - trees.obj \ - uncompr.obj \ - zutil.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -EXTRAFLAGS = $(SOFTWARNFLAGS) -Dverbose=-1 /wd4131 - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/frmts/zmap/GNUmakefile b/frmts/zmap/GNUmakefile deleted file mode 100644 index f94d95414e3b..000000000000 --- a/frmts/zmap/GNUmakefile +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = zmapdataset.o - -include ../../GDALmake.opt - - - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/frmts/zmap/makefile.vc b/frmts/zmap/makefile.vc deleted file mode 100644 index d26204a3a174..000000000000 --- a/frmts/zmap/makefile.vc +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = zmapdataset.obj - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj - diff --git a/fuzzers/GNUmakefile b/fuzzers/GNUmakefile deleted file mode 100644 index 33f17930dd17..000000000000 --- a/fuzzers/GNUmakefile +++ /dev/null @@ -1,88 +0,0 @@ - -include ../GDALmake.opt - -OBJ = gdal_fuzzer.o \ - ogr_fuzzer.o \ - wkb_import_fuzzer.o \ - wkt_import_fuzzer.o \ - osr_set_from_user_input_fuzzer.o \ - spatialite_geom_import_fuzzer.o \ - gml_geom_import_fuzzer.o \ - get_jpeg2000_structure_fuzzer.o \ - gdal_translate_fuzzer.o \ - gdal_vector_translate_fuzzer.o \ - gml_geom_import_fuzzer.o \ - fuzzingengine.o - -CXXFLAGS := $(CXXFLAGS) -iquote ../ogr/ogrsf_frmts/sqlite - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - $(RM) *.o $(O_OBJ) libFuzzingEngine.a - $(RM) gdal_fuzzer$(EXE) - $(RM) gdal_translate_fuzzer$(EXE) - $(RM) gdal_vector_translate_fuzzer$(EXE) - $(RM) aig_fuzzer$(EXE) - $(RM) gdal_vrt_fuzzer$(EXE) - $(RM) ogr_fuzzer$(EXE) - $(RM) ogr_sdts_fuzzer$(EXE) - $(RM) mitab_tab_fuzzer$(EXE) - $(RM) mitab_mif_fuzzer$(EXE) - $(RM) gtiff_mmap_fuzzer$(EXE) - $(RM) gml_geom_import_fuzzer$(EXE) - $(RM) spatialite_geom_import_fuzzer$(EXE) - $(RM) osr_set_from_user_input_fuzzer$(EXE) - $(RM) get_jpeg2000_structure_fuzzer$(EXE) - -gdal_fuzzer$(EXE): gdal_fuzzer.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LDFLAGS) $(LNK_FLAGS) $(CXXFLAGS) $(GDAL_INCLUDE) gdal_fuzzer.cpp fuzzingengine.cpp $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -gdal_translate_fuzzer$(EXE): gdal_translate_fuzzer.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LDFLAGS) $(LNK_FLAGS) $(CXXFLAGS) $(GDAL_INCLUDE) gdal_translate_fuzzer.cpp fuzzingengine.cpp $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -gdal_vector_translate_fuzzer$(EXE): gdal_vector_translate_fuzzer.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LDFLAGS) $(LNK_FLAGS) $(CXXFLAGS) $(GDAL_INCLUDE) gdal_vector_translate_fuzzer.cpp fuzzingengine.cpp $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -aig_fuzzer$(EXE): gdal_fuzzer.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LDFLAGS) $(LNK_FLAGS) $(CXXFLAGS) $(GDAL_INCLUDE) gdal_fuzzer.cpp fuzzingengine.cpp $(XTRAOBJ) $(CONFIG_LIBS) -o $@ -DREGISTER_FUNC=GDALRegister_AIGrid -DMEM_FILENAME="\"/vsimem/test.tar\"" -DGDAL_FILENAME="\"/vsitar//vsimem/test.tar/hdr.adf\"" - -gdal_vrt_fuzzer$(EXE): gdal_fuzzer.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LDFLAGS) $(LNK_FLAGS) $(CXXFLAGS) $(GDAL_INCLUDE) gdal_fuzzer.cpp fuzzingengine.cpp $(XTRAOBJ) $(CONFIG_LIBS) -o $@ -DMEM_FILENAME="\"/vsimem/test.tar\"" -DGDAL_FILENAME="\"/vsitar//vsimem/test.tar/test.vrt\"" - -ogr_fuzzer$(EXE): ogr_fuzzer.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LDFLAGS) $(LNK_FLAGS) $(CXXFLAGS) $(GDAL_INCLUDE) ogr_fuzzer.cpp fuzzingengine.cpp $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -ogr_sdts_fuzzer$(EXE): ogr_fuzzer.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LDFLAGS) $(LNK_FLAGS) $(CXXFLAGS) $(GDAL_INCLUDE) ogr_fuzzer.cpp fuzzingengine.cpp $(XTRAOBJ) $(CONFIG_LIBS) -o $@ -DREGISTER_FUNC=RegisterOGRSDTS -DMEM_FILENAME="\"/vsimem/test.tar\"" -DGDAL_FILENAME="\"/vsitar//vsimem/test.tar/TR01CATD.DDF\"" - -mitab_tab_fuzzer$(EXE): ogr_fuzzer.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LDFLAGS) $(LNK_FLAGS) $(CXXFLAGS) $(GDAL_INCLUDE) ogr_fuzzer.cpp fuzzingengine.cpp $(XTRAOBJ) $(CONFIG_LIBS) -o $@ -DREGISTER_FUNC=OGRRegisterAll -DMEM_FILENAME="\"/vsimem/test.tar\"" -DGDAL_FILENAME="\"/vsitar//vsimem/test.tar/my.tab\"" - -mitab_mif_fuzzer$(EXE): ogr_fuzzer.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LDFLAGS) $(LNK_FLAGS) $(CXXFLAGS) $(GDAL_INCLUDE) ogr_fuzzer.cpp fuzzingengine.cpp $(XTRAOBJ) $(CONFIG_LIBS) -o $@ -DREGISTER_FUNC=OGRRegisterAll -DMEM_FILENAME="\"/vsimem/test.tar\"" -DGDAL_FILENAME="\"/vsitar//vsimem/test.tar/my.mif\"" - -gtiff_mmap_fuzzer$(EXE): gdal_fuzzer.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LDFLAGS) $(LNK_FLAGS) $(CXXFLAGS) $(GDAL_INCLUDE) gdal_fuzzer.cpp fuzzingengine.cpp $(XTRAOBJ) $(CONFIG_LIBS) -o $@ -DREGISTER_FUNC=GDALRegister_GTiff -DGTIFF_USE_MMAP - -gml_geom_import_fuzzer$(EXE): gml_geom_import_fuzzer.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LDFLAGS) $(LNK_FLAGS) $(CXXFLAGS) $(GDAL_INCLUDE) gml_geom_import_fuzzer.cpp fuzzingengine.cpp $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -spatialite_geom_import_fuzzer$(EXE): spatialite_geom_import_fuzzer.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LDFLAGS) $(LNK_FLAGS) $(CXXFLAGS) $(GDAL_INCLUDE) spatialite_geom_import_fuzzer.cpp fuzzingengine.cpp $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -osr_set_from_user_input_fuzzer$(EXE): osr_set_from_user_input_fuzzer.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LDFLAGS) $(LNK_FLAGS) $(CXXFLAGS) $(GDAL_INCLUDE) osr_set_from_user_input_fuzzer.cpp fuzzingengine.cpp $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -get_jpeg2000_structure_fuzzer$(EXE): get_jpeg2000_structure_fuzzer.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LDFLAGS) $(LNK_FLAGS) $(CXXFLAGS) $(GDAL_INCLUDE) get_jpeg2000_structure_fuzzer.cpp fuzzingengine.cpp $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -dummyfuzzers_dynamic: fuzzingengine.o - $(AR) r libFuzzingEngine.a fuzzingengine.o - CXX="${CXX}" CXXFLAGS="${CXXFLAGS} -L." EXTRA_LIBS="${LIBS}" LIBGDAL="-L.. -L../.libs -lgdal" SRC=/tmp OUT=/tmp ./build_google_oss_fuzzers.sh - OUT=/tmp ./build_seed_corpus.sh - -dummyfuzzers: fuzzingengine.o - $(AR) r libFuzzingEngine.a fuzzingengine.o - CXX="${CXX}" CXXFLAGS="${CXXFLAGS} -L." EXTRA_LIBS="${LIBS}" SRC=/tmp OUT=/tmp ./build_google_oss_fuzzers.sh - OUT=/tmp ./build_seed_corpus.sh diff --git a/fuzzers/tests/GNUmakefile b/fuzzers/tests/GNUmakefile deleted file mode 100644 index 84e35080d0fd..000000000000 --- a/fuzzers/tests/GNUmakefile +++ /dev/null @@ -1,34 +0,0 @@ - -include ../../GDALmake.opt - -EXE_LIST = test_gdal_fuzzer$(EXE) test_ogr_fuzzer$(EXE) \ - test_osr_set_from_user_input_fuzzer$(EXE) \ - test_wkb_import_fuzzer$(EXE) \ - test_wkt_import_fuzzer$(EXE) - -default: $(OBJ:.o=.$(OBJ_EXT)) $(EXE_LIST) - -clean: - $(RM) *.o $(O_OBJ) $(EXE_LIST) - -test_gdal_fuzzer$(EXE): test_gdal_fuzzer.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LDFLAGS) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -test_ogr_fuzzer$(EXE): test_ogr_fuzzer.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LDFLAGS) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -test_osr_set_from_user_input_fuzzer$(EXE): test_osr_set_from_user_input_fuzzer.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LDFLAGS) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -test_wkb_import_fuzzer$(EXE): test_wkb_import_fuzzer.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LDFLAGS) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -test_wkt_import_fuzzer$(EXE): test_wkt_import_fuzzer.$(OBJ_EXT) $(DEP_LIBS) - $(LD) $(LDFLAGS) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ - -check: $(EXE_LIST) - ./test_gdal_fuzzer$(EXE) - ./test_ogr_fuzzer$(EXE) - ./test_osr_set_from_user_input_fuzzer$(EXE) - ./test_wkb_import_fuzzer$(EXE) - ./test_wkt_import_fuzzer$(EXE) diff --git a/gcore/GNUmakefile b/gcore/GNUmakefile deleted file mode 100644 index 720a5e6d033a..000000000000 --- a/gcore/GNUmakefile +++ /dev/null @@ -1,88 +0,0 @@ - -include ../GDALmake.opt - -OBJ = gdalmultidim.o gdalopeninfo.o gdaldrivermanager.o gdaldriver.o gdaldataset.o \ - gdalrasterband.o gdal_misc.o rasterio.o gdalrasterblock.o \ - gdalcolortable.o gdalmajorobject.o overview.o \ - gdaldefaultoverviews.o gdalpamdataset.o gdalpamrasterband.o \ - gdaljp2metadata.o gdaljp2box.o gdalmultidomainmetadata.o \ - gdal_rat.o gdalpamproxydb.o \ - gdalallvalidmaskband.o gdalnodatamaskband.o \ - gdalproxydataset.o gdalproxypool.o gdaldefaultasync.o \ - gdalnodatavaluesmaskband.o gdaldllmain.o gdalexif.o \ - gdalgeorefpamdataset.o gdaljp2abstractdataset.o gdalvirtualmem.o \ - gdaloverviewdataset.o gdalrescaledalphaband.o gdaljp2structure.o \ - gdal_mdreader.o gdaljp2metadatagenerator.o gdalabstractbandblockcache.o \ - gdalarraybandblockcache.o gdalhashsetbandblockcache.o rawdataset.o \ - gdalpython.o gdalpythondriverloader.o tilematrixset.o \ - gdal_thread_pool.o - -CPPFLAGS := -iquote ../frmts/gtiff -iquote ../frmts/mem -iquote ../frmts/vrt -iquote ../ogr -iquote ../ogr/ogrsf_frmts/generic -iquote ../gnm/ -iquote ../gnm/gnm_frmts/ $(JSON_INCLUDE) -iquote ../ogr/ogrsf_frmts/geojson $(CPPFLAGS) $(PROJ_INCLUDE) $(PAM_SETTING) $(XTRA_OPT) - -ifeq ($(HAVE_SQLITE),yes) -CPPFLAGS := $(CPPFLAGS) -DSQLITE_ENABLED -endif - -ifeq ($(HAVE_LIBXML2),yes) -CPPFLAGS := $(CPPFLAGS) $(LIBXML2_INC) -DHAVE_LIBXML2 -endif - -ifeq ($(HAVE_GEOS),yes) -CPPFLAGS := $(CPPFLAGS) -DHAVE_GEOS=1 $(GEOS_CFLAGS) -endif - -#nasakeywordhandler is used by pds and hdf4 -compile_nasakeywordhandler = no -ifeq ($(HAVE_HDF4),yes) - compile_nasakeywordhandler = yes -endif -ifeq ($(shell echo $(GDAL_FORMATS) | grep "pds" >/dev/null && echo "yes" || echo "no"),yes) - compile_nasakeywordhandler = yes -endif -ifeq ($(compile_nasakeywordhandler),yes) - OBJ += nasakeywordhandler.o -endif - -CXXFLAGS := $(WARN_EFFCPLUSPLUS) $(WARN_OLD_STYLE_CAST) $(CXXFLAGS) - -GENERATE_GDAL_VERSION_H := $(shell ./generate_gdal_version_h.sh) - -default: mdreader-target $(OBJ:.o=.$(OBJ_EXT)) rasterio_ssse3.$(OBJ_EXT) - -.PHONY: generate_gdal_version_h - -generate_gdal_version_h: ; - -rasterio_ssse3.$(OBJ_EXT): rasterio_ssse3.cpp - $(CXX) $(GDAL_INCLUDE) $(CXXFLAGS_NO_LTO_IF_SSSE3_NONDEFAULT) $(SSSE3FLAGS) $(CPPFLAGS) -c -o $@ $< - -$(OBJ): gdal_priv.h gdal_proxy.h - -clean: mdreader-clean - $(RM) *.o $(O_OBJ) - -docs: - (cd ..; $(MAKE) docs) - -gdal_misc.$(OBJ_EXT): gdal_misc.cpp ../generated_headers/gdal_version.h - -gdaldrivermanager.$(OBJ_EXT): gdaldrivermanager.cpp ../GDALmake.opt - $(CXX) -c $(GDAL_INCLUDE) $(CPPFLAGS) $(CXXFLAGS) -DINST_DATA=\"$(INST_DATA)\" \ - $< -o $@ - -INST_H_FILES = \ - gdal_frmts.h \ - gdalgeorefpamdataset.h \ - gdal.h \ - gdaljp2abstractdataset.h \ - gdaljp2metadata.h \ - gdal_mdreader.h \ - gdal_pam.h \ - gdal_priv.h \ - gdal_proxy.h \ - gdal_rat.h \ - gdalcachedpixelaccessor.h \ - rawdataset.h - -install: - for f in $(INST_H_FILES) ; do $(INSTALL_DATA) $$f $(DESTDIR)$(INST_INCLUDE) ; done diff --git a/gcore/generate_gdal_version_h.sh b/gcore/generate_gdal_version_h.sh deleted file mode 100755 index ae40a3187864..000000000000 --- a/gcore/generate_gdal_version_h.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/sh -set -e - -if test "x$GDAL_SHA1SUM" != "x"; then - if test -f ../generated_headers/gdal_version.h; then - cp ../generated_headers/gdal_version.h gdal_version.h.bak - else - touch gdal_version.h.bak - fi - echo "/* This is a generated file from gdal_version.h.in. DO NOT MODIFY !!!! */" > gdal_version.h.new - echo "" >> gdal_version.h.new - cat gdal_version.h.in >> gdal_version.h.new - if grep dev gdal_version.h.in >/dev/null; then - sed -i.bak "s/dev/dev\\-$GDAL_SHA1SUM/" gdal_version.h.new && rm gdal_version.h.new.bak - else - sed -i.bak "s/\(GDAL_RELEASE_NAME\)\(.*\"\)\(.*\)\"/\1\2\3-$GDAL_SHA1SUM\"/" gdal_version.h.new && rm gdal_version.h.new.bak - fi - if test "x$GDAL_RELEASE_DATE" != "x"; then - sed -i.bak "s/define GDAL_RELEASE_DATE.*/define GDAL_RELEASE_DATE $GDAL_RELEASE_DATE/" gdal_version.h.new && rm gdal_version.h.new.bak - fi - diff -u gdal_version.h.new gdal_version.h.bak >/dev/null || \ - (echo "Update gdal_version.h"; \ - cp gdal_version.h.new ../generated_headers/gdal_version.h) - rm -f gdal_version.h.bak - rm -f gdal_version.h.new -elif git log -1 >/dev/null 2>/dev/null && grep dev gdal_version.h.in >/dev/null; then - REV=$(git log -1 --format="%h") - DATE=$(git log -1 --date=format:'%Y%m%d' --format="%ad" 2>/dev/null) || DATE="" - if git status --porcelain -uno | grep . >/dev/null; then REV="$REV-dirty"; fi - if test -f ../generated_headers/gdal_version.h; then - cp ../generated_headers/gdal_version.h gdal_version.h.bak - else - touch gdal_version.h.bak - fi - echo "/* This is a generated file from gdal_version.h.in. DO NOT MODIFY !!!! */" > gdal_version.h.new - echo "" >> gdal_version.h.new - cat gdal_version.h.in >> gdal_version.h.new - sed -i.bak "s/dev/dev\\-$REV/" gdal_version.h.new && rm gdal_version.h.new.bak - if test "$DATE" != ""; then - sed -i.bak "s/define GDAL_RELEASE_DATE.*/define GDAL_RELEASE_DATE $DATE/" gdal_version.h.new && rm gdal_version.h.new.bak - fi - diff -u gdal_version.h.new gdal_version.h.bak >/dev/null || \ - (echo "Update gdal_version.h"; \ - cp gdal_version.h.new ../generated_headers/gdal_version.h) - rm -f gdal_version.h.bak - rm -f gdal_version.h.new -else - echo "/* This is a generated file from gdal_version.h.in. DO NOT MODIFY !!!! */" > gdal_version.h.new - echo "" >> gdal_version.h.new - cat gdal_version.h.in >> gdal_version.h.new - diff -u gdal_version.h.new gdal_version.h 2>/dev/null >/dev/null || \ - (echo "Update gdal_version.h"; \ - cp gdal_version.h.new ../generated_headers/gdal_version.h) - rm -f gdal_version.h.new -fi diff --git a/gcore/makefile.vc b/gcore/makefile.vc deleted file mode 100644 index cb3356097b9f..000000000000 --- a/gcore/makefile.vc +++ /dev/null @@ -1,66 +0,0 @@ - -OBJ = gdalopeninfo.obj gdaldrivermanager.obj gdaldriver.obj \ - gdaldataset.obj gdalrasterband.obj gdal_misc.obj \ - rasterio.obj gdalrasterblock.obj gdal_rat.obj \ - gdalcolortable.obj overview.obj gdaldefaultoverviews.obj \ - gdalmajorobject.obj gdalpamdataset.obj gdalpamrasterband.obj \ - gdaljp2metadata.obj gdaljp2box.obj \ - gdalmultidomainmetadata.obj gdalpamproxydb.obj \ - gdalallvalidmaskband.obj gdalnodatamaskband.obj \ - gdalproxydataset.obj gdalproxypool.obj \ - gdalnodatavaluesmaskband.obj gdaldefaultasync.obj \ - gdaldllmain.obj gdalexif.obj \ - gdalgeorefpamdataset.obj gdaljp2abstractdataset.obj \ - gdalvirtualmem.obj gdaloverviewdataset.obj gdalrescaledalphaband.obj \ - gdaljp2structure.obj gdal_mdreader.obj gdaljp2metadatagenerator.obj \ - gdalabstractbandblockcache.obj rawdataset.obj\ - gdalarraybandblockcache.obj gdalhashsetbandblockcache.obj \ - gdalmultidim.obj \ - gdalpython.obj gdalpythondriverloader.obj tilematrixset.obj \ - gdal_thread_pool.obj nasakeywordhandler.obj - -RES = Version.res - -GDAL_ROOT = .. - -!INCLUDE ..\nmake.opt - -!IF "$(SSSE3FLAGS)" == "/DHAVE_SSSE3_AT_COMPILE_TIME" -SSSE3_OBJ = rasterio_ssse3.obj -!ENDIF - -EXTRAFLAGS = $(PAM_SETTING) -I..\frmts\gtiff -I..\frmts\mem -I..\frmts\vrt -I..\ogr\ogrsf_frmts\generic -I../ogr/ogrsf_frmts/geojson -I..\ogr\ogrsf_frmts\geojson\libjson $(PROJ_INCLUDE) $(SQLITEDEF) $(GEOS_CFLAGS) - -!IFDEF SQLITE_LIB -SQLITEDEF = -DSQLITE_ENABLED -!ENDIF - -!IFDEF XERCES_DIR -EXTRAFLAGS = $(EXTRAFLAGS) $(XERCES_INCLUDE) -DHAVE_XERCES -!ENDIF - -!IFDEF LIBXML2_INC -EXTRAFLAGS = $(EXTRAFLAGS) -DHAVE_LIBXML2 $(LIBXML2_INC) -!ENDIF - -default: gdal_version.h $(OBJ) $(RES) mdreader_dir $(SSSE3_OBJ) - -gdal_version.h: gdal_version.h.in - copy gdal_version.h.in gdal_version.h - -clean: - -del *.obj *.res - -del gdal_version.h - cd mdreader - $(MAKE) /f makefile.vc clean - cd .. - -Version.res: gdal_version.h - rc -fo Version.res -r -I..\port -I..\ogr Version.rc - -gdal_misc.obj: gdal_misc.cpp gdal_version.h - -mdreader_dir: - cd mdreader - $(MAKE) /f makefile.vc - cd .. diff --git a/gcore/mdreader/GNUmakefile b/gcore/mdreader/GNUmakefile deleted file mode 100644 index 0bcd0401af10..000000000000 --- a/gcore/mdreader/GNUmakefile +++ /dev/null @@ -1,28 +0,0 @@ - -include ../../GDALmake.opt - -OBJ = reader_digital_globe.o reader_geo_eye.o reader_orb_view.o \ - reader_pleiades.o reader_rdk1.o reader_landsat.o \ - reader_spot.o reader_rapid_eye.o reader_alos.o reader_eros.o \ - reader_kompsat.o - -UP_OBJ = $(addprefix ../,$(OBJ)) - -default: $(UP_OBJ:.o=.$(OBJ_EXT)) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) - -../%.$(OBJ_EXT): %.c - $(CC) $(GDAL_INCLUDE) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< - -../%.$(OBJ_EXT): %.cpp - $(CXX) $(GDAL_INCLUDE) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< - -%.$(OBJ_EXT): %.c - $(CC) $(GDAL_INCLUDE) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< - -%.$(OBJ_EXT): %.cpp - $(CXX) $(GDAL_INCLUDE) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< - -clean: - $(RM) *.o $(O_OBJ) diff --git a/gcore/mdreader/makefile.vc b/gcore/mdreader/makefile.vc deleted file mode 100644 index 76d69d5b864f..000000000000 --- a/gcore/mdreader/makefile.vc +++ /dev/null @@ -1,16 +0,0 @@ -OBJ = reader_digital_globe.obj reader_geo_eye.obj reader_orb_view.obj \ - reader_pleiades.obj reader_rdk1.obj reader_landsat.obj \ - reader_spot.obj reader_rapid_eye.obj reader_alos.obj \ - reader_eros.obj reader_kompsat.obj - -GDAL_ROOT = ..\.. - -!INCLUDE ..\..\nmake.opt - -EXTRAFLAGS = -I..\..\port -I..\..\ogr -I..\ - -default: $(OBJ) - xcopy /D /Y *.obj ..\ - -clean: - -del *.obj diff --git a/gdal.pc.in b/gdal.pc.in deleted file mode 100644 index a1aef6e88032..000000000000 --- a/gdal.pc.in +++ /dev/null @@ -1,11 +0,0 @@ -prefix=${CONFIG_INST_PREFIX} -exec_prefix=${prefix} -libdir=${exec_prefix}/lib -includedir=${exec_prefix}/include -datadir=${CONFIG_INST_DATA} - -Name: libgdal -Description: Geospatial Data Abstraction Library -Version: ${CONFIG_VERSION} -Libs: ${CONFIG_INST_LIBS} -Cflags: ${CONFIG_INST_CFLAGS} diff --git a/generate_vcxproj.bat b/generate_vcxproj.bat deleted file mode 100644 index 08123756ac25..000000000000 --- a/generate_vcxproj.bat +++ /dev/null @@ -1,487 +0,0 @@ -@echo off - -:: **************************************************************************** -:: $Id: $ -:: -:: Name: generate_vcxproj.bat -:: Project: GDAL -:: Purpose: Generate MS Visual C++ => 12.0 project files -:: Author: Ivan Lucena, [ivan lucena at outlook dot com] -:: -:: **************************************************************************** -:: Copyright (c) 2007, Ivan Lucena -:: -:: Permission is hereby granted, free of charge, to any person obtaining a -:: copy of this software and associated documentation files (the "Software"), -:: to deal in the Software without restriction, including without limitation -:: the rights to use, copy, modify, merge, publish, distribute, sublicense, -:: and/or sell copies of the Software, and to permit persons to whom the -:: Software is furnished to do so, subject to the following conditions: -:: -:: The above copyright notice and this permission notice shall be included -:: in all copies or substantial portions of the Software. -:: -:: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -:: OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -:: FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -:: THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -:: LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -:: FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -:: DEALINGS IN THE SOFTWARE. -:: **************************************************************************** -setlocal - -if "%1"=="" ( - goto :usage -) - -if "%2"=="" ( - goto :usage -) - -if "%3"=="" ( - goto :usage -) - -:: ********************* -:: Get Visual C++ version -:: ********************* - -set _vcver_=%1 - -set _clver_=1600 -set _vstoolset_=v100 - -if "%_vcver_%"=="16.0" ( - set _clver_=1920 - set _vstoolset_=v142 -) else if "%_vcver_%"=="15.0" ( - set _clver_=1910 - set _vstoolset_=v141 -) else if "%_vcver_%"=="14.0" ( - set _clver_=1900 - set _vstoolset_=v140 -) else ( if "%_vcver_%"=="12.0" ( - set _clver_=1800 - set _vstoolset_=v120 -) else ( - echo Wrong value for parameter 1. See usage: - goto :usage -)) - -:: ********************* -:: Get Platform -:: ********************* - -set _platf_=%2 -set _buildplatf_=x86 -set _winver_=Win32 -set _nmake_opt_win64_= - -if not "%_platf_%"=="32" ( - if not "%_platf_%"=="64" ( - echo Wrong value for parameter 2. See usage: - goto :usage - ) -) - -if "%_platf_%"=="64" ( - set _winver_=x64 - set _buildplatf_=x64 - set _nmake_opt_win64_=WIN64=1 -) - -goto :continue - -:: ********************* -:usage -:: ********************* - -echo Usage: generate_vcxproj ^ [32^|64] ^<^(*^) project file name^> -echo Parameters: -echo 1 : Visual C++ version is not the same as Visual Studio version ^( =^> 14.0 ^) -echo 2 : Windows platform 32 for Win32 and 64 for Win64 -echo 3 : Base file name, with no path and no extension ^(*^) -echo Examples: -echo generate_vcxproj 12.0 64 gdal_vs2013 -echo generate_vcxproj 14.0 64 gdal_vs2015 -echo generate_vcxproj 15.0 64 gdal_vs2017 -echo generate_vcxproj 16.0 64 gdal_vs2019 -echo WARNING: GDAL requires C++11. It is not guaranteed to build with VS2013. - -goto :end - -:: ********************* -:: Set Project file names -:: ********************* - -:continue - -set _gdaldir_=%CD% -set _testdir_= -FOR /F %%i IN ("%_gdaldir_%\..\autotest\cpp") DO ( - if exist "%%~fi" set _testdir_=%%~fi -) - -set _gdalsln_=%_gdaldir_%\%3.sln -set _gdalproj_=%_gdaldir_%\%3.vcxproj -set _gdaluser_=%_gdalproj_%.user -set _gdalfltr_=%_gdalproj_%.filters -set _testproj_=%_testdir_%\%3_test.vcxproj -set _testuser_=%_testproj_%.user -set _testfltr_=%_testproj_%.filters - -:: Add quotes - -set _gdalproj_="%_gdalproj_%" -set _gdaluser_="%_gdaluser_%" -set _gdalfltr_="%_gdalfltr_%" -set _testproj_="%_testproj_%" -set _testuser_="%_testuser_%" -set _testfltr_="%_testfltr_%" - -:: Progress message - -echo Generating: -echo %_gdalproj_% -echo %_gdaluser_% -echo %_gdalfltr_% - -if defined _testdir_ ( - echo %_testproj_% - echo %_testuser_% - echo %_testfltr_% -) -:: if defined _testdir_ - -echo This might take a little while... - -:: Delete existing files - -if exist %_gdalproj_% ( - del %_gdalproj_% -) - -if exist %_gdaluser_% ( - del %_gdaluser_% -) - -if exist %_gdalfltr_% ( - del %_gdalfltr_% -) - -if exist %_testproj_% ( - del %_testproj_% -) - -if exist %_testuser_% ( - del %_testuser_% -) - -if exist %_testfltr_% ( - del %_testfltr_% -) - -:: ********************************************** -:: Generate project user files (.vcxproj.user) -:: ********************************************** - -echo ^ >> %_gdaluser_% -echo ^ >> %_gdaluser_% -echo ^ >> %_gdaluser_% -echo ^WindowsLocalDebugger^ >> %_gdaluser_% -echo ^Auto^ >> %_gdaluser_% -echo ^%CD%\apps\gdal_translate.exe^ >> %_gdaluser_% -echo ^--formats^ >> %_gdaluser_% -echo ^CPL_DEBUG=ON >> %_gdaluser_% -echo GDAL_DATA=%_gdaldir_%\data >> %_gdaluser_% -echo ^ >> %_gdaluser_% -echo ^ >> %_gdaluser_% -echo ^ >> %_gdaluser_% - -if defined _testdir_ ( -echo ^ >> %_testuser_% -echo ^ >> %_testuser_% -echo ^ >> %_testuser_% -echo ^WindowsLocalDebugger^ >> %_testuser_% -echo ^Auto^ >> %_testuser_% -echo ^%_testdir_%\gdal_unit_test.exe^ >> %_testuser_% -echo ^^ >> %_testuser_% -echo ^CPL_DEBUG=ON >> %_testuser_% -echo GDAL_DATA=%_gdaldir_%\data >> %_testuser_% -echo ^ >> %_testuser_% -echo ^ >> %_testuser_% -echo ^ >> %_testuser_% -) -:: if defined _testdir_ - -:: ********************************************** -:: Initialize filters files (.vcxproj.filters) -:: ********************************************** - -echo ^ >> %_gdalfltr_% -echo ^ >> %_gdalfltr_% - -:: ********************************************** -:: Main file generator (.vcxproj) and filters file (.vcxproj.filters) -:: ********************************************** - -echo ^ >> %_gdalproj_% -echo ^ >> %_gdalproj_% -echo ^ >> %_gdalproj_% -echo ^ >> %_gdalproj_% -echo ^Debug^ >> %_gdalproj_% -echo ^%_winver_%^ >> %_gdalproj_% -echo ^ >> %_gdalproj_% -echo ^ >> %_gdalproj_% -echo ^Release^ >> %_gdalproj_% -echo ^%_winver_%^ >> %_gdalproj_% -echo ^ >> %_gdalproj_% -echo ^ >> %_gdalproj_% -echo ^ >> %_gdalproj_% -echo ^MakeFileProj^ >> %_gdalproj_% -echo ^ >> %_gdalproj_% -echo ^ >> %_gdalproj_% -echo ^ >> %_gdalproj_% -echo ^Makefile^ >> %_gdalproj_% -echo ^true^ >> %_gdalproj_% -echo ^%_vstoolset_%^ >> %_gdalproj_% -echo ^ >> %_gdalproj_% -echo ^ >> %_gdalproj_% -echo ^Makefile^ >> %_gdalproj_% -echo ^true^ >> %_gdalproj_% -echo ^%_vstoolset_%^ >> %_gdalproj_% -echo ^ >> %_gdalproj_% -echo ^ >> %_gdalproj_% -echo ^ >> %_gdalproj_% -echo ^ >> %_gdalproj_% -echo ^ >> %_gdalproj_% -echo ^ >> %_gdalproj_% -echo ^ >> %_gdalproj_% -echo ^ >> %_gdalproj_% -echo ^ >> %_gdalproj_% -echo ^ >> %_gdalproj_% -echo ^ >> %_gdalproj_% -echo ^ >> %_gdalproj_% -echo ^nmake -f makefile.vc MSVC_VER=%_clver_% %_nmake_opt_win64_% DEBUG=1 WITH_PDB=1^ >> %_gdalproj_% -echo ^^ >> %_gdalproj_% -echo ^nmake -f makefile.vc MSVC_VER=%_clver_% %_nmake_opt_win64_% DEBUG=1 WITH_PDB=1 clean^ >> %_gdalproj_% -echo ^nmake -f makefile.vc MSVC_VER=%_clver_% %_nmake_opt_win64_% DEBUG=1 WITH_PDB=1 clean ^&^& nmake -f makefile.vc MSVC_VER=%_clver_% %_nmake_opt_win64_% DEBUG=1 WITH_PDB=1^ >> %_gdalproj_% -echo ^%_winver_%;_DEBUG;$(NMakePreprocessorDefinitions)^ >> %_gdalproj_% -echo ^$(VC_LibraryPath_%_buildplatf_%);$(WindowsSDK_LibraryPath_%_buildplatf_%);$(VC_SourcePath);^ >> %_gdalproj_% -echo ^ >> %_gdalproj_% -echo ^ >> %_gdalproj_% -echo ^nmake -f makefile.vc MSVC_VER=%_clver_% %_nmake_opt_win64_% ^ >> %_gdalproj_% -echo ^^ >> %_gdalproj_% -echo ^nmake -f makefile.vc MSVC_VER=%_clver_% %_nmake_opt_win64_% clean^ >> %_gdalproj_% -echo ^nmake -f makefile.vc MSVC_VER=%_clver_% %_nmake_opt_win64_% clean ^&^& nmake -f makefile.vc MSVC_VER=%_clver_%^ >> %_gdalproj_% -echo ^%_winver_%;NDEBUG;$(NMakePreprocessorDefinitions)^ >> %_gdalproj_% -echo ^$(VC_LibraryPath_%_buildplatf_%);$(WindowsSDK_LibraryPath_%_buildplatf_%);$(VC_SourcePath);^ >> %_gdalproj_% -echo ^ >> %_gdalproj_% -echo ^ >> %_gdalproj_% -echo ^ >> %_gdalproj_% - -:: create a root path with nmake files - -echo ^ >> %_gdalproj_% -echo ^ >> %_gdalproj_% -echo ^ >> %_gdalproj_% -echo ^ >> %_gdalproj_% - -echo ^ >> %_gdalfltr_% -echo ^ >> %_gdalfltr_% -echo ^ >> %_gdalfltr_% -echo ^ >> %_gdalfltr_% - -:: Use base of main .vcxproj and .filters as template for test project - -if defined _testdir_ ( - copy /Y %_gdalproj_% %_testproj_% >NUL - copy /Y %_gdalfltr_% %_testfltr_% >NUL -) -:: if defined _testdir_ - -:: create main project filters only - -echo ^ >> %_gdalfltr_% -call :create_filter %_gdaldir_% "*.vc;" 1 "Make Files" "None" %_gdalproj_% %_gdalfltr_% -call :create_filter %_gdaldir_% "*.h;*.hpp" 1 "Include Files" "ClInclude" %_gdalproj_% %_gdalfltr_% -call :create_filter %_gdaldir_% "*.c;*.cpp" 1 "Source Files" "ClCompile" %_gdalproj_% %_gdalfltr_% -echo ^ >> %_gdalfltr_% - -:: create test project filters only - -if defined _testdir_ ( -echo ^ >> %_testfltr_% -call :create_filter %_testdir_% "*.vc;" 1 "Make Files" "None" %_testproj_% %_testfltr_% -call :create_filter %_testdir_% "*.h;*.hpp" 1 "Include Files" "ClInclude" %_testproj_% %_testfltr_% -call :create_filter %_testdir_% "*.c;*.cpp" 1 "Source Files" "ClCompile" %_testproj_% %_testfltr_% -echo ^ >> %_testfltr_% -) -:: if defined _testdir_ - -:: create main project and links to filters - -echo ^ >> %_gdalproj_% -echo ^ >> %_gdalfltr_% -call :create_filter %_gdaldir_% "*.vc" 0 "Make Files" "None" %_gdalproj_% %_gdalfltr_% -echo ^ >> %_gdalproj_% -echo ^ >> %_gdalfltr_% - -echo ^ >> %_gdalproj_% -echo ^ >> %_gdalfltr_% -call :create_filter %_gdaldir_% "*.h;*.hpp" 0 "Include Files" "ClInclude" %_gdalproj_% %_gdalfltr_% -echo ^ >> %_gdalproj_% -echo ^ >> %_gdalfltr_% - -echo ^ >> %_gdalproj_% -echo ^ >> %_gdalfltr_% -call :create_filter %_gdaldir_% "*.c;*.cpp" 0 "Source Files" "ClCompile" %_gdalproj_% %_gdalfltr_% -echo ^ >> %_gdalproj_% -echo ^ >> %_gdalfltr_% - -:: create test project and links to filters - -if defined _testdir_ ( -echo ^ >> %_testproj_% -echo ^ >> %_testfltr_% -call :create_filter %_testdir_% "*.vc" 0 "Make Files" "None" %_testproj_% %_testfltr_% -echo ^ >> %_testproj_% -echo ^ >> %_testfltr_% - -echo ^ >> %_testproj_% -echo ^ >> %_testfltr_% -call :create_filter %_testdir_% "*.h;*.hpp" 0 "Include Files" "ClInclude" %_testproj_% %_testfltr_% -echo ^ >> %_testproj_% -echo ^ >> %_testfltr_% - -echo ^ >> %_testproj_% -echo ^ >> %_testfltr_% -call :create_filter %_testdir_% "*.c;*.cpp" 0 "Source Files" "ClCompile" %_testproj_% %_testfltr_% -echo ^ >> %_testproj_% -echo ^ >> %_testfltr_% -) -:: if defined _testdir_ - -:: ********************************************** -:: Finalize main and test projects -:: ********************************************** - -echo ^ >> %_gdalfltr_% - -echo ^ >> %_gdalproj_% -echo ^ >> %_gdalproj_% - -if defined _testdir_ ( -echo ^ >> %_testfltr_% - -echo ^ >> %_testproj_% -echo ^ >> %_testproj_% -) -:: if defined _testdir_ ( - -:: ******************************************************* -:: Generate .sln file with main and test projects attached -:: ******************************************************* - -echo Projects done! - -echo Launch Visual Studio IDE -echo * Open project %_gdalproj_% -echo * Add project %_testproj_% -echo * Configure Build Dependencies to build the main project before the test project. -echo * Save solution in .sln file -echo Done! - -:: ********************************************** -:: The end -:: ********************************************** - -goto :end - -:: ********************************************** -:create_filter -:: ********************************************** - - set _path_=%1 - set _mask_=%2 - set _fonly_=%3 - set _name_=%4 - set _item_=%5 - set _proj_=%6 - set _fltr_=%7 - - :: ********************* - :: Remove quotes - :: ********************* - - set _name_=%_name_:"=% - set _mask_=%_mask_:"=% - set _fonly_=%_fonly_:"=% - set _item_=%_item_:"=% - - :: ********************* - :: Stop folders - :: ********************* - - set _folder_=%~nx1 - - for %%d in (ci data debian doc html m4 pymod scripts swig) do ( - if "%_folder_%"=="%%d" ( - goto :end - ) - ) - :: ********************* - :: Check if a folder is empty - :: ********************* - - set _find_=1 - - for /R %%f in (%_mask_%) do ( - goto :not_empty - ) - - set _find_=0 - - :not_empty - - if %_find_%==0 ( - goto :end - ) - - :: ********************* - :: Add filters - :: ********************* - - if %_fonly_%==1 ( - echo ^ >> %_fltr_% - echo ^%_mask_%^ >> %_fltr_% - echo ^ >> %_fltr_% - ) - - :: ********************* - :: Add files - :: ********************* - - if %_fonly_%==0 ( - for %%f in (%_mask_%) do ( - echo ^<%_item_% Include="%_path_%\%%f"/^> >> %_proj_% - echo ^<%_item_% Include="%_path_%\%%f"^> >> %_fltr_% - echo ^%_name_%^ >> %_fltr_% - echo ^ >> %_fltr_% - ) - ) - - :: ********************* - :: Clib all the branches recursively - :: ********************* - - for /D %%d in (%_path_%\*) do ( - cd %%d - call :create_filter %%d "%_mask_%" %_fonly_% "%_name_%\%%~nxd" %_item_% %_proj_% %_fltr_% - cd .. - ) - -:: ********************************************** -:end -:: ********************************************** diff --git a/generated_headers/.gitignore b/generated_headers/.gitignore deleted file mode 100644 index f1b42a13e68d..000000000000 --- a/generated_headers/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -cpl_config.h -gdal_version.h diff --git a/generated_headers/GNUmakefile b/generated_headers/GNUmakefile deleted file mode 100644 index 4316c3a906f8..000000000000 --- a/generated_headers/GNUmakefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../GDALmake.opt - -INST_H_FILES = \ - cpl_config.h \ - gdal_version.h - -clean: - $(RM) -f gdal_version.h - -install: - for f in $(INST_H_FILES) ; do $(INSTALL_DATA) $$f $(DESTDIR)$(INST_INCLUDE) ; done diff --git a/gnm/GNUmakefile b/gnm/GNUmakefile deleted file mode 100644 index d5fe2cd08a30..000000000000 --- a/gnm/GNUmakefile +++ /dev/null @@ -1,35 +0,0 @@ - -include ../GDALmake.opt - -INST_H_FILES = gnm.h gnm_api.h gnmgraph.h - -OBJ = gnmnetwork.o gnmgenericnetwork.o gnmlayer.o gnmrule.o gnmresultlayer.o \ - gnmgraph.o - -default: lib - -all: lib - -clean: - rm -f html/* - (cd gnm_frmts; $(MAKE) clean) - $(RM) *.o - -very-clean: clean - rm -rf html rtf - -lib: sublibs $(OBJ:.o=.$(OBJ_EXT)) - -$(OBJ): gnm.h gnm_priv.h - -obj: $(OBJ) - -sublibs: - (cd gnm_frmts; $(MAKE)) - -install: - for f in $(INST_H_FILES) ; \ - do $(INSTALL_DATA) $$f $(DESTDIR)$(INST_INCLUDE) ; \ - done - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) diff --git a/gnm/gnm_frmts/GNUmakefile b/gnm/gnm_frmts/GNUmakefile deleted file mode 100644 index 946a762bef1a..000000000000 --- a/gnm/gnm_frmts/GNUmakefile +++ /dev/null @@ -1,38 +0,0 @@ - -include ../../GDALmake.opt - -#config gnm drivers list - -#add formats -GNMFILE_ENABLED=yes -GNMDB_ENABLED=yes -# - -ifeq ($(GNMFILE_ENABLED),yes) - CXXFLAGS := $(CXXFLAGS) -DGNMFILE_ENABLED -endif - - -ifeq ($(GNMDB_ENABLED),yes) - CXXFLAGS := $(CXXFLAGS) -DGNMDB_ENABLED -endif - - -SUBDIRS-$(GNMFILE_ENABLED) += file -SUBDIRS-$(GNMDB_ENABLED) += db - -OBJ = o/gnmregisterall.o - -%-install-obj: - $(MAKE) -C $* install-obj - -default: $(OBJ:.o=.$(OBJ_EXT)) $(foreach d,$(SUBDIRS-yes),$(d)-install-obj) - -o/gnmregisterall.$(OBJ_EXT): gnmregisterall.cpp ../../GDALmake.opt - $(CXX) -c $(GDAL_INCLUDE) $(CXXFLAGS) $(FRMT_FLAGS) \ - gnmregisterall.cpp -o o/gnmregisterall.$(OBJ_EXT) - -clean: $(foreach d,$(SUBDIRS-yes),$(d)-clean) - $(RM) -f *.o o/*.o o/*.a - $(RM) o/*.lo - diff --git a/gnm/gnm_frmts/db/GNUmakefile b/gnm/gnm_frmts/db/GNUmakefile deleted file mode 100644 index c5368689d5bf..000000000000 --- a/gnm/gnm_frmts/db/GNUmakefile +++ /dev/null @@ -1,18 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = gnmdbdriver.o gnmdbnetwork.o - -CPPFLAGS := -iquote . -iquote ../ -iquote ../../ $(CPPFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - rm -f *.lo $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) - - - diff --git a/gnm/gnm_frmts/db/makefile.vc b/gnm/gnm_frmts/db/makefile.vc deleted file mode 100644 index 984f852b771e..000000000000 --- a/gnm/gnm_frmts/db/makefile.vc +++ /dev/null @@ -1,16 +0,0 @@ - -OBJ = gnmdbdriver.obj gnmdbnetwork.obj - - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -EXTRAFLAGS = -I.. -I..\.. - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj *.pdb - diff --git a/gnm/gnm_frmts/file/GNUmakefile b/gnm/gnm_frmts/file/GNUmakefile deleted file mode 100644 index 5f97a55a69d0..000000000000 --- a/gnm/gnm_frmts/file/GNUmakefile +++ /dev/null @@ -1,18 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = gnmfiledriver.o gnmfilenetwork.o - -CPPFLAGS := -iquote . -iquote ../ -iquote ../../ $(CPPFLAGS) - -default: $(OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - rm -f *.lo $(O_OBJ) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) - - - diff --git a/gnm/gnm_frmts/file/makefile.vc b/gnm/gnm_frmts/file/makefile.vc deleted file mode 100644 index 6a97773d026f..000000000000 --- a/gnm/gnm_frmts/file/makefile.vc +++ /dev/null @@ -1,16 +0,0 @@ - -OBJ = gnmfiledriver.obj gnmfilenetwork.obj - - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -EXTRAFLAGS = -I.. -I..\.. - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj *.pdb - diff --git a/gnm/gnm_frmts/makefile.vc b/gnm/gnm_frmts/makefile.vc deleted file mode 100644 index a27179edb25e..000000000000 --- a/gnm/gnm_frmts/makefile.vc +++ /dev/null @@ -1,32 +0,0 @@ -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -DIRLIST = file db - -!IFDEF INCLUDE_GNM_FRMTS - -EXTRAFLAGS = $(EXTRAFLAGS) -DGNMFILE_ENABLED -DGNMDB_ENABLED - -default: o\gnmregisterall.obj subdirs - -subdirs: - for %d in ( $(DIRLIST) ) do \ - cd %d \ - && $(MAKE) /f makefile.vc \ - && cd .. \ - || exit 1 - -o\gnmregisterall.obj: gnmregisterall.cpp $(GDAL_ROOT)\nmake.opt - $(CC) $(CFLAGS) $(EXTRAFLAGS) /c gnmregisterall.cpp - copy gnmregisterall.obj o - -!ENDIF - -clean: - -del o\*.obj *.obj - -for %d in ( $(DIRLIST) ) do \ - cd %d \ - && $(MAKE) /f makefile.vc clean \ - && cd .. \ - || exit 1 diff --git a/gnm/makefile.vc b/gnm/makefile.vc deleted file mode 100644 index 6dc0b9f5f26e..000000000000 --- a/gnm/makefile.vc +++ /dev/null @@ -1,46 +0,0 @@ - -EXTRAFLAGS = -DWIN32 -I. -Iogrsf_frmts -Iogrsf_frmts\mem -I..\frmts\gtiff\libgeotiff $(ZLIB_FLAGS) \ - $(PROJ_FLAGS) $(PROJ_INCLUDE) $(GEOS_CFLAGS) - -GDAL_ROOT = .. - -!INCLUDE ..\nmake.opt - -!IFDEF ZLIB_EXTERNAL_LIB -ZLIB_FLAGS = $(ZLIB_INC) -!ELSE -ZLIB_FLAGS = -I..\frmts\zlib -!ENDIF - -GNM_FRMTS = gnm_frmts\gnm_frmts.lib -OBJ_GNM = gnmnetwork.obj gnmgenericnetwork.obj gnmlayer.obj gnmrule.obj \ - gnmresultlayer.obj gnmgraph.obj - -default: gnm.lib - -gnm_frmts\gnm_frmts.lib: - -sublibs: frmts - -frmts: - cd gnm_frmts - $(MAKE) /f makefile.vc - cd .. - -all: frmts default - -gnm.lib: $(OBJ_GNM) - lib /nologo /out:gnm.lib $(OBJ_GNM) - -install: default - -clean: - -del *.obj - -del *.lib - -del *.pdb - -del *.ilk - -allclean: clean - cd gnm_frmts - $(MAKE) /f makefile.vc clean - cd .. diff --git a/install-sh b/install-sh deleted file mode 100755 index 84532484532b..000000000000 --- a/install-sh +++ /dev/null @@ -1,256 +0,0 @@ -#!/bin/sh -# -# install - install a program, script, or datafile -# This comes from X11R5 (mit/util/scripts/install.sh). -# -# Copyright 1991 by the Massachusetts Institute of Technology -# -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. - - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" - - -# put in absolute paths if you don't have them in your path; or use env. vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -transformbasename="" -transform_arg="" -instcmd="$mvprog" -chmodcmd="$chmodprog 0755" -chowncmd="" -chgrpcmd="" -stripcmd="" -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src="" -dst="" -dir_arg="" - -while [ x"$1" != x ]; do - case $1 in - -c) instcmd="$cpprog" - shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - -s) stripcmd="$stripprog" - shift - continue;; - - -t=*) transformarg=`echo $1 | sed 's/-t=//'` - shift - continue;; - - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` - shift - continue;; - - *) if [ x"$src" = x ] - then - src=$1 - else - # this colon is to work around a 386BSD /bin/sh bug - : - dst=$1 - fi - shift - continue;; - esac -done - -if [ x"$src" = x ] -then - echo "install: no input file specified" - exit 1 -else - true -fi - -if [ -x "$src".exe ] ; then - src=${src}.exe - echo "Cygwin hack - actually installing "$src -fi - -if [ x"$dir_arg" != x ]; then - dst=$src - src="" - - if [ -d $dst ]; then - instcmd=: - chmodcmd="" - else - instcmd=mkdir - fi -else - -# Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) contains '*'. - - if [ -f $src -o -d $src ] - then - true - else - echo "install: $src does not exist" - exit 1 - fi - - if [ x"$dst" = x ] - then - echo "install: no destination specified" - exit 1 - else - true - fi - -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic - - if [ -d $dst ] - then - dst="$dst"/`basename $src` - else - true - fi -fi - -## this sed command emulates the dirname command -dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` - -# Make sure that the destination directory exists. -# this part is taken from Noah Friedman's mkinstalldirs script - -# Skip lots of stat calls in the usual case. -if [ ! -d "$dstdir" ]; then -defaultIFS=' -' -IFS="${IFS-${defaultIFS}}" - -oIFS="${IFS}" -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS="${oIFS}" - -pathcomp='' - -while [ $# -ne 0 ] ; do - pathcomp="${pathcomp}${1}" - shift - - if [ ! -d "${pathcomp}" ] ; - then - $mkdirprog "${pathcomp}" - else - true - fi - - pathcomp="${pathcomp}/" -done -fi - -if [ x"$dir_arg" != x ] -then - $doit $instcmd $dst && - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi -else - -# If we're going to rename the final executable, determine the name now. - - if [ x"$transformarg" = x ] - then - dstfile=`basename $dst` - else - dstfile=`basename $dst $transformbasename | - sed $transformarg`$transformbasename - fi - -# don't allow the sed command to completely eliminate the filename - - if [ x"$dstfile" = x ] - then - dstfile=`basename $dst` - else - true - fi - -# Make a temp file name in the proper directory. - - dsttmp=$dstdir/#inst.$$# - -# Move or copy the file name to the temp name - - $doit $instcmd $src $dsttmp && - - trap "rm -f ${dsttmp}" 0 && - -# and set any options; do chmod last to preserve setuid bits - -# If any of these fail, we abort the whole thing. If we want to -# ignore errors from any of these, just make sure not to ignore -# errors from the above "$doit $instcmd $src $dsttmp" command. - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && - -# Now rename the file to the real destination. - - $doit $rmcmd -f $dstdir/$dstfile && - $doit $mvcmd $dsttmp $dstdir/$dstfile - -fi && - - -exit 0 diff --git a/ltmain.sh b/ltmain.sh deleted file mode 100644 index 425b29015d5a..000000000000 --- a/ltmain.sh +++ /dev/null @@ -1,11156 +0,0 @@ -#! /bin/sh -## DO NOT EDIT - This file generated from ./build-aux/ltmain.in -## by inline-source v2014-01-03.01 - -# libtool (GNU libtool) 2.4.6 -# Provide generalized library-building support services. -# Written by Gordon Matzigkeit , 1996 - -# Copyright (C) 1996-2015 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - - -PROGRAM=libtool -PACKAGE=libtool -VERSION="2.4.6 Debian-2.4.6-0.1" -package_revision=2.4.6 - - -## ------ ## -## Usage. ## -## ------ ## - -# Run './libtool --help' for help with using this script from the -# command line. - - -## ------------------------------- ## -## User overridable command paths. ## -## ------------------------------- ## - -# After configure completes, it has a better idea of some of the -# shell tools we need than the defaults used by the functions shared -# with bootstrap, so set those here where they can still be over- -# ridden by the user, but otherwise take precedence. - -: ${AUTOCONF="autoconf"} -: ${AUTOMAKE="automake"} - - -## -------------------------- ## -## Source external libraries. ## -## -------------------------- ## - -# Much of our low-level functionality needs to be sourced from external -# libraries, which are installed to $pkgauxdir. - -# Set a version string for this script. -scriptversion=2015-01-20.17; # UTC - -# General shell script boiler plate, and helper functions. -# Written by Gary V. Vaughan, 2004 - -# Copyright (C) 2004-2015 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. - -# As a special exception to the GNU General Public License, if you distribute -# this file as part of a program or library that is built using GNU Libtool, -# you may include this file under the same distribution terms that you use -# for the rest of that program. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Please report bugs or propose patches to gary@gnu.org. - - -## ------ ## -## Usage. ## -## ------ ## - -# Evaluate this file near the top of your script to gain access to -# the functions and variables defined here: -# -# . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh -# -# If you need to override any of the default environment variable -# settings, do that before evaluating this file. - - -## -------------------- ## -## Shell normalisation. ## -## -------------------- ## - -# Some shells need a little help to be as Bourne compatible as possible. -# Before doing anything else, make sure all that help has been provided! - -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac -fi - -# NLS nuisances: We save the old values in case they are required later. -_G_user_locale= -_G_safe_locale= -for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES -do - eval "if test set = \"\${$_G_var+set}\"; then - save_$_G_var=\$$_G_var - $_G_var=C - export $_G_var - _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" - _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" - fi" -done - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# Make sure IFS has a sensible default -sp=' ' -nl=' -' -IFS="$sp $nl" - -# There are apparently some retarded systems that use ';' as a PATH separator! -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - - -## ------------------------- ## -## Locate command utilities. ## -## ------------------------- ## - - -# func_executable_p FILE -# ---------------------- -# Check that FILE is an executable regular file. -func_executable_p () -{ - test -f "$1" && test -x "$1" -} - - -# func_path_progs PROGS_LIST CHECK_FUNC [PATH] -# -------------------------------------------- -# Search for either a program that responds to --version with output -# containing "GNU", or else returned by CHECK_FUNC otherwise, by -# trying all the directories in PATH with each of the elements of -# PROGS_LIST. -# -# CHECK_FUNC should accept the path to a candidate program, and -# set $func_check_prog_result if it truncates its output less than -# $_G_path_prog_max characters. -func_path_progs () -{ - _G_progs_list=$1 - _G_check_func=$2 - _G_PATH=${3-"$PATH"} - - _G_path_prog_max=0 - _G_path_prog_found=false - _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} - for _G_dir in $_G_PATH; do - IFS=$_G_save_IFS - test -z "$_G_dir" && _G_dir=. - for _G_prog_name in $_G_progs_list; do - for _exeext in '' .EXE; do - _G_path_prog=$_G_dir/$_G_prog_name$_exeext - func_executable_p "$_G_path_prog" || continue - case `"$_G_path_prog" --version 2>&1` in - *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; - *) $_G_check_func $_G_path_prog - func_path_progs_result=$func_check_prog_result - ;; - esac - $_G_path_prog_found && break 3 - done - done - done - IFS=$_G_save_IFS - test -z "$func_path_progs_result" && { - echo "no acceptable sed could be found in \$PATH" >&2 - exit 1 - } -} - - -# We want to be able to use the functions in this file before configure -# has figured out where the best binaries are kept, which means we have -# to search for them ourselves - except when the results are already set -# where we skip the searches. - -# Unless the user overrides by setting SED, search the path for either GNU -# sed, or the sed that truncates its output the least. -test -z "$SED" && { - _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for _G_i in 1 2 3 4 5 6 7; do - _G_sed_script=$_G_sed_script$nl$_G_sed_script - done - echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed - _G_sed_script= - - func_check_prog_sed () - { - _G_path_prog=$1 - - _G_count=0 - printf 0123456789 >conftest.in - while : - do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo '' >> conftest.nl - "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break - diff conftest.out conftest.nl >/dev/null 2>&1 || break - _G_count=`expr $_G_count + 1` - if test "$_G_count" -gt "$_G_path_prog_max"; then - # Best one so far, save it but keep looking for a better one - func_check_prog_result=$_G_path_prog - _G_path_prog_max=$_G_count - fi - # 10*(2^10) chars as input seems more than enough - test 10 -lt "$_G_count" && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out - } - - func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin - rm -f conftest.sed - SED=$func_path_progs_result -} - - -# Unless the user overrides by setting GREP, search the path for either GNU -# grep, or the grep that truncates its output the least. -test -z "$GREP" && { - func_check_prog_grep () - { - _G_path_prog=$1 - - _G_count=0 - _G_path_prog_max=0 - printf 0123456789 >conftest.in - while : - do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo 'GREP' >> conftest.nl - "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break - diff conftest.out conftest.nl >/dev/null 2>&1 || break - _G_count=`expr $_G_count + 1` - if test "$_G_count" -gt "$_G_path_prog_max"; then - # Best one so far, save it but keep looking for a better one - func_check_prog_result=$_G_path_prog - _G_path_prog_max=$_G_count - fi - # 10*(2^10) chars as input seems more than enough - test 10 -lt "$_G_count" && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out - } - - func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin - GREP=$func_path_progs_result -} - - -## ------------------------------- ## -## User overridable command paths. ## -## ------------------------------- ## - -# All uppercase variable names are used for environment variables. These -# variables can be overridden by the user before calling a script that -# uses them if a suitable command of that name is not already available -# in the command search PATH. - -: ${CP="cp -f"} -: ${ECHO="printf %s\n"} -: ${EGREP="$GREP -E"} -: ${FGREP="$GREP -F"} -: ${LN_S="ln -s"} -: ${MAKE="make"} -: ${MKDIR="mkdir"} -: ${MV="mv -f"} -: ${RM="rm -f"} -: ${SHELL="${CONFIG_SHELL-/bin/sh}"} - - -## -------------------- ## -## Useful sed snippets. ## -## -------------------- ## - -sed_dirname='s|/[^/]*$||' -sed_basename='s|^.*/||' - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s|\([`"$\\]\)|\\\1|g' - -# Same as above, but do not quote variable references. -sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution that turns a string into a regex matching for the -# string literally. -sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' - -# Sed substitution that converts a w32 file name or path -# that contains forward slashes, into one that contains -# (escaped) backslashes. A very naive implementation. -sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - -# Re-'\' parameter expansions in output of sed_double_quote_subst that -# were '\'-ed in input to the same. If an odd number of '\' preceded a -# '$' in input to sed_double_quote_subst, that '$' was protected from -# expansion. Since each input '\' is now two '\'s, look for any number -# of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. -_G_bs='\\' -_G_bs2='\\\\' -_G_bs4='\\\\\\\\' -_G_dollar='\$' -sed_double_backslash="\ - s/$_G_bs4/&\\ -/g - s/^$_G_bs2$_G_dollar/$_G_bs&/ - s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g - s/\n//g" - - -## ----------------- ## -## Global variables. ## -## ----------------- ## - -# Except for the global variables explicitly listed below, the following -# functions in the '^func_' namespace, and the '^require_' namespace -# variables initialised in the 'Resource management' section, sourcing -# this file will not pollute your global namespace with anything -# else. There's no portable way to scope variables in Bourne shell -# though, so actually running these functions will sometimes place -# results into a variable named after the function, and often use -# temporary variables in the '^_G_' namespace. If you are careful to -# avoid using those namespaces casually in your sourcing script, things -# should continue to work as you expect. And, of course, you can freely -# overwrite any of the functions or variables defined here before -# calling anything to customize them. - -EXIT_SUCCESS=0 -EXIT_FAILURE=1 -EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. -EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. - -# Allow overriding, eg assuming that you follow the convention of -# putting '$debug_cmd' at the start of all your functions, you can get -# bash to show function call trace with: -# -# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name -debug_cmd=${debug_cmd-":"} -exit_cmd=: - -# By convention, finish your script with: -# -# exit $exit_status -# -# so that you can set exit_status to non-zero if you want to indicate -# something went wrong during execution without actually bailing out at -# the point of failure. -exit_status=$EXIT_SUCCESS - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath=$0 - -# The name of this program. -progname=`$ECHO "$progpath" |$SED "$sed_basename"` - -# Make sure we have an absolute progpath for reexecution: -case $progpath in - [\\/]*|[A-Za-z]:\\*) ;; - *[\\/]*) - progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` - progdir=`cd "$progdir" && pwd` - progpath=$progdir/$progname - ;; - *) - _G_IFS=$IFS - IFS=${PATH_SEPARATOR-:} - for progdir in $PATH; do - IFS=$_G_IFS - test -x "$progdir/$progname" && break - done - IFS=$_G_IFS - test -n "$progdir" || progdir=`pwd` - progpath=$progdir/$progname - ;; -esac - - -## ----------------- ## -## Standard options. ## -## ----------------- ## - -# The following options affect the operation of the functions defined -# below, and should be set appropriately depending on run-time para- -# meters passed on the command line. - -opt_dry_run=false -opt_quiet=false -opt_verbose=false - -# Categories 'all' and 'none' are always available. Append any others -# you will pass as the first argument to func_warning from your own -# code. -warning_categories= - -# By default, display warnings according to 'opt_warning_types'. Set -# 'warning_func' to ':' to elide all warnings, or func_fatal_error to -# treat the next displayed warning as a fatal error. -warning_func=func_warn_and_continue - -# Set to 'all' to display all warnings, 'none' to suppress all -# warnings, or a space delimited list of some subset of -# 'warning_categories' to display only the listed warnings. -opt_warning_types=all - - -## -------------------- ## -## Resource management. ## -## -------------------- ## - -# This section contains definitions for functions that each ensure a -# particular resource (a file, or a non-empty configuration variable for -# example) is available, and if appropriate to extract default values -# from pertinent package files. Call them using their associated -# 'require_*' variable to ensure that they are executed, at most, once. -# -# It's entirely deliberate that calling these functions can set -# variables that don't obey the namespace limitations obeyed by the rest -# of this file, in order that that they be as useful as possible to -# callers. - - -# require_term_colors -# ------------------- -# Allow display of bold text on terminals that support it. -require_term_colors=func_require_term_colors -func_require_term_colors () -{ - $debug_cmd - - test -t 1 && { - # COLORTERM and USE_ANSI_COLORS environment variables take - # precedence, because most terminfo databases neglect to describe - # whether color sequences are supported. - test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} - - if test 1 = "$USE_ANSI_COLORS"; then - # Standard ANSI escape sequences - tc_reset='' - tc_bold=''; tc_standout='' - tc_red=''; tc_green='' - tc_blue=''; tc_cyan='' - else - # Otherwise trust the terminfo database after all. - test -n "`tput sgr0 2>/dev/null`" && { - tc_reset=`tput sgr0` - test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` - tc_standout=$tc_bold - test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` - test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` - test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` - test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` - test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` - } - fi - } - - require_term_colors=: -} - - -## ----------------- ## -## Function library. ## -## ----------------- ## - -# This section contains a variety of useful functions to call in your -# scripts. Take note of the portable wrappers for features provided by -# some modern shells, which will fall back to slower equivalents on -# less featureful shells. - - -# func_append VAR VALUE -# --------------------- -# Append VALUE onto the existing contents of VAR. - - # We should try to minimise forks, especially on Windows where they are - # unreasonably slow, so skip the feature probes when bash or zsh are - # being used: - if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then - : ${_G_HAVE_ARITH_OP="yes"} - : ${_G_HAVE_XSI_OPS="yes"} - # The += operator was introduced in bash 3.1 - case $BASH_VERSION in - [12].* | 3.0 | 3.0*) ;; - *) - : ${_G_HAVE_PLUSEQ_OP="yes"} - ;; - esac - fi - - # _G_HAVE_PLUSEQ_OP - # Can be empty, in which case the shell is probed, "yes" if += is - # useable or anything else if it does not work. - test -z "$_G_HAVE_PLUSEQ_OP" \ - && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ - && _G_HAVE_PLUSEQ_OP=yes - -if test yes = "$_G_HAVE_PLUSEQ_OP" -then - # This is an XSI compatible shell, allowing a faster implementation... - eval 'func_append () - { - $debug_cmd - - eval "$1+=\$2" - }' -else - # ...otherwise fall back to using expr, which is often a shell builtin. - func_append () - { - $debug_cmd - - eval "$1=\$$1\$2" - } -fi - - -# func_append_quoted VAR VALUE -# ---------------------------- -# Quote VALUE and append to the end of shell variable VAR, separated -# by a space. -if test yes = "$_G_HAVE_PLUSEQ_OP"; then - eval 'func_append_quoted () - { - $debug_cmd - - func_quote_for_eval "$2" - eval "$1+=\\ \$func_quote_for_eval_result" - }' -else - func_append_quoted () - { - $debug_cmd - - func_quote_for_eval "$2" - eval "$1=\$$1\\ \$func_quote_for_eval_result" - } -fi - - -# func_append_uniq VAR VALUE -# -------------------------- -# Append unique VALUE onto the existing contents of VAR, assuming -# entries are delimited by the first character of VALUE. For example: -# -# func_append_uniq options " --another-option option-argument" -# -# will only append to $options if " --another-option option-argument " -# is not already present somewhere in $options already (note spaces at -# each end implied by leading space in second argument). -func_append_uniq () -{ - $debug_cmd - - eval _G_current_value='`$ECHO $'$1'`' - _G_delim=`expr "$2" : '\(.\)'` - - case $_G_delim$_G_current_value$_G_delim in - *"$2$_G_delim"*) ;; - *) func_append "$@" ;; - esac -} - - -# func_arith TERM... -# ------------------ -# Set func_arith_result to the result of evaluating TERMs. - test -z "$_G_HAVE_ARITH_OP" \ - && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ - && _G_HAVE_ARITH_OP=yes - -if test yes = "$_G_HAVE_ARITH_OP"; then - eval 'func_arith () - { - $debug_cmd - - func_arith_result=$(( $* )) - }' -else - func_arith () - { - $debug_cmd - - func_arith_result=`expr "$@"` - } -fi - - -# func_basename FILE -# ------------------ -# Set func_basename_result to FILE with everything up to and including -# the last / stripped. -if test yes = "$_G_HAVE_XSI_OPS"; then - # If this shell supports suffix pattern removal, then use it to avoid - # forking. Hide the definitions single quotes in case the shell chokes - # on unsupported syntax... - _b='func_basename_result=${1##*/}' - _d='case $1 in - */*) func_dirname_result=${1%/*}$2 ;; - * ) func_dirname_result=$3 ;; - esac' - -else - # ...otherwise fall back to using sed. - _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' - _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` - if test "X$func_dirname_result" = "X$1"; then - func_dirname_result=$3 - else - func_append func_dirname_result "$2" - fi' -fi - -eval 'func_basename () -{ - $debug_cmd - - '"$_b"' -}' - - -# func_dirname FILE APPEND NONDIR_REPLACEMENT -# ------------------------------------------- -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -eval 'func_dirname () -{ - $debug_cmd - - '"$_d"' -}' - - -# func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT -# -------------------------------------------------------- -# Perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value returned in "$func_basename_result" -# For efficiency, we do not delegate to the functions above but instead -# duplicate the functionality here. -eval 'func_dirname_and_basename () -{ - $debug_cmd - - '"$_b"' - '"$_d"' -}' - - -# func_echo ARG... -# ---------------- -# Echo program name prefixed message. -func_echo () -{ - $debug_cmd - - _G_message=$* - - func_echo_IFS=$IFS - IFS=$nl - for _G_line in $_G_message; do - IFS=$func_echo_IFS - $ECHO "$progname: $_G_line" - done - IFS=$func_echo_IFS -} - - -# func_echo_all ARG... -# -------------------- -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "$*" -} - - -# func_echo_infix_1 INFIX ARG... -# ------------------------------ -# Echo program name, followed by INFIX on the first line, with any -# additional lines not showing INFIX. -func_echo_infix_1 () -{ - $debug_cmd - - $require_term_colors - - _G_infix=$1; shift - _G_indent=$_G_infix - _G_prefix="$progname: $_G_infix: " - _G_message=$* - - # Strip color escape sequences before counting printable length - for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" - do - test -n "$_G_tc" && { - _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` - _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` - } - done - _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes - - func_echo_infix_1_IFS=$IFS - IFS=$nl - for _G_line in $_G_message; do - IFS=$func_echo_infix_1_IFS - $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 - _G_prefix=$_G_indent - done - IFS=$func_echo_infix_1_IFS -} - - -# func_error ARG... -# ----------------- -# Echo program name prefixed message to standard error. -func_error () -{ - $debug_cmd - - $require_term_colors - - func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 -} - - -# func_fatal_error ARG... -# ----------------------- -# Echo program name prefixed message to standard error, and exit. -func_fatal_error () -{ - $debug_cmd - - func_error "$*" - exit $EXIT_FAILURE -} - - -# func_grep EXPRESSION FILENAME -# ----------------------------- -# Check whether EXPRESSION matches any line of FILENAME, without output. -func_grep () -{ - $debug_cmd - - $GREP "$1" "$2" >/dev/null 2>&1 -} - - -# func_len STRING -# --------------- -# Set func_len_result to the length of STRING. STRING may not -# start with a hyphen. - test -z "$_G_HAVE_XSI_OPS" \ - && (eval 'x=a/b/c; - test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ - && _G_HAVE_XSI_OPS=yes - -if test yes = "$_G_HAVE_XSI_OPS"; then - eval 'func_len () - { - $debug_cmd - - func_len_result=${#1} - }' -else - func_len () - { - $debug_cmd - - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` - } -fi - - -# func_mkdir_p DIRECTORY-PATH -# --------------------------- -# Make sure the entire path to DIRECTORY-PATH is available. -func_mkdir_p () -{ - $debug_cmd - - _G_directory_path=$1 - _G_dir_list= - - if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then - - # Protect directory names starting with '-' - case $_G_directory_path in - -*) _G_directory_path=./$_G_directory_path ;; - esac - - # While some portion of DIR does not yet exist... - while test ! -d "$_G_directory_path"; do - # ...make a list in topmost first order. Use a colon delimited - # list incase some portion of path contains whitespace. - _G_dir_list=$_G_directory_path:$_G_dir_list - - # If the last portion added has no slash in it, the list is done - case $_G_directory_path in */*) ;; *) break ;; esac - - # ...otherwise throw away the child directory and loop - _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` - done - _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` - - func_mkdir_p_IFS=$IFS; IFS=: - for _G_dir in $_G_dir_list; do - IFS=$func_mkdir_p_IFS - # mkdir can fail with a 'File exist' error if two processes - # try to create one of the directories concurrently. Don't - # stop in that case! - $MKDIR "$_G_dir" 2>/dev/null || : - done - IFS=$func_mkdir_p_IFS - - # Bail out if we (or some other process) failed to create a directory. - test -d "$_G_directory_path" || \ - func_fatal_error "Failed to create '$1'" - fi -} - - -# func_mktempdir [BASENAME] -# ------------------------- -# Make a temporary directory that won't clash with other running -# libtool processes, and avoids race conditions if possible. If -# given, BASENAME is the basename for that directory. -func_mktempdir () -{ - $debug_cmd - - _G_template=${TMPDIR-/tmp}/${1-$progname} - - if test : = "$opt_dry_run"; then - # Return a directory name, but don't create it in dry-run mode - _G_tmpdir=$_G_template-$$ - else - - # If mktemp works, use that first and foremost - _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` - - if test ! -d "$_G_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - _G_tmpdir=$_G_template-${RANDOM-0}$$ - - func_mktempdir_umask=`umask` - umask 0077 - $MKDIR "$_G_tmpdir" - umask $func_mktempdir_umask - fi - - # If we're not in dry-run mode, bomb out on failure - test -d "$_G_tmpdir" || \ - func_fatal_error "cannot create temporary directory '$_G_tmpdir'" - fi - - $ECHO "$_G_tmpdir" -} - - -# func_normal_abspath PATH -# ------------------------ -# Remove doubled-up and trailing slashes, "." path components, -# and cancel out any ".." path components in PATH after making -# it an absolute path. -func_normal_abspath () -{ - $debug_cmd - - # These SED scripts presuppose an absolute path with a trailing slash. - _G_pathcar='s|^/\([^/]*\).*$|\1|' - _G_pathcdr='s|^/[^/]*||' - _G_removedotparts=':dotsl - s|/\./|/|g - t dotsl - s|/\.$|/|' - _G_collapseslashes='s|/\{1,\}|/|g' - _G_finalslash='s|/*$|/|' - - # Start from root dir and reassemble the path. - func_normal_abspath_result= - func_normal_abspath_tpath=$1 - func_normal_abspath_altnamespace= - case $func_normal_abspath_tpath in - "") - # Empty path, that just means $cwd. - func_stripname '' '/' "`pwd`" - func_normal_abspath_result=$func_stripname_result - return - ;; - # The next three entries are used to spot a run of precisely - # two leading slashes without using negated character classes; - # we take advantage of case's first-match behaviour. - ///*) - # Unusual form of absolute path, do nothing. - ;; - //*) - # Not necessarily an ordinary path; POSIX reserves leading '//' - # and for example Cygwin uses it to access remote file shares - # over CIFS/SMB, so we conserve a leading double slash if found. - func_normal_abspath_altnamespace=/ - ;; - /*) - # Absolute path, do nothing. - ;; - *) - # Relative path, prepend $cwd. - func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath - ;; - esac - - # Cancel out all the simple stuff to save iterations. We also want - # the path to end with a slash for ease of parsing, so make sure - # there is one (and only one) here. - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` - while :; do - # Processed it all yet? - if test / = "$func_normal_abspath_tpath"; then - # If we ascended to the root using ".." the result may be empty now. - if test -z "$func_normal_abspath_result"; then - func_normal_abspath_result=/ - fi - break - fi - func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$_G_pathcar"` - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$_G_pathcdr"` - # Figure out what to do with it - case $func_normal_abspath_tcomponent in - "") - # Trailing empty path component, ignore it. - ;; - ..) - # Parent dir; strip last assembled component from result. - func_dirname "$func_normal_abspath_result" - func_normal_abspath_result=$func_dirname_result - ;; - *) - # Actual path component, append it. - func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" - ;; - esac - done - # Restore leading double-slash if one was found on entry. - func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result -} - - -# func_notquiet ARG... -# -------------------- -# Echo program name prefixed message only when not in quiet mode. -func_notquiet () -{ - $debug_cmd - - $opt_quiet || func_echo ${1+"$@"} - - # A bug in bash halts the script if the last line of a function - # fails when set -e is in force, so we need another command to - # work around that: - : -} - - -# func_relative_path SRCDIR DSTDIR -# -------------------------------- -# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. -func_relative_path () -{ - $debug_cmd - - func_relative_path_result= - func_normal_abspath "$1" - func_relative_path_tlibdir=$func_normal_abspath_result - func_normal_abspath "$2" - func_relative_path_tbindir=$func_normal_abspath_result - - # Ascend the tree starting from libdir - while :; do - # check if we have found a prefix of bindir - case $func_relative_path_tbindir in - $func_relative_path_tlibdir) - # found an exact match - func_relative_path_tcancelled= - break - ;; - $func_relative_path_tlibdir*) - # found a matching prefix - func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" - func_relative_path_tcancelled=$func_stripname_result - if test -z "$func_relative_path_result"; then - func_relative_path_result=. - fi - break - ;; - *) - func_dirname $func_relative_path_tlibdir - func_relative_path_tlibdir=$func_dirname_result - if test -z "$func_relative_path_tlibdir"; then - # Have to descend all the way to the root! - func_relative_path_result=../$func_relative_path_result - func_relative_path_tcancelled=$func_relative_path_tbindir - break - fi - func_relative_path_result=../$func_relative_path_result - ;; - esac - done - - # Now calculate path; take care to avoid doubling-up slashes. - func_stripname '' '/' "$func_relative_path_result" - func_relative_path_result=$func_stripname_result - func_stripname '/' '/' "$func_relative_path_tcancelled" - if test -n "$func_stripname_result"; then - func_append func_relative_path_result "/$func_stripname_result" - fi - - # Normalisation. If bindir is libdir, return '.' else relative path. - if test -n "$func_relative_path_result"; then - func_stripname './' '' "$func_relative_path_result" - func_relative_path_result=$func_stripname_result - fi - - test -n "$func_relative_path_result" || func_relative_path_result=. - - : -} - - -# func_quote_for_eval ARG... -# -------------------------- -# Aesthetically quote ARGs to be evaled later. -# This function returns two values: -# i) func_quote_for_eval_result -# double-quoted, suitable for a subsequent eval -# ii) func_quote_for_eval_unquoted_result -# has all characters that are still active within double -# quotes backslashified. -func_quote_for_eval () -{ - $debug_cmd - - func_quote_for_eval_unquoted_result= - func_quote_for_eval_result= - while test 0 -lt $#; do - case $1 in - *[\\\`\"\$]*) - _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; - *) - _G_unquoted_arg=$1 ;; - esac - if test -n "$func_quote_for_eval_unquoted_result"; then - func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" - else - func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" - fi - - case $_G_unquoted_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and variable expansion - # for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - _G_quoted_arg=\"$_G_unquoted_arg\" - ;; - *) - _G_quoted_arg=$_G_unquoted_arg - ;; - esac - - if test -n "$func_quote_for_eval_result"; then - func_append func_quote_for_eval_result " $_G_quoted_arg" - else - func_append func_quote_for_eval_result "$_G_quoted_arg" - fi - shift - done -} - - -# func_quote_for_expand ARG -# ------------------------- -# Aesthetically quote ARG to be evaled later; same as above, -# but do not quote variable references. -func_quote_for_expand () -{ - $debug_cmd - - case $1 in - *[\\\`\"]*) - _G_arg=`$ECHO "$1" | $SED \ - -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; - *) - _G_arg=$1 ;; - esac - - case $_G_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting and command substitution for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - _G_arg=\"$_G_arg\" - ;; - esac - - func_quote_for_expand_result=$_G_arg -} - - -# func_stripname PREFIX SUFFIX NAME -# --------------------------------- -# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -if test yes = "$_G_HAVE_XSI_OPS"; then - eval 'func_stripname () - { - $debug_cmd - - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary variable first. - func_stripname_result=$3 - func_stripname_result=${func_stripname_result#"$1"} - func_stripname_result=${func_stripname_result%"$2"} - }' -else - func_stripname () - { - $debug_cmd - - case $2 in - .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; - *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; - esac - } -fi - - -# func_show_eval CMD [FAIL_EXP] -# ----------------------------- -# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. -func_show_eval () -{ - $debug_cmd - - _G_cmd=$1 - _G_fail_exp=${2-':'} - - func_quote_for_expand "$_G_cmd" - eval "func_notquiet $func_quote_for_expand_result" - - $opt_dry_run || { - eval "$_G_cmd" - _G_status=$? - if test 0 -ne "$_G_status"; then - eval "(exit $_G_status); $_G_fail_exp" - fi - } -} - - -# func_show_eval_locale CMD [FAIL_EXP] -# ------------------------------------ -# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. Use the saved locale for evaluation. -func_show_eval_locale () -{ - $debug_cmd - - _G_cmd=$1 - _G_fail_exp=${2-':'} - - $opt_quiet || { - func_quote_for_expand "$_G_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - $opt_dry_run || { - eval "$_G_user_locale - $_G_cmd" - _G_status=$? - eval "$_G_safe_locale" - if test 0 -ne "$_G_status"; then - eval "(exit $_G_status); $_G_fail_exp" - fi - } -} - - -# func_tr_sh -# ---------- -# Turn $1 into a string suitable for a shell variable name. -# Result is stored in $func_tr_sh_result. All characters -# not in the set a-zA-Z0-9_ are replaced with '_'. Further, -# if $1 begins with a digit, a '_' is prepended as well. -func_tr_sh () -{ - $debug_cmd - - case $1 in - [0-9]* | *[!a-zA-Z0-9_]*) - func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` - ;; - * ) - func_tr_sh_result=$1 - ;; - esac -} - - -# func_verbose ARG... -# ------------------- -# Echo program name prefixed message in verbose mode only. -func_verbose () -{ - $debug_cmd - - $opt_verbose && func_echo "$*" - - : -} - - -# func_warn_and_continue ARG... -# ----------------------------- -# Echo program name prefixed warning message to standard error. -func_warn_and_continue () -{ - $debug_cmd - - $require_term_colors - - func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 -} - - -# func_warning CATEGORY ARG... -# ---------------------------- -# Echo program name prefixed warning message to standard error. Warning -# messages can be filtered according to CATEGORY, where this function -# elides messages where CATEGORY is not listed in the global variable -# 'opt_warning_types'. -func_warning () -{ - $debug_cmd - - # CATEGORY must be in the warning_categories list! - case " $warning_categories " in - *" $1 "*) ;; - *) func_internal_error "invalid warning category '$1'" ;; - esac - - _G_category=$1 - shift - - case " $opt_warning_types " in - *" $_G_category "*) $warning_func ${1+"$@"} ;; - esac -} - - -# func_sort_ver VER1 VER2 -# ----------------------- -# 'sort -V' is not generally available. -# Note this deviates from the version comparison in automake -# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a -# but this should suffice as we won't be specifying old -# version formats or redundant trailing .0 in bootstrap.conf. -# If we did want full compatibility then we should probably -# use m4_version_compare from autoconf. -func_sort_ver () -{ - $debug_cmd - - printf '%s\n%s\n' "$1" "$2" \ - | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n -} - -# func_lt_ver PREV CURR -# --------------------- -# Return true if PREV and CURR are in the correct order according to -# func_sort_ver, otherwise false. Use it like this: -# -# func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." -func_lt_ver () -{ - $debug_cmd - - test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` -} - - -# Local variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" -# time-stamp-time-zone: "UTC" -# End: -#! /bin/sh - -# Set a version string for this script. -scriptversion=2014-01-07.03; # UTC - -# A portable, pluggable option parser for Bourne shell. -# Written by Gary V. Vaughan, 2010 - -# Copyright (C) 2010-2015 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Please report bugs or propose patches to gary@gnu.org. - - -## ------ ## -## Usage. ## -## ------ ## - -# This file is a library for parsing options in your shell scripts along -# with assorted other useful supporting features that you can make use -# of too. -# -# For the simplest scripts you might need only: -# -# #!/bin/sh -# . relative/path/to/funclib.sh -# . relative/path/to/options-parser -# scriptversion=1.0 -# func_options ${1+"$@"} -# eval set dummy "$func_options_result"; shift -# ...rest of your script... -# -# In order for the '--version' option to work, you will need to have a -# suitably formatted comment like the one at the top of this file -# starting with '# Written by ' and ending with '# warranty; '. -# -# For '-h' and '--help' to work, you will also need a one line -# description of your script's purpose in a comment directly above the -# '# Written by ' line, like the one at the top of this file. -# -# The default options also support '--debug', which will turn on shell -# execution tracing (see the comment above debug_cmd below for another -# use), and '--verbose' and the func_verbose function to allow your script -# to display verbose messages only when your user has specified -# '--verbose'. -# -# After sourcing this file, you can plug processing for additional -# options by amending the variables from the 'Configuration' section -# below, and following the instructions in the 'Option parsing' -# section further down. - -## -------------- ## -## Configuration. ## -## -------------- ## - -# You should override these variables in your script after sourcing this -# file so that they reflect the customisations you have added to the -# option parser. - -# The usage line for option parsing errors and the start of '-h' and -# '--help' output messages. You can embed shell variables for delayed -# expansion at the time the message is displayed, but you will need to -# quote other shell meta-characters carefully to prevent them being -# expanded when the contents are evaled. -usage='$progpath [OPTION]...' - -# Short help message in response to '-h' and '--help'. Add to this or -# override it after sourcing this library to reflect the full set of -# options your script accepts. -usage_message="\ - --debug enable verbose shell tracing - -W, --warnings=CATEGORY - report the warnings falling in CATEGORY [all] - -v, --verbose verbosely report processing - --version print version information and exit - -h, --help print short or long help message and exit -" - -# Additional text appended to 'usage_message' in response to '--help'. -long_help_message=" -Warning categories include: - 'all' show all warnings - 'none' turn off all the warnings - 'error' warnings are treated as fatal errors" - -# Help message printed before fatal option parsing errors. -fatal_help="Try '\$progname --help' for more information." - - - -## ------------------------- ## -## Hook function management. ## -## ------------------------- ## - -# This section contains functions for adding, removing, and running hooks -# to the main code. A hook is just a named list of of function, that can -# be run in order later on. - -# func_hookable FUNC_NAME -# ----------------------- -# Declare that FUNC_NAME will run hooks added with -# 'func_add_hook FUNC_NAME ...'. -func_hookable () -{ - $debug_cmd - - func_append hookable_fns " $1" -} - - -# func_add_hook FUNC_NAME HOOK_FUNC -# --------------------------------- -# Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must -# first have been declared "hookable" by a call to 'func_hookable'. -func_add_hook () -{ - $debug_cmd - - case " $hookable_fns " in - *" $1 "*) ;; - *) func_fatal_error "'$1' does not accept hook functions." ;; - esac - - eval func_append ${1}_hooks '" $2"' -} - - -# func_remove_hook FUNC_NAME HOOK_FUNC -# ------------------------------------ -# Remove HOOK_FUNC from the list of functions called by FUNC_NAME. -func_remove_hook () -{ - $debug_cmd - - eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' -} - - -# func_run_hooks FUNC_NAME [ARG]... -# --------------------------------- -# Run all hook functions registered to FUNC_NAME. -# It is assumed that the list of hook functions contains nothing more -# than a whitespace-delimited list of legal shell function names, and -# no effort is wasted trying to catch shell meta-characters or preserve -# whitespace. -func_run_hooks () -{ - $debug_cmd - - case " $hookable_fns " in - *" $1 "*) ;; - *) func_fatal_error "'$1' does not support hook functions.n" ;; - esac - - eval _G_hook_fns=\$$1_hooks; shift - - for _G_hook in $_G_hook_fns; do - eval $_G_hook '"$@"' - - # store returned options list back into positional - # parameters for next 'cmd' execution. - eval _G_hook_result=\$${_G_hook}_result - eval set dummy "$_G_hook_result"; shift - done - - func_quote_for_eval ${1+"$@"} - func_run_hooks_result=$func_quote_for_eval_result -} - - - -## --------------- ## -## Option parsing. ## -## --------------- ## - -# In order to add your own option parsing hooks, you must accept the -# full positional parameter list in your hook function, remove any -# options that you action, and then pass back the remaining unprocessed -# options in '_result', escaped suitably for -# 'eval'. Like this: -# -# my_options_prep () -# { -# $debug_cmd -# -# # Extend the existing usage message. -# usage_message=$usage_message' -# -s, --silent don'\''t print informational messages -# ' -# -# func_quote_for_eval ${1+"$@"} -# my_options_prep_result=$func_quote_for_eval_result -# } -# func_add_hook func_options_prep my_options_prep -# -# -# my_silent_option () -# { -# $debug_cmd -# -# # Note that for efficiency, we parse as many options as we can -# # recognise in a loop before passing the remainder back to the -# # caller on the first unrecognised argument we encounter. -# while test $# -gt 0; do -# opt=$1; shift -# case $opt in -# --silent|-s) opt_silent=: ;; -# # Separate non-argument short options: -# -s*) func_split_short_opt "$_G_opt" -# set dummy "$func_split_short_opt_name" \ -# "-$func_split_short_opt_arg" ${1+"$@"} -# shift -# ;; -# *) set dummy "$_G_opt" "$*"; shift; break ;; -# esac -# done -# -# func_quote_for_eval ${1+"$@"} -# my_silent_option_result=$func_quote_for_eval_result -# } -# func_add_hook func_parse_options my_silent_option -# -# -# my_option_validation () -# { -# $debug_cmd -# -# $opt_silent && $opt_verbose && func_fatal_help "\ -# '--silent' and '--verbose' options are mutually exclusive." -# -# func_quote_for_eval ${1+"$@"} -# my_option_validation_result=$func_quote_for_eval_result -# } -# func_add_hook func_validate_options my_option_validation -# -# You'll also need to manually amend $usage_message to reflect the extra -# options you parse. It's preferable to append if you can, so that -# multiple option parsing hooks can be added safely. - - -# func_options [ARG]... -# --------------------- -# All the functions called inside func_options are hookable. See the -# individual implementations for details. -func_hookable func_options -func_options () -{ - $debug_cmd - - func_options_prep ${1+"$@"} - eval func_parse_options \ - ${func_options_prep_result+"$func_options_prep_result"} - eval func_validate_options \ - ${func_parse_options_result+"$func_parse_options_result"} - - eval func_run_hooks func_options \ - ${func_validate_options_result+"$func_validate_options_result"} - - # save modified positional parameters for caller - func_options_result=$func_run_hooks_result -} - - -# func_options_prep [ARG]... -# -------------------------- -# All initialisations required before starting the option parse loop. -# Note that when calling hook functions, we pass through the list of -# positional parameters. If a hook function modifies that list, and -# needs to propagate that back to rest of this script, then the complete -# modified list must be put in 'func_run_hooks_result' before -# returning. -func_hookable func_options_prep -func_options_prep () -{ - $debug_cmd - - # Option defaults: - opt_verbose=false - opt_warning_types= - - func_run_hooks func_options_prep ${1+"$@"} - - # save modified positional parameters for caller - func_options_prep_result=$func_run_hooks_result -} - - -# func_parse_options [ARG]... -# --------------------------- -# The main option parsing loop. -func_hookable func_parse_options -func_parse_options () -{ - $debug_cmd - - func_parse_options_result= - - # this just eases exit handling - while test $# -gt 0; do - # Defer to hook functions for initial option parsing, so they - # get priority in the event of reusing an option name. - func_run_hooks func_parse_options ${1+"$@"} - - # Adjust func_parse_options positional parameters to match - eval set dummy "$func_run_hooks_result"; shift - - # Break out of the loop if we already parsed every option. - test $# -gt 0 || break - - _G_opt=$1 - shift - case $_G_opt in - --debug|-x) debug_cmd='set -x' - func_echo "enabling shell trace mode" - $debug_cmd - ;; - - --no-warnings|--no-warning|--no-warn) - set dummy --warnings none ${1+"$@"} - shift - ;; - - --warnings|--warning|-W) - test $# = 0 && func_missing_arg $_G_opt && break - case " $warning_categories $1" in - *" $1 "*) - # trailing space prevents matching last $1 above - func_append_uniq opt_warning_types " $1" - ;; - *all) - opt_warning_types=$warning_categories - ;; - *none) - opt_warning_types=none - warning_func=: - ;; - *error) - opt_warning_types=$warning_categories - warning_func=func_fatal_error - ;; - *) - func_fatal_error \ - "unsupported warning category: '$1'" - ;; - esac - shift - ;; - - --verbose|-v) opt_verbose=: ;; - --version) func_version ;; - -\?|-h) func_usage ;; - --help) func_help ;; - - # Separate optargs to long options (plugins may need this): - --*=*) func_split_equals "$_G_opt" - set dummy "$func_split_equals_lhs" \ - "$func_split_equals_rhs" ${1+"$@"} - shift - ;; - - # Separate optargs to short options: - -W*) - func_split_short_opt "$_G_opt" - set dummy "$func_split_short_opt_name" \ - "$func_split_short_opt_arg" ${1+"$@"} - shift - ;; - - # Separate non-argument short options: - -\?*|-h*|-v*|-x*) - func_split_short_opt "$_G_opt" - set dummy "$func_split_short_opt_name" \ - "-$func_split_short_opt_arg" ${1+"$@"} - shift - ;; - - --) break ;; - -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; - esac - done - - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - func_parse_options_result=$func_quote_for_eval_result -} - - -# func_validate_options [ARG]... -# ------------------------------ -# Perform any sanity checks on option settings and/or unconsumed -# arguments. -func_hookable func_validate_options -func_validate_options () -{ - $debug_cmd - - # Display all warnings if -W was not given. - test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" - - func_run_hooks func_validate_options ${1+"$@"} - - # Bail if the options were screwed! - $exit_cmd $EXIT_FAILURE - - # save modified positional parameters for caller - func_validate_options_result=$func_run_hooks_result -} - - - -## ----------------- ## -## Helper functions. ## -## ----------------- ## - -# This section contains the helper functions used by the rest of the -# hookable option parser framework in ascii-betical order. - - -# func_fatal_help ARG... -# ---------------------- -# Echo program name prefixed message to standard error, followed by -# a help hint, and exit. -func_fatal_help () -{ - $debug_cmd - - eval \$ECHO \""Usage: $usage"\" - eval \$ECHO \""$fatal_help"\" - func_error ${1+"$@"} - exit $EXIT_FAILURE -} - - -# func_help -# --------- -# Echo long help message to standard output and exit. -func_help () -{ - $debug_cmd - - func_usage_message - $ECHO "$long_help_message" - exit 0 -} - - -# func_missing_arg ARGNAME -# ------------------------ -# Echo program name prefixed message to standard error and set global -# exit_cmd. -func_missing_arg () -{ - $debug_cmd - - func_error "Missing argument for '$1'." - exit_cmd=exit -} - - -# func_split_equals STRING -# ------------------------ -# Set func_split_equals_lhs and func_split_equals_rhs shell variables after -# splitting STRING at the '=' sign. -test -z "$_G_HAVE_XSI_OPS" \ - && (eval 'x=a/b/c; - test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ - && _G_HAVE_XSI_OPS=yes - -if test yes = "$_G_HAVE_XSI_OPS" -then - # This is an XSI compatible shell, allowing a faster implementation... - eval 'func_split_equals () - { - $debug_cmd - - func_split_equals_lhs=${1%%=*} - func_split_equals_rhs=${1#*=} - test "x$func_split_equals_lhs" = "x$1" \ - && func_split_equals_rhs= - }' -else - # ...otherwise fall back to using expr, which is often a shell builtin. - func_split_equals () - { - $debug_cmd - - func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` - func_split_equals_rhs= - test "x$func_split_equals_lhs" = "x$1" \ - || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` - } -fi #func_split_equals - - -# func_split_short_opt SHORTOPT -# ----------------------------- -# Set func_split_short_opt_name and func_split_short_opt_arg shell -# variables after splitting SHORTOPT after the 2nd character. -if test yes = "$_G_HAVE_XSI_OPS" -then - # This is an XSI compatible shell, allowing a faster implementation... - eval 'func_split_short_opt () - { - $debug_cmd - - func_split_short_opt_arg=${1#??} - func_split_short_opt_name=${1%"$func_split_short_opt_arg"} - }' -else - # ...otherwise fall back to using expr, which is often a shell builtin. - func_split_short_opt () - { - $debug_cmd - - func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` - func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` - } -fi #func_split_short_opt - - -# func_usage -# ---------- -# Echo short help message to standard output and exit. -func_usage () -{ - $debug_cmd - - func_usage_message - $ECHO "Run '$progname --help |${PAGER-more}' for full usage" - exit 0 -} - - -# func_usage_message -# ------------------ -# Echo short help message to standard output. -func_usage_message () -{ - $debug_cmd - - eval \$ECHO \""Usage: $usage"\" - echo - $SED -n 's|^# || - /^Written by/{ - x;p;x - } - h - /^Written by/q' < "$progpath" - echo - eval \$ECHO \""$usage_message"\" -} - - -# func_version -# ------------ -# Echo version message to standard output and exit. -func_version () -{ - $debug_cmd - - printf '%s\n' "$progname $scriptversion" - $SED -n ' - /(C)/!b go - :more - /\./!{ - N - s|\n# | | - b more - } - :go - /^# Written by /,/# warranty; / { - s|^# || - s|^# *$|| - s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| - p - } - /^# Written by / { - s|^# || - p - } - /^warranty; /q' < "$progpath" - - exit $? -} - - -# Local variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" -# time-stamp-time-zone: "UTC" -# End: - -# Set a version string. -scriptversion='(GNU libtool) 2.4.6' - - -# func_echo ARG... -# ---------------- -# Libtool also displays the current mode in messages, so override -# funclib.sh func_echo with this custom definition. -func_echo () -{ - $debug_cmd - - _G_message=$* - - func_echo_IFS=$IFS - IFS=$nl - for _G_line in $_G_message; do - IFS=$func_echo_IFS - $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" - done - IFS=$func_echo_IFS -} - - -# func_warning ARG... -# ------------------- -# Libtool warnings are not categorized, so override funclib.sh -# func_warning with this simpler definition. -func_warning () -{ - $debug_cmd - - $warning_func ${1+"$@"} -} - - -## ---------------- ## -## Options parsing. ## -## ---------------- ## - -# Hook in the functions to make sure our own options are parsed during -# the option parsing loop. - -usage='$progpath [OPTION]... [MODE-ARG]...' - -# Short help message in response to '-h'. -usage_message="Options: - --config show all configuration variables - --debug enable verbose shell tracing - -n, --dry-run display commands without modifying any files - --features display basic configuration information and exit - --mode=MODE use operation mode MODE - --no-warnings equivalent to '-Wnone' - --preserve-dup-deps don't remove duplicate dependency libraries - --quiet, --silent don't print informational messages - --tag=TAG use configuration variables from tag TAG - -v, --verbose print more informational messages than default - --version print version information - -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] - -h, --help, --help-all print short, long, or detailed help message -" - -# Additional text appended to 'usage_message' in response to '--help'. -func_help () -{ - $debug_cmd - - func_usage_message - $ECHO "$long_help_message - -MODE must be one of the following: - - clean remove files from the build directory - compile compile a source file into a libtool object - execute automatically set library path, then run a program - finish complete the installation of libtool libraries - install install libraries or executables - link create a library or an executable - uninstall remove libraries from an installed directory - -MODE-ARGS vary depending on the MODE. When passed as first option, -'--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. -Try '$progname --help --mode=MODE' for a more detailed description of MODE. - -When reporting a bug, please describe a test case to reproduce it and -include the following information: - - host-triplet: $host - shell: $SHELL - compiler: $LTCC - compiler flags: $LTCFLAGS - linker: $LD (gnu? $with_gnu_ld) - version: $progname (GNU libtool) 2.4.6 - automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` - autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` - -Report bugs to . -GNU libtool home page: . -General help using GNU software: ." - exit 0 -} - - -# func_lo2o OBJECT-NAME -# --------------------- -# Transform OBJECT-NAME from a '.lo' suffix to the platform specific -# object suffix. - -lo2o=s/\\.lo\$/.$objext/ -o2lo=s/\\.$objext\$/.lo/ - -if test yes = "$_G_HAVE_XSI_OPS"; then - eval 'func_lo2o () - { - case $1 in - *.lo) func_lo2o_result=${1%.lo}.$objext ;; - * ) func_lo2o_result=$1 ;; - esac - }' - - # func_xform LIBOBJ-OR-SOURCE - # --------------------------- - # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) - # suffix to a '.lo' libtool-object suffix. - eval 'func_xform () - { - func_xform_result=${1%.*}.lo - }' -else - # ...otherwise fall back to using sed. - func_lo2o () - { - func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` - } - - func_xform () - { - func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` - } -fi - - -# func_fatal_configuration ARG... -# ------------------------------- -# Echo program name prefixed message to standard error, followed by -# a configuration failure hint, and exit. -func_fatal_configuration () -{ - func__fatal_error ${1+"$@"} \ - "See the $PACKAGE documentation for more information." \ - "Fatal configuration error." -} - - -# func_config -# ----------- -# Display the configuration for all the tags in this script. -func_config () -{ - re_begincf='^# ### BEGIN LIBTOOL' - re_endcf='^# ### END LIBTOOL' - - # Default configuration. - $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" - - # Now print the configurations for the tags. - for tagname in $taglist; do - $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" - done - - exit $? -} - - -# func_features -# ------------- -# Display the features supported by this script. -func_features () -{ - echo "host: $host" - if test yes = "$build_libtool_libs"; then - echo "enable shared libraries" - else - echo "disable shared libraries" - fi - if test yes = "$build_old_libs"; then - echo "enable static libraries" - else - echo "disable static libraries" - fi - - exit $? -} - - -# func_enable_tag TAGNAME -# ----------------------- -# Verify that TAGNAME is valid, and either flag an error and exit, or -# enable the TAGNAME tag. We also add TAGNAME to the global $taglist -# variable here. -func_enable_tag () -{ - # Global variable: - tagname=$1 - - re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" - re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" - sed_extractcf=/$re_begincf/,/$re_endcf/p - - # Validate tagname. - case $tagname in - *[!-_A-Za-z0-9,/]*) - func_fatal_error "invalid tag name: $tagname" - ;; - esac - - # Don't test for the "default" C tag, as we know it's - # there but not specially marked. - case $tagname in - CC) ;; - *) - if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then - taglist="$taglist $tagname" - - # Evaluate the configuration. Be careful to quote the path - # and the sed script, to avoid splitting on whitespace, but - # also don't use non-portable quotes within backquotes within - # quotes we have to do it in 2 steps: - extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` - eval "$extractedcf" - else - func_error "ignoring unknown tag $tagname" - fi - ;; - esac -} - - -# func_check_version_match -# ------------------------ -# Ensure that we are using m4 macros, and libtool script from the same -# release of libtool. -func_check_version_match () -{ - if test "$package_revision" != "$macro_revision"; then - if test "$VERSION" != "$macro_version"; then - if test -z "$macro_version"; then - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from an older release. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - fi - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, -$progname: but the definition of this LT_INIT comes from revision $macro_revision. -$progname: You should recreate aclocal.m4 with macros from revision $package_revision -$progname: of $PACKAGE $VERSION and run autoconf again. -_LT_EOF - fi - - exit $EXIT_MISMATCH - fi -} - - -# libtool_options_prep [ARG]... -# ----------------------------- -# Preparation for options parsed by libtool. -libtool_options_prep () -{ - $debug_mode - - # Option defaults: - opt_config=false - opt_dlopen= - opt_dry_run=false - opt_help=false - opt_mode= - opt_preserve_dup_deps=false - opt_quiet=false - - nonopt= - preserve_args= - - # Shorthand for --mode=foo, only valid as the first argument - case $1 in - clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; - compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; - execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; - finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; - install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; - link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; - uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; - esac - - # Pass back the list of options. - func_quote_for_eval ${1+"$@"} - libtool_options_prep_result=$func_quote_for_eval_result -} -func_add_hook func_options_prep libtool_options_prep - - -# libtool_parse_options [ARG]... -# --------------------------------- -# Provide handling for libtool specific options. -libtool_parse_options () -{ - $debug_cmd - - # Perform our own loop to consume as many options as possible in - # each iteration. - while test $# -gt 0; do - _G_opt=$1 - shift - case $_G_opt in - --dry-run|--dryrun|-n) - opt_dry_run=: - ;; - - --config) func_config ;; - - --dlopen|-dlopen) - opt_dlopen="${opt_dlopen+$opt_dlopen -}$1" - shift - ;; - - --preserve-dup-deps) - opt_preserve_dup_deps=: ;; - - --features) func_features ;; - - --finish) set dummy --mode finish ${1+"$@"}; shift ;; - - --help) opt_help=: ;; - - --help-all) opt_help=': help-all' ;; - - --mode) test $# = 0 && func_missing_arg $_G_opt && break - opt_mode=$1 - case $1 in - # Valid mode arguments: - clean|compile|execute|finish|install|link|relink|uninstall) ;; - - # Catch anything else as an error - *) func_error "invalid argument for $_G_opt" - exit_cmd=exit - break - ;; - esac - shift - ;; - - --no-silent|--no-quiet) - opt_quiet=false - func_append preserve_args " $_G_opt" - ;; - - --no-warnings|--no-warning|--no-warn) - opt_warning=false - func_append preserve_args " $_G_opt" - ;; - - --no-verbose) - opt_verbose=false - func_append preserve_args " $_G_opt" - ;; - - --silent|--quiet) - opt_quiet=: - opt_verbose=false - func_append preserve_args " $_G_opt" - ;; - - --tag) test $# = 0 && func_missing_arg $_G_opt && break - opt_tag=$1 - func_append preserve_args " $_G_opt $1" - func_enable_tag "$1" - shift - ;; - - --verbose|-v) opt_quiet=false - opt_verbose=: - func_append preserve_args " $_G_opt" - ;; - - # An option not handled by this hook function: - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; - esac - done - - - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - libtool_parse_options_result=$func_quote_for_eval_result -} -func_add_hook func_parse_options libtool_parse_options - - - -# libtool_validate_options [ARG]... -# --------------------------------- -# Perform any sanity checks on option settings and/or unconsumed -# arguments. -libtool_validate_options () -{ - # save first non-option argument - if test 0 -lt $#; then - nonopt=$1 - shift - fi - - # preserve --debug - test : = "$debug_cmd" || func_append preserve_args " --debug" - - case $host in - # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 - # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 - *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; - *) - opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps - ;; - esac - - $opt_help || { - # Sanity checks first: - func_check_version_match - - test yes != "$build_libtool_libs" \ - && test yes != "$build_old_libs" \ - && func_fatal_configuration "not configured to build any kind of library" - - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$opt_dlopen" && test execute != "$opt_mode"; then - func_error "unrecognized option '-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help=$help - help="Try '$progname --help --mode=$opt_mode' for more information." - } - - # Pass back the unparsed argument list - func_quote_for_eval ${1+"$@"} - libtool_validate_options_result=$func_quote_for_eval_result -} -func_add_hook func_validate_options libtool_validate_options - - -# Process options as early as possible so that --help and --version -# can return quickly. -func_options ${1+"$@"} -eval set dummy "$func_options_result"; shift - - - -## ----------- ## -## Main. ## -## ----------- ## - -magic='%%%MAGIC variable%%%' -magic_exe='%%%MAGIC EXE variable%%%' - -# Global variables. -extracted_archives= -extracted_serial=0 - -# If this variable is set in any of the actions, the command in it -# will be execed at the end. This prevents here-documents from being -# left over by shells. -exec_cmd= - - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' -} - -# func_generated_by_libtool -# True iff stdin has been generated by Libtool. This function is only -# a basic sanity check; it will hardly flush out determined imposters. -func_generated_by_libtool_p () -{ - $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 -} - -# func_lalib_p file -# True iff FILE is a libtool '.la' library or '.lo' object file. -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_lalib_p () -{ - test -f "$1" && - $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p -} - -# func_lalib_unsafe_p file -# True iff FILE is a libtool '.la' library or '.lo' object file. -# This function implements the same check as func_lalib_p without -# resorting to external programs. To this end, it redirects stdin and -# closes it afterwards, without saving the original file descriptor. -# As a safety measure, use it only where a negative result would be -# fatal anyway. Works if 'file' does not exist. -func_lalib_unsafe_p () -{ - lalib_p=no - if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then - for lalib_p_l in 1 2 3 4 - do - read lalib_p_line - case $lalib_p_line in - \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; - esac - done - exec 0<&5 5<&- - fi - test yes = "$lalib_p" -} - -# func_ltwrapper_script_p file -# True iff FILE is a libtool wrapper script -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_script_p () -{ - test -f "$1" && - $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p -} - -# func_ltwrapper_executable_p file -# True iff FILE is a libtool wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_executable_p () -{ - func_ltwrapper_exec_suffix= - case $1 in - *.exe) ;; - *) func_ltwrapper_exec_suffix=.exe ;; - esac - $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 -} - -# func_ltwrapper_scriptname file -# Assumes file is an ltwrapper_executable -# uses $file to determine the appropriate filename for a -# temporary ltwrapper_script. -func_ltwrapper_scriptname () -{ - func_dirname_and_basename "$1" "" "." - func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper -} - -# func_ltwrapper_p file -# True iff FILE is a libtool wrapper script or wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_p () -{ - func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" -} - - -# func_execute_cmds commands fail_cmd -# Execute tilde-delimited COMMANDS. -# If FAIL_CMD is given, eval that upon failure. -# FAIL_CMD may read-access the current command in variable CMD! -func_execute_cmds () -{ - $debug_cmd - - save_ifs=$IFS; IFS='~' - for cmd in $1; do - IFS=$sp$nl - eval cmd=\"$cmd\" - IFS=$save_ifs - func_show_eval "$cmd" "${2-:}" - done - IFS=$save_ifs -} - - -# func_source file -# Source FILE, adding directory component if necessary. -# Note that it is not necessary on cygwin/mingw to append a dot to -# FILE even if both FILE and FILE.exe exist: automatic-append-.exe -# behavior happens only for exec(3), not for open(2)! Also, sourcing -# 'FILE.' does not work on cygwin managed mounts. -func_source () -{ - $debug_cmd - - case $1 in - */* | *\\*) . "$1" ;; - *) . "./$1" ;; - esac -} - - -# func_resolve_sysroot PATH -# Replace a leading = in PATH with a sysroot. Store the result into -# func_resolve_sysroot_result -func_resolve_sysroot () -{ - func_resolve_sysroot_result=$1 - case $func_resolve_sysroot_result in - =*) - func_stripname '=' '' "$func_resolve_sysroot_result" - func_resolve_sysroot_result=$lt_sysroot$func_stripname_result - ;; - esac -} - -# func_replace_sysroot PATH -# If PATH begins with the sysroot, replace it with = and -# store the result into func_replace_sysroot_result. -func_replace_sysroot () -{ - case $lt_sysroot:$1 in - ?*:"$lt_sysroot"*) - func_stripname "$lt_sysroot" '' "$1" - func_replace_sysroot_result='='$func_stripname_result - ;; - *) - # Including no sysroot. - func_replace_sysroot_result=$1 - ;; - esac -} - -# func_infer_tag arg -# Infer tagged configuration to use if any are available and -# if one wasn't chosen via the "--tag" command line option. -# Only attempt this if the compiler in the base compile -# command doesn't match the default compiler. -# arg is usually of the form 'gcc ...' -func_infer_tag () -{ - $debug_cmd - - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do - func_append_quoted CC_quoted "$arg" - done - CC_expanded=`func_echo_all $CC` - CC_quoted_expanded=`func_echo_all $CC_quoted` - case $@ in - # Blanks in the command may have been stripped by the calling shell, - # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ - " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; - # Blanks at the start of $base_compile will cause this to fail - # if we don't check for them as well. - *) - for z in $available_tags; do - if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then - # Evaluate the configuration. - eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. - func_append_quoted CC_quoted "$arg" - done - CC_expanded=`func_echo_all $CC` - CC_quoted_expanded=`func_echo_all $CC_quoted` - case "$@ " in - " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ - " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - func_echo "unable to infer tagged configuration" - func_fatal_error "specify a tag with '--tag'" -# else -# func_verbose "using $tagname tagged configuration" - fi - ;; - esac - fi -} - - - -# func_write_libtool_object output_name pic_name nonpic_name -# Create a libtool object file (analogous to a ".la" file), -# but don't create it if we're doing a dry run. -func_write_libtool_object () -{ - write_libobj=$1 - if test yes = "$build_libtool_libs"; then - write_lobj=\'$2\' - else - write_lobj=none - fi - - if test yes = "$build_old_libs"; then - write_oldobj=\'$3\' - else - write_oldobj=none - fi - - $opt_dry_run || { - cat >${write_libobj}T </dev/null` - if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then - func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | - $SED -e "$sed_naive_backslashify"` - else - func_convert_core_file_wine_to_w32_result= - fi - fi -} -# end: func_convert_core_file_wine_to_w32 - - -# func_convert_core_path_wine_to_w32 ARG -# Helper function used by path conversion functions when $build is *nix, and -# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly -# configured wine environment available, with the winepath program in $build's -# $PATH. Assumes ARG has no leading or trailing path separator characters. -# -# ARG is path to be converted from $build format to win32. -# Result is available in $func_convert_core_path_wine_to_w32_result. -# Unconvertible file (directory) names in ARG are skipped; if no directory names -# are convertible, then the result may be empty. -func_convert_core_path_wine_to_w32 () -{ - $debug_cmd - - # unfortunately, winepath doesn't convert paths, only file names - func_convert_core_path_wine_to_w32_result= - if test -n "$1"; then - oldIFS=$IFS - IFS=: - for func_convert_core_path_wine_to_w32_f in $1; do - IFS=$oldIFS - func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" - if test -n "$func_convert_core_file_wine_to_w32_result"; then - if test -z "$func_convert_core_path_wine_to_w32_result"; then - func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result - else - func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" - fi - fi - done - IFS=$oldIFS - fi -} -# end: func_convert_core_path_wine_to_w32 - - -# func_cygpath ARGS... -# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when -# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) -# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or -# (2), returns the Cygwin file name or path in func_cygpath_result (input -# file name or path is assumed to be in w32 format, as previously converted -# from $build's *nix or MSYS format). In case (3), returns the w32 file name -# or path in func_cygpath_result (input file name or path is assumed to be in -# Cygwin format). Returns an empty string on error. -# -# ARGS are passed to cygpath, with the last one being the file name or path to -# be converted. -# -# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH -# environment variable; do not put it in $PATH. -func_cygpath () -{ - $debug_cmd - - if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then - func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` - if test "$?" -ne 0; then - # on failure, ensure result is empty - func_cygpath_result= - fi - else - func_cygpath_result= - func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" - fi -} -#end: func_cygpath - - -# func_convert_core_msys_to_w32 ARG -# Convert file name or path ARG from MSYS format to w32 format. Return -# result in func_convert_core_msys_to_w32_result. -func_convert_core_msys_to_w32 () -{ - $debug_cmd - - # awkward: cmd appends spaces to result - func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | - $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` -} -#end: func_convert_core_msys_to_w32 - - -# func_convert_file_check ARG1 ARG2 -# Verify that ARG1 (a file name in $build format) was converted to $host -# format in ARG2. Otherwise, emit an error message, but continue (resetting -# func_to_host_file_result to ARG1). -func_convert_file_check () -{ - $debug_cmd - - if test -z "$2" && test -n "$1"; then - func_error "Could not determine host file name corresponding to" - func_error " '$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback: - func_to_host_file_result=$1 - fi -} -# end func_convert_file_check - - -# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH -# Verify that FROM_PATH (a path in $build format) was converted to $host -# format in TO_PATH. Otherwise, emit an error message, but continue, resetting -# func_to_host_file_result to a simplistic fallback value (see below). -func_convert_path_check () -{ - $debug_cmd - - if test -z "$4" && test -n "$3"; then - func_error "Could not determine the host path corresponding to" - func_error " '$3'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback. This is a deliberately simplistic "conversion" and - # should not be "improved". See libtool.info. - if test "x$1" != "x$2"; then - lt_replace_pathsep_chars="s|$1|$2|g" - func_to_host_path_result=`echo "$3" | - $SED -e "$lt_replace_pathsep_chars"` - else - func_to_host_path_result=$3 - fi - fi -} -# end func_convert_path_check - - -# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG -# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT -# and appending REPL if ORIG matches BACKPAT. -func_convert_path_front_back_pathsep () -{ - $debug_cmd - - case $4 in - $1 ) func_to_host_path_result=$3$func_to_host_path_result - ;; - esac - case $4 in - $2 ) func_append func_to_host_path_result "$3" - ;; - esac -} -# end func_convert_path_front_back_pathsep - - -################################################## -# $build to $host FILE NAME CONVERSION FUNCTIONS # -################################################## -# invoked via '$to_host_file_cmd ARG' -# -# In each case, ARG is the path to be converted from $build to $host format. -# Result will be available in $func_to_host_file_result. - - -# func_to_host_file ARG -# Converts the file name ARG from $build format to $host format. Return result -# in func_to_host_file_result. -func_to_host_file () -{ - $debug_cmd - - $to_host_file_cmd "$1" -} -# end func_to_host_file - - -# func_to_tool_file ARG LAZY -# converts the file name ARG from $build format to toolchain format. Return -# result in func_to_tool_file_result. If the conversion in use is listed -# in (the comma separated) LAZY, no conversion takes place. -func_to_tool_file () -{ - $debug_cmd - - case ,$2, in - *,"$to_tool_file_cmd",*) - func_to_tool_file_result=$1 - ;; - *) - $to_tool_file_cmd "$1" - func_to_tool_file_result=$func_to_host_file_result - ;; - esac -} -# end func_to_tool_file - - -# func_convert_file_noop ARG -# Copy ARG to func_to_host_file_result. -func_convert_file_noop () -{ - func_to_host_file_result=$1 -} -# end func_convert_file_noop - - -# func_convert_file_msys_to_w32 ARG -# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic -# conversion to w32 is not available inside the cwrapper. Returns result in -# func_to_host_file_result. -func_convert_file_msys_to_w32 () -{ - $debug_cmd - - func_to_host_file_result=$1 - if test -n "$1"; then - func_convert_core_msys_to_w32 "$1" - func_to_host_file_result=$func_convert_core_msys_to_w32_result - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_msys_to_w32 - - -# func_convert_file_cygwin_to_w32 ARG -# Convert file name ARG from Cygwin to w32 format. Returns result in -# func_to_host_file_result. -func_convert_file_cygwin_to_w32 () -{ - $debug_cmd - - func_to_host_file_result=$1 - if test -n "$1"; then - # because $build is cygwin, we call "the" cygpath in $PATH; no need to use - # LT_CYGPATH in this case. - func_to_host_file_result=`cygpath -m "$1"` - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_cygwin_to_w32 - - -# func_convert_file_nix_to_w32 ARG -# Convert file name ARG from *nix to w32 format. Requires a wine environment -# and a working winepath. Returns result in func_to_host_file_result. -func_convert_file_nix_to_w32 () -{ - $debug_cmd - - func_to_host_file_result=$1 - if test -n "$1"; then - func_convert_core_file_wine_to_w32 "$1" - func_to_host_file_result=$func_convert_core_file_wine_to_w32_result - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_nix_to_w32 - - -# func_convert_file_msys_to_cygwin ARG -# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. -# Returns result in func_to_host_file_result. -func_convert_file_msys_to_cygwin () -{ - $debug_cmd - - func_to_host_file_result=$1 - if test -n "$1"; then - func_convert_core_msys_to_w32 "$1" - func_cygpath -u "$func_convert_core_msys_to_w32_result" - func_to_host_file_result=$func_cygpath_result - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_msys_to_cygwin - - -# func_convert_file_nix_to_cygwin ARG -# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed -# in a wine environment, working winepath, and LT_CYGPATH set. Returns result -# in func_to_host_file_result. -func_convert_file_nix_to_cygwin () -{ - $debug_cmd - - func_to_host_file_result=$1 - if test -n "$1"; then - # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. - func_convert_core_file_wine_to_w32 "$1" - func_cygpath -u "$func_convert_core_file_wine_to_w32_result" - func_to_host_file_result=$func_cygpath_result - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_nix_to_cygwin - - -############################################# -# $build to $host PATH CONVERSION FUNCTIONS # -############################################# -# invoked via '$to_host_path_cmd ARG' -# -# In each case, ARG is the path to be converted from $build to $host format. -# The result will be available in $func_to_host_path_result. -# -# Path separators are also converted from $build format to $host format. If -# ARG begins or ends with a path separator character, it is preserved (but -# converted to $host format) on output. -# -# All path conversion functions are named using the following convention: -# file name conversion function : func_convert_file_X_to_Y () -# path conversion function : func_convert_path_X_to_Y () -# where, for any given $build/$host combination the 'X_to_Y' value is the -# same. If conversion functions are added for new $build/$host combinations, -# the two new functions must follow this pattern, or func_init_to_host_path_cmd -# will break. - - -# func_init_to_host_path_cmd -# Ensures that function "pointer" variable $to_host_path_cmd is set to the -# appropriate value, based on the value of $to_host_file_cmd. -to_host_path_cmd= -func_init_to_host_path_cmd () -{ - $debug_cmd - - if test -z "$to_host_path_cmd"; then - func_stripname 'func_convert_file_' '' "$to_host_file_cmd" - to_host_path_cmd=func_convert_path_$func_stripname_result - fi -} - - -# func_to_host_path ARG -# Converts the path ARG from $build format to $host format. Return result -# in func_to_host_path_result. -func_to_host_path () -{ - $debug_cmd - - func_init_to_host_path_cmd - $to_host_path_cmd "$1" -} -# end func_to_host_path - - -# func_convert_path_noop ARG -# Copy ARG to func_to_host_path_result. -func_convert_path_noop () -{ - func_to_host_path_result=$1 -} -# end func_convert_path_noop - - -# func_convert_path_msys_to_w32 ARG -# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic -# conversion to w32 is not available inside the cwrapper. Returns result in -# func_to_host_path_result. -func_convert_path_msys_to_w32 () -{ - $debug_cmd - - func_to_host_path_result=$1 - if test -n "$1"; then - # Remove leading and trailing path separator characters from ARG. MSYS - # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; - # and winepath ignores them completely. - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" - func_to_host_path_result=$func_convert_core_msys_to_w32_result - func_convert_path_check : ";" \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" - fi -} -# end func_convert_path_msys_to_w32 - - -# func_convert_path_cygwin_to_w32 ARG -# Convert path ARG from Cygwin to w32 format. Returns result in -# func_to_host_file_result. -func_convert_path_cygwin_to_w32 () -{ - $debug_cmd - - func_to_host_path_result=$1 - if test -n "$1"; then - # See func_convert_path_msys_to_w32: - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` - func_convert_path_check : ";" \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" - fi -} -# end func_convert_path_cygwin_to_w32 - - -# func_convert_path_nix_to_w32 ARG -# Convert path ARG from *nix to w32 format. Requires a wine environment and -# a working winepath. Returns result in func_to_host_file_result. -func_convert_path_nix_to_w32 () -{ - $debug_cmd - - func_to_host_path_result=$1 - if test -n "$1"; then - # See func_convert_path_msys_to_w32: - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" - func_to_host_path_result=$func_convert_core_path_wine_to_w32_result - func_convert_path_check : ";" \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" - fi -} -# end func_convert_path_nix_to_w32 - - -# func_convert_path_msys_to_cygwin ARG -# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. -# Returns result in func_to_host_file_result. -func_convert_path_msys_to_cygwin () -{ - $debug_cmd - - func_to_host_path_result=$1 - if test -n "$1"; then - # See func_convert_path_msys_to_w32: - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" - func_cygpath -u -p "$func_convert_core_msys_to_w32_result" - func_to_host_path_result=$func_cygpath_result - func_convert_path_check : : \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" : "$1" - fi -} -# end func_convert_path_msys_to_cygwin - - -# func_convert_path_nix_to_cygwin ARG -# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a -# a wine environment, working winepath, and LT_CYGPATH set. Returns result in -# func_to_host_file_result. -func_convert_path_nix_to_cygwin () -{ - $debug_cmd - - func_to_host_path_result=$1 - if test -n "$1"; then - # Remove leading and trailing path separator characters from - # ARG. msys behavior is inconsistent here, cygpath turns them - # into '.;' and ';.', and winepath ignores them completely. - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" - func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" - func_to_host_path_result=$func_cygpath_result - func_convert_path_check : : \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" : "$1" - fi -} -# end func_convert_path_nix_to_cygwin - - -# func_dll_def_p FILE -# True iff FILE is a Windows DLL '.def' file. -# Keep in sync with _LT_DLL_DEF_P in libtool.m4 -func_dll_def_p () -{ - $debug_cmd - - func_dll_def_p_tmp=`$SED -n \ - -e 's/^[ ]*//' \ - -e '/^\(;.*\)*$/d' \ - -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ - -e q \ - "$1"` - test DEF = "$func_dll_def_p_tmp" -} - - -# func_mode_compile arg... -func_mode_compile () -{ - $debug_cmd - - # Get the compilation command and the source file. - base_compile= - srcfile=$nonopt # always keep a non-empty value in "srcfile" - suppress_opt=yes - suppress_output= - arg_mode=normal - libobj= - later= - pie_flag= - - for arg - do - case $arg_mode in - arg ) - # do not "continue". Instead, add this to base_compile - lastarg=$arg - arg_mode=normal - ;; - - target ) - libobj=$arg - arg_mode=normal - continue - ;; - - normal ) - # Accept any command-line options. - case $arg in - -o) - test -n "$libobj" && \ - func_fatal_error "you cannot specify '-o' more than once" - arg_mode=target - continue - ;; - - -pie | -fpie | -fPIE) - func_append pie_flag " $arg" - continue - ;; - - -shared | -static | -prefer-pic | -prefer-non-pic) - func_append later " $arg" - continue - ;; - - -no-suppress) - suppress_opt=no - continue - ;; - - -Xcompiler) - arg_mode=arg # the next one goes into the "base_compile" arg list - continue # The current "srcfile" will either be retained or - ;; # replaced later. I would guess that would be a bug. - - -Wc,*) - func_stripname '-Wc,' '' "$arg" - args=$func_stripname_result - lastarg= - save_ifs=$IFS; IFS=, - for arg in $args; do - IFS=$save_ifs - func_append_quoted lastarg "$arg" - done - IFS=$save_ifs - func_stripname ' ' '' "$lastarg" - lastarg=$func_stripname_result - - # Add the arguments to base_compile. - func_append base_compile " $lastarg" - continue - ;; - - *) - # Accept the current argument as the source file. - # The previous "srcfile" becomes the current argument. - # - lastarg=$srcfile - srcfile=$arg - ;; - esac # case $arg - ;; - esac # case $arg_mode - - # Aesthetically quote the previous argument. - func_append_quoted base_compile "$lastarg" - done # for arg - - case $arg_mode in - arg) - func_fatal_error "you must specify an argument for -Xcompile" - ;; - target) - func_fatal_error "you must specify a target with '-o'" - ;; - *) - # Get the name of the library object. - test -z "$libobj" && { - func_basename "$srcfile" - libobj=$func_basename_result - } - ;; - esac - - # Recognize several different file suffixes. - # If the user specifies -o file.o, it is replaced with file.lo - case $libobj in - *.[cCFSifmso] | \ - *.ada | *.adb | *.ads | *.asm | \ - *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ - *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) - func_xform "$libobj" - libobj=$func_xform_result - ;; - esac - - case $libobj in - *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; - *) - func_fatal_error "cannot determine name of library object from '$libobj'" - ;; - esac - - func_infer_tag $base_compile - - for arg in $later; do - case $arg in - -shared) - test yes = "$build_libtool_libs" \ - || func_fatal_configuration "cannot build a shared library" - build_old_libs=no - continue - ;; - - -static) - build_libtool_libs=no - build_old_libs=yes - continue - ;; - - -prefer-pic) - pic_mode=yes - continue - ;; - - -prefer-non-pic) - pic_mode=no - continue - ;; - esac - done - - func_quote_for_eval "$libobj" - test "X$libobj" != "X$func_quote_for_eval_result" \ - && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ - && func_warning "libobj name '$libobj' may not contain shell special characters." - func_dirname_and_basename "$obj" "/" "" - objname=$func_basename_result - xdir=$func_dirname_result - lobj=$xdir$objdir/$objname - - test -z "$base_compile" && \ - func_fatal_help "you must specify a compilation command" - - # Delete any leftover library objects. - if test yes = "$build_old_libs"; then - removelist="$obj $lobj $libobj ${libobj}T" - else - removelist="$lobj $libobj ${libobj}T" - fi - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in - cygwin* | mingw* | pw32* | os2* | cegcc*) - pic_mode=default - ;; - esac - if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then - # non-PIC code in shared libraries is not supported - pic_mode=default - fi - - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test no = "$compiler_c_o"; then - output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext - lockfile=$output_obj.lock - else - output_obj= - need_locks=no - lockfile= - fi - - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test yes = "$need_locks"; then - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - elif test warn = "$need_locks"; then - if test -f "$lockfile"; then - $ECHO "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support '-c' and '-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - func_append removelist " $output_obj" - $ECHO "$srcfile" > "$lockfile" - fi - - $opt_dry_run || $RM $removelist - func_append removelist " $lockfile" - trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 - - func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 - srcfile=$func_to_tool_file_result - func_quote_for_eval "$srcfile" - qsrcfile=$func_quote_for_eval_result - - # Only build a PIC object if we are building libtool libraries. - if test yes = "$build_libtool_libs"; then - # Without this assignment, base_compile gets emptied. - fbsd_hideous_sh_bug=$base_compile - - if test no != "$pic_mode"; then - command="$base_compile $qsrcfile $pic_flag" - else - # Don't build PIC code - command="$base_compile $qsrcfile" - fi - - func_mkdir_p "$xdir$objdir" - - if test -z "$output_obj"; then - # Place PIC objects in $objdir - func_append command " -o $lobj" - fi - - func_show_eval_locale "$command" \ - 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' - - if test warn = "$need_locks" && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support '-c' and '-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed, then go on to compile the next one - if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then - func_show_eval '$MV "$output_obj" "$lobj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - - # Allow error messages only from the first compilation. - if test yes = "$suppress_opt"; then - suppress_output=' >/dev/null 2>&1' - fi - fi - - # Only build a position-dependent object if we build old libraries. - if test yes = "$build_old_libs"; then - if test yes != "$pic_mode"; then - # Don't build PIC code - command="$base_compile $qsrcfile$pie_flag" - else - command="$base_compile $qsrcfile $pic_flag" - fi - if test yes = "$compiler_c_o"; then - func_append command " -o $obj" - fi - - # Suppress compiler output if we already did a PIC compilation. - func_append command "$suppress_output" - func_show_eval_locale "$command" \ - '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' - - if test warn = "$need_locks" && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support '-c' and '-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed - if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - func_show_eval '$MV "$output_obj" "$obj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - fi - - $opt_dry_run || { - func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" - - # Unlock the critical section if it was locked - if test no != "$need_locks"; then - removelist=$lockfile - $RM "$lockfile" - fi - } - - exit $EXIT_SUCCESS -} - -$opt_help || { - test compile = "$opt_mode" && func_mode_compile ${1+"$@"} -} - -func_mode_help () -{ - # We need to display help for each of the modes. - case $opt_mode in - "") - # Generic help is extracted from the usage comments - # at the start of this file. - func_help - ;; - - clean) - $ECHO \ -"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - - compile) - $ECHO \ -"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -no-suppress do not suppress compiler output for multiple passes - -prefer-pic try to build PIC objects only - -prefer-non-pic try to build non-PIC objects only - -shared do not build a '.o' file suitable for static linking - -static only build a '.o' file suitable for static linking - -Wc,FLAG pass FLAG directly to the compiler - -COMPILE-COMMAND is a command to be used in creating a 'standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix '.c' with the -library object suffix, '.lo'." - ;; - - execute) - $ECHO \ -"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to '-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - - finish) - $ECHO \ -"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the '--dry-run' option if you just want to see what would be executed." - ;; - - install) - $ECHO \ -"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the 'install' or 'cp' program. - -The following components of INSTALL-COMMAND are treated specially: - - -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - - link) - $ECHO \ -"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -bindir BINDIR specify path to binaries directory (for systems where - libraries must be found in the PATH setting at runtime) - -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE use a list of object files found in FILE to specify objects - -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) - -precious-files-regex REGEX - don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -shared only do dynamic linking of libtool libraries - -shrext SUFFIX override the standard shared library file extension - -static do not do any dynamic linking of uninstalled libtool libraries - -static-libtool-libs - do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -weak LIBNAME declare that the target provides the LIBNAME interface - -Wc,FLAG - -Xcompiler FLAG pass linker-specific FLAG directly to the compiler - -Wl,FLAG - -Xlinker FLAG pass linker-specific FLAG directly to the linker - -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) - -All other options (arguments beginning with '-') are ignored. - -Every other argument is treated as a filename. Files ending in '.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in '.la', then a libtool library is created, -only library objects ('.lo' files) may be specified, and '-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created -using 'ar' and 'ranlib', or on Windows using 'lib'. - -If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file -is created, otherwise an executable program is created." - ;; - - uninstall) - $ECHO \ -"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - - *) - func_fatal_help "invalid operation mode '$opt_mode'" - ;; - esac - - echo - $ECHO "Try '$progname --help' for more information about other modes." -} - -# Now that we've collected a possible --mode arg, show help if necessary -if $opt_help; then - if test : = "$opt_help"; then - func_mode_help - else - { - func_help noexit - for opt_mode in compile link execute install finish uninstall clean; do - func_mode_help - done - } | $SED -n '1p; 2,$s/^Usage:/ or: /p' - { - func_help noexit - for opt_mode in compile link execute install finish uninstall clean; do - echo - func_mode_help - done - } | - $SED '1d - /^When reporting/,/^Report/{ - H - d - } - $x - /information about other modes/d - /more detailed .*MODE/d - s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' - fi - exit $? -fi - - -# func_mode_execute arg... -func_mode_execute () -{ - $debug_cmd - - # The first argument is the command name. - cmd=$nonopt - test -z "$cmd" && \ - func_fatal_help "you must specify a COMMAND" - - # Handle -dlopen flags immediately. - for file in $opt_dlopen; do - test -f "$file" \ - || func_fatal_help "'$file' is not a file" - - dir= - case $file in - *.la) - func_resolve_sysroot "$file" - file=$func_resolve_sysroot_result - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "'$lib' is not a valid libtool archive" - - # Read the libtool library. - dlname= - library_names= - func_source "$file" - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && \ - func_warning "'$file' was not linked with '-export-dynamic'" - continue - fi - - func_dirname "$file" "" "." - dir=$func_dirname_result - - if test -f "$dir/$objdir/$dlname"; then - func_append dir "/$objdir" - else - if test ! -f "$dir/$dlname"; then - func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" - fi - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - func_dirname "$file" "" "." - dir=$func_dirname_result - ;; - - *) - func_warning "'-dlopen' is ignored for non-libtool libraries and objects" - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir=$absdir - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic=$magic - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -* | *.la | *.lo ) ;; - *) - # Do a test to see if this is really a libtool program. - if func_ltwrapper_script_p "$file"; then - func_source "$file" - # Transform arg to wrapped name. - file=$progdir/$program - elif func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - func_source "$func_ltwrapper_scriptname_result" - # Transform arg to wrapped name. - file=$progdir/$program - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - func_append_quoted args "$file" - done - - if $opt_dry_run; then - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" - echo "export $shlibpath_var" - fi - $ECHO "$cmd$args" - exit $EXIT_SUCCESS - else - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved environment variables - for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES - do - eval "if test \"\${save_$lt_var+set}\" = set; then - $lt_var=\$save_$lt_var; export $lt_var - else - $lt_unset $lt_var - fi" - done - - # Now prepare to actually exec the command. - exec_cmd=\$cmd$args - fi -} - -test execute = "$opt_mode" && func_mode_execute ${1+"$@"} - - -# func_mode_finish arg... -func_mode_finish () -{ - $debug_cmd - - libs= - libdirs= - admincmds= - - for opt in "$nonopt" ${1+"$@"} - do - if test -d "$opt"; then - func_append libdirs " $opt" - - elif test -f "$opt"; then - if func_lalib_unsafe_p "$opt"; then - func_append libs " $opt" - else - func_warning "'$opt' is not a valid libtool archive" - fi - - else - func_fatal_error "invalid argument '$opt'" - fi - done - - if test -n "$libs"; then - if test -n "$lt_sysroot"; then - sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` - sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" - else - sysroot_cmd= - fi - - # Remove sysroot references - if $opt_dry_run; then - for lib in $libs; do - echo "removing references to $lt_sysroot and '=' prefixes from $lib" - done - else - tmpdir=`func_mktempdir` - for lib in $libs; do - $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ - > $tmpdir/tmp-la - mv -f $tmpdir/tmp-la $lib - done - ${RM}r "$tmpdir" - fi - fi - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - func_execute_cmds "$finish_cmds" 'admincmds="$admincmds -'"$cmd"'"' - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $opt_dry_run || eval "$cmds" || func_append admincmds " - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - $opt_quiet && exit $EXIT_SUCCESS - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - echo "----------------------------------------------------------------------" - echo "Libraries have been installed in:" - for libdir in $libdirs; do - $ECHO " $libdir" - done - echo - echo "If you ever happen to want to link against installed libraries" - echo "in a given directory, LIBDIR, you must either use libtool, and" - echo "specify the full pathname of the library, or use the '-LLIBDIR'" - echo "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - echo " - add LIBDIR to the '$shlibpath_var' environment variable" - echo " during execution" - fi - if test -n "$runpath_var"; then - echo " - add LIBDIR to the '$runpath_var' environment variable" - echo " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - $ECHO " - use the '$flag' linker flag" - fi - if test -n "$admincmds"; then - $ECHO " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'" - fi - echo - - echo "See any operating system documentation about shared libraries for" - case $host in - solaris2.[6789]|solaris2.1[0-9]) - echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" - echo "pages." - ;; - *) - echo "more information, such as the ld(1) and ld.so(8) manual pages." - ;; - esac - echo "----------------------------------------------------------------------" - fi - exit $EXIT_SUCCESS -} - -test finish = "$opt_mode" && func_mode_finish ${1+"$@"} - - -# func_mode_install arg... -func_mode_install () -{ - $debug_cmd - - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || - # Allow the use of GNU shtool's install command. - case $nonopt in *shtool*) :;; *) false;; esac - then - # Aesthetically quote it. - func_quote_for_eval "$nonopt" - install_prog="$func_quote_for_eval_result " - arg=$1 - shift - else - install_prog= - arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - func_quote_for_eval "$arg" - func_append install_prog "$func_quote_for_eval_result" - install_shared_prog=$install_prog - case " $install_prog " in - *[\\\ /]cp\ *) install_cp=: ;; - *) install_cp=false ;; - esac - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=false - stripme= - no_mode=: - for arg - do - arg2= - if test -n "$dest"; then - func_append files " $dest" - dest=$arg - continue - fi - - case $arg in - -d) isdir=: ;; - -f) - if $install_cp; then :; else - prev=$arg - fi - ;; - -g | -m | -o) - prev=$arg - ;; - -s) - stripme=" -s" - continue - ;; - -*) - ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - if test X-m = "X$prev" && test -n "$install_override_mode"; then - arg2=$install_override_mode - no_mode=false - fi - prev= - else - dest=$arg - continue - fi - ;; - esac - - # Aesthetically quote the argument. - func_quote_for_eval "$arg" - func_append install_prog " $func_quote_for_eval_result" - if test -n "$arg2"; then - func_quote_for_eval "$arg2" - fi - func_append install_shared_prog " $func_quote_for_eval_result" - done - - test -z "$install_prog" && \ - func_fatal_help "you must specify an install program" - - test -n "$prev" && \ - func_fatal_help "the '$prev' option requires an argument" - - if test -n "$install_override_mode" && $no_mode; then - if $install_cp; then :; else - func_quote_for_eval "$install_override_mode" - func_append install_shared_prog " -m $func_quote_for_eval_result" - fi - fi - - if test -z "$files"; then - if test -z "$dest"; then - func_fatal_help "no file or destination specified" - else - func_fatal_help "you must specify a destination" - fi - fi - - # Strip any trailing slash from the destination. - func_stripname '' '/' "$dest" - dest=$func_stripname_result - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=: - if $isdir; then - destdir=$dest - destname= - else - func_dirname_and_basename "$dest" "" "." - destdir=$func_dirname_result - destname=$func_basename_result - - # Not a directory, so check to see that there is only one file specified. - set dummy $files; shift - test "$#" -gt 1 && \ - func_fatal_help "'$dest' is not a directory" - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - func_fatal_help "'$destdir' must be an absolute directory name" - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic=$magic - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - func_append staticlibs " $file" - ;; - - *.la) - func_resolve_sysroot "$file" - file=$func_resolve_sysroot_result - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "'$file' is not a valid libtool archive" - - library_names= - old_library= - relink_command= - func_source "$file" - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) func_append current_libdirs " $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) func_append future_libdirs " $libdir" ;; - esac - fi - - func_dirname "$file" "/" "" - dir=$func_dirname_result - func_append dir "$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that - # are installed to the same prefix. - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. - test "$inst_prefix_dir" = "$destdir" && \ - func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` - else - relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` - fi - - func_warning "relinking '$file'" - func_show_eval "$relink_command" \ - 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' - fi - - # See the names of the shared library. - set dummy $library_names; shift - if test -n "$1"; then - realname=$1 - shift - - srcname=$realname - test -n "$relink_command" && srcname=${realname}T - - # Install the shared library and build the symlinks. - func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ - 'exit $?' - tstripme=$stripme - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - case $realname in - *.dll.a) - tstripme= - ;; - esac - ;; - os2*) - case $realname in - *_dll.a) - tstripme= - ;; - esac - ;; - esac - if test -n "$tstripme" && test -n "$striplib"; then - func_show_eval "$striplib $destdir/$realname" 'exit $?' - fi - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # Try 'ln -sf' first, because the 'ln' binary might depend on - # the symlink we replace! Solaris /bin/ln does not understand -f, - # so we also need to try rm && ln -s. - for linkname - do - test "$linkname" != "$realname" \ - && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" - done - fi - - # Do each command in the postinstall commands. - lib=$destdir/$realname - func_execute_cmds "$postinstall_cmds" 'exit $?' - fi - - # Install the pseudo-library for information purposes. - func_basename "$file" - name=$func_basename_result - instname=$dir/${name}i - func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' - - # Maybe install the static library, too. - test -n "$old_library" && func_append staticlibs " $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile=$destdir/$destname - else - func_basename "$file" - destfile=$func_basename_result - destfile=$destdir/$destfile - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - func_lo2o "$destfile" - staticdest=$func_lo2o_result - ;; - *.$objext) - staticdest=$destfile - destfile= - ;; - *) - func_fatal_help "cannot copy a libtool object to '$destfile'" - ;; - esac - - # Install the libtool object if requested. - test -n "$destfile" && \ - func_show_eval "$install_prog $file $destfile" 'exit $?' - - # Install the old object if enabled. - if test yes = "$build_old_libs"; then - # Deduce the name of the old-style object file. - func_lo2o "$file" - staticobj=$func_lo2o_result - func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' - fi - exit $EXIT_SUCCESS - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile=$destdir/$destname - else - func_basename "$file" - destfile=$func_basename_result - destfile=$destdir/$destfile - fi - - # If the file is missing, and there is a .exe on the end, strip it - # because it is most likely a libtool script we actually want to - # install - stripped_ext= - case $file in - *.exe) - if test ! -f "$file"; then - func_stripname '' '.exe' "$file" - file=$func_stripname_result - stripped_ext=.exe - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin* | *mingw*) - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - wrapper=$func_ltwrapper_scriptname_result - else - func_stripname '' '.exe' "$file" - wrapper=$func_stripname_result - fi - ;; - *) - wrapper=$file - ;; - esac - if func_ltwrapper_script_p "$wrapper"; then - notinst_deplibs= - relink_command= - - func_source "$wrapper" - - # Check the variables that should have been set. - test -z "$generated_by_libtool_version" && \ - func_fatal_error "invalid libtool wrapper script '$wrapper'" - - finalize=: - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - func_source "$lib" - fi - libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` - if test -n "$libdir" && test ! -f "$libfile"; then - func_warning "'$lib' has not been installed in '$libdir'" - finalize=false - fi - done - - relink_command= - func_source "$wrapper" - - outputname= - if test no = "$fast_install" && test -n "$relink_command"; then - $opt_dry_run || { - if $finalize; then - tmpdir=`func_mktempdir` - func_basename "$file$stripped_ext" - file=$func_basename_result - outputname=$tmpdir/$file - # Replace the output file specification. - relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` - - $opt_quiet || { - func_quote_for_expand "$relink_command" - eval "func_echo $func_quote_for_expand_result" - } - if eval "$relink_command"; then : - else - func_error "error: relink '$file' with the above command before installing it" - $opt_dry_run || ${RM}r "$tmpdir" - continue - fi - file=$outputname - else - func_warning "cannot relink '$file'" - fi - } - else - # Install the binary that we compiled earlier. - file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - # remove .exe since cygwin /usr/bin/install will append another - # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in - *.exe:*.exe) - # this is ok - ;; - *.exe:*) - destfile=$destfile.exe - ;; - *:*.exe) - func_stripname '' '.exe' "$destfile" - destfile=$func_stripname_result - ;; - esac - ;; - esac - func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' - $opt_dry_run || if test -n "$outputname"; then - ${RM}r "$tmpdir" - fi - ;; - esac - done - - for file in $staticlibs; do - func_basename "$file" - name=$func_basename_result - - # Set up the ranlib parameters. - oldlib=$destdir/$name - func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 - tool_oldlib=$func_to_tool_file_result - - func_show_eval "$install_prog \$file \$oldlib" 'exit $?' - - if test -n "$stripme" && test -n "$old_striplib"; then - func_show_eval "$old_striplib $tool_oldlib" 'exit $?' - fi - - # Do each command in the postinstall commands. - func_execute_cmds "$old_postinstall_cmds" 'exit $?' - done - - test -n "$future_libdirs" && \ - func_warning "remember to run '$progname --finish$future_libdirs'" - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - $opt_dry_run && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi -} - -test install = "$opt_mode" && func_mode_install ${1+"$@"} - - -# func_generate_dlsyms outputname originator pic_p -# Extract symbols from dlprefiles and create ${outputname}S.o with -# a dlpreopen symbol table. -func_generate_dlsyms () -{ - $debug_cmd - - my_outputname=$1 - my_originator=$2 - my_pic_p=${3-false} - my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` - my_dlsyms= - - if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - my_dlsyms=${my_outputname}S.c - else - func_error "not configured to extract global symbols from dlpreopened files" - fi - fi - - if test -n "$my_dlsyms"; then - case $my_dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist=$output_objdir/$my_outputname.nm - - func_show_eval "$RM $nlist ${nlist}S ${nlist}T" - - # Parse the name list into a source file. - func_verbose "creating $output_objdir/$my_dlsyms" - - $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ -/* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ -/* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -#if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) -#pragma GCC diagnostic ignored \"-Wstrict-prototypes\" -#endif - -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE -/* DATA imports from DLLs on WIN32 can't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT_DLSYM_CONST -#elif defined __osf__ -/* This system does not cope well with relocations in const data. */ -# define LT_DLSYM_CONST -#else -# define LT_DLSYM_CONST const -#endif - -#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) - -/* External symbol declarations for the compiler. */\ -" - - if test yes = "$dlself"; then - func_verbose "generating symbol list for '$output'" - - $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` - for progfile in $progfiles; do - func_to_tool_file "$progfile" func_convert_file_msys_to_w32 - func_verbose "extracting global C symbols from '$func_to_tool_file_result'" - $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $opt_dry_run || { - eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - if test -n "$export_symbols_regex"; then - $opt_dry_run || { - eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols=$output_objdir/$outputname.exp - $opt_dry_run || { - $RM $export_symbols - eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - } - else - $opt_dry_run || { - eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - case $host in - *cygwin* | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - } - fi - fi - - for dlprefile in $dlprefiles; do - func_verbose "extracting global C symbols from '$dlprefile'" - func_basename "$dlprefile" - name=$func_basename_result - case $host in - *cygwin* | *mingw* | *cegcc* ) - # if an import library, we need to obtain dlname - if func_win32_import_lib_p "$dlprefile"; then - func_tr_sh "$dlprefile" - eval "curr_lafile=\$libfile_$func_tr_sh_result" - dlprefile_dlbasename= - if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then - # Use subshell, to avoid clobbering current variable values - dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` - if test -n "$dlprefile_dlname"; then - func_basename "$dlprefile_dlname" - dlprefile_dlbasename=$func_basename_result - else - # no lafile. user explicitly requested -dlpreopen . - $sharedlib_from_linklib_cmd "$dlprefile" - dlprefile_dlbasename=$sharedlib_from_linklib_result - fi - fi - $opt_dry_run || { - if test -n "$dlprefile_dlbasename"; then - eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' - else - func_warning "Could not compute DLL name from $name" - eval '$ECHO ": $name " >> "$nlist"' - fi - func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 - eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | - $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" - } - else # not an import lib - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 - eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } - fi - ;; - *) - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 - eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } - ;; - esac - done - - $opt_dry_run || { - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $MV "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if $GREP -v "^: " < "$nlist" | - if sort -k 3 /dev/null 2>&1; then - sort -k 3 - else - sort +2 - fi | - uniq > "$nlist"S; then - : - else - $GREP -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' - else - echo '/* NONE */' >> "$output_objdir/$my_dlsyms" - fi - - func_show_eval '$RM "${nlist}I"' - if test -n "$global_symbol_to_import"; then - eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' - fi - - echo >> "$output_objdir/$my_dlsyms" "\ - -/* The mapping between symbol names and symbols. */ -typedef struct { - const char *name; - void *address; -} lt_dlsymlist; -extern LT_DLSYM_CONST lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[];\ -" - - if test -s "$nlist"I; then - echo >> "$output_objdir/$my_dlsyms" "\ -static void lt_syminit(void) -{ - LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; - for (; symbol->name; ++symbol) - {" - $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" - echo >> "$output_objdir/$my_dlsyms" "\ - } -}" - fi - echo >> "$output_objdir/$my_dlsyms" "\ -LT_DLSYM_CONST lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[] = -{ {\"$my_originator\", (void *) 0}," - - if test -s "$nlist"I; then - echo >> "$output_objdir/$my_dlsyms" "\ - {\"@INIT@\", (void *) <_syminit}," - fi - - case $need_lib_prefix in - no) - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - *) - eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - esac - echo >> "$output_objdir/$my_dlsyms" "\ - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_${my_prefix}_LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - } # !$opt_dry_run - - pic_flag_for_symtable= - case "$compile_command " in - *" -static "*) ;; - *) - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # linked before any other PIC object. But we must not use - # pic_flag when linking with -static. The problem exists in - # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) - pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; - *-*-hpux*) - pic_flag_for_symtable=" $pic_flag" ;; - *) - $my_pic_p && pic_flag_for_symtable=" $pic_flag" - ;; - esac - ;; - esac - symtab_cflags= - for arg in $LTCFLAGS; do - case $arg in - -pie | -fpie | -fPIE) ;; - *) func_append symtab_cflags " $arg" ;; - esac - done - - # Now compile the dynamic symbol file. - func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' - - # Clean up the generated files. - func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' - - # Transform the symbol file into the correct name. - symfileobj=$output_objdir/${my_outputname}S.$objext - case $host in - *cygwin* | *mingw* | *cegcc* ) - if test -f "$output_objdir/$my_outputname.def"; then - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - else - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` - fi - ;; - *) - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` - ;; - esac - ;; - *) - func_fatal_error "unknown suffix for '$my_dlsyms'" - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` - fi -} - -# func_cygming_gnu_implib_p ARG -# This predicate returns with zero status (TRUE) if -# ARG is a GNU/binutils-style import library. Returns -# with nonzero status (FALSE) otherwise. -func_cygming_gnu_implib_p () -{ - $debug_cmd - - func_to_tool_file "$1" func_convert_file_msys_to_w32 - func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` - test -n "$func_cygming_gnu_implib_tmp" -} - -# func_cygming_ms_implib_p ARG -# This predicate returns with zero status (TRUE) if -# ARG is an MS-style import library. Returns -# with nonzero status (FALSE) otherwise. -func_cygming_ms_implib_p () -{ - $debug_cmd - - func_to_tool_file "$1" func_convert_file_msys_to_w32 - func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` - test -n "$func_cygming_ms_implib_tmp" -} - -# func_win32_libid arg -# return the library type of file 'arg' -# -# Need a lot of goo to handle *both* DLLs and import libs -# Has to be a shell function in order to 'eat' the argument -# that is supplied when $file_magic_command is called. -# Despite the name, also deal with 64 bit binaries. -func_win32_libid () -{ - $debug_cmd - - win32_libid_type=unknown - win32_fileres=`file -L $1 2>/dev/null` - case $win32_fileres in - *ar\ archive\ import\ library*) # definitely import - win32_libid_type="x86 archive import" - ;; - *ar\ archive*) # could be an import, or static - # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | - $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then - case $nm_interface in - "MS dumpbin") - if func_cygming_ms_implib_p "$1" || - func_cygming_gnu_implib_p "$1" - then - win32_nmres=import - else - win32_nmres= - fi - ;; - *) - func_to_tool_file "$1" func_convert_file_msys_to_w32 - win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | - $SED -n -e ' - 1,100{ - / I /{ - s|.*|import| - p - q - } - }'` - ;; - esac - case $win32_nmres in - import*) win32_libid_type="x86 archive import";; - *) win32_libid_type="x86 archive static";; - esac - fi - ;; - *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... - case $win32_fileres in - *MS\ Windows\ PE\ Intel*) - win32_libid_type="x86 DLL" - ;; - esac - ;; - esac - $ECHO "$win32_libid_type" -} - -# func_cygming_dll_for_implib ARG -# -# Platform-specific function to extract the -# name of the DLL associated with the specified -# import library ARG. -# Invoked by eval'ing the libtool variable -# $sharedlib_from_linklib_cmd -# Result is available in the variable -# $sharedlib_from_linklib_result -func_cygming_dll_for_implib () -{ - $debug_cmd - - sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` -} - -# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs -# -# The is the core of a fallback implementation of a -# platform-specific function to extract the name of the -# DLL associated with the specified import library LIBNAME. -# -# SECTION_NAME is either .idata$6 or .idata$7, depending -# on the platform and compiler that created the implib. -# -# Echos the name of the DLL associated with the -# specified import library. -func_cygming_dll_for_implib_fallback_core () -{ - $debug_cmd - - match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` - $OBJDUMP -s --section "$1" "$2" 2>/dev/null | - $SED '/^Contents of section '"$match_literal"':/{ - # Place marker at beginning of archive member dllname section - s/.*/====MARK====/ - p - d - } - # These lines can sometimes be longer than 43 characters, but - # are always uninteresting - /:[ ]*file format pe[i]\{,1\}-/d - /^In archive [^:]*:/d - # Ensure marker is printed - /^====MARK====/p - # Remove all lines with less than 43 characters - /^.\{43\}/!d - # From remaining lines, remove first 43 characters - s/^.\{43\}//' | - $SED -n ' - # Join marker and all lines until next marker into a single line - /^====MARK====/ b para - H - $ b para - b - :para - x - s/\n//g - # Remove the marker - s/^====MARK====// - # Remove trailing dots and whitespace - s/[\. \t]*$// - # Print - /./p' | - # we now have a list, one entry per line, of the stringified - # contents of the appropriate section of all members of the - # archive that possess that section. Heuristic: eliminate - # all those that have a first or second character that is - # a '.' (that is, objdump's representation of an unprintable - # character.) This should work for all archives with less than - # 0x302f exports -- but will fail for DLLs whose name actually - # begins with a literal '.' or a single character followed by - # a '.'. - # - # Of those that remain, print the first one. - $SED -e '/^\./d;/^.\./d;q' -} - -# func_cygming_dll_for_implib_fallback ARG -# Platform-specific function to extract the -# name of the DLL associated with the specified -# import library ARG. -# -# This fallback implementation is for use when $DLLTOOL -# does not support the --identify-strict option. -# Invoked by eval'ing the libtool variable -# $sharedlib_from_linklib_cmd -# Result is available in the variable -# $sharedlib_from_linklib_result -func_cygming_dll_for_implib_fallback () -{ - $debug_cmd - - if func_cygming_gnu_implib_p "$1"; then - # binutils import library - sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` - elif func_cygming_ms_implib_p "$1"; then - # ms-generated import library - sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` - else - # unknown - sharedlib_from_linklib_result= - fi -} - - -# func_extract_an_archive dir oldlib -func_extract_an_archive () -{ - $debug_cmd - - f_ex_an_ar_dir=$1; shift - f_ex_an_ar_oldlib=$1 - if test yes = "$lock_old_archive_extraction"; then - lockfile=$f_ex_an_ar_oldlib.lock - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - fi - func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ - 'stat=$?; rm -f "$lockfile"; exit $stat' - if test yes = "$lock_old_archive_extraction"; then - $opt_dry_run || rm -f "$lockfile" - fi - if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then - : - else - func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" - fi -} - - -# func_extract_archives gentop oldlib ... -func_extract_archives () -{ - $debug_cmd - - my_gentop=$1; shift - my_oldlibs=${1+"$@"} - my_oldobjs= - my_xlib= - my_xabs= - my_xdir= - - for my_xlib in $my_oldlibs; do - # Extract the objects. - case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;; - *) my_xabs=`pwd`"/$my_xlib" ;; - esac - func_basename "$my_xlib" - my_xlib=$func_basename_result - my_xlib_u=$my_xlib - while :; do - case " $extracted_archives " in - *" $my_xlib_u "*) - func_arith $extracted_serial + 1 - extracted_serial=$func_arith_result - my_xlib_u=lt$extracted_serial-$my_xlib ;; - *) break ;; - esac - done - extracted_archives="$extracted_archives $my_xlib_u" - my_xdir=$my_gentop/$my_xlib_u - - func_mkdir_p "$my_xdir" - - case $host in - *-darwin*) - func_verbose "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - $opt_dry_run || { - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - func_basename "$darwin_archive" - darwin_base_archive=$func_basename_result - darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` - if test -n "$darwin_arches"; then - darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches; do - func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch" - $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive" - cd "unfat-$$/$darwin_base_archive-$darwin_arch" - func_extract_an_archive "`pwd`" "$darwin_base_archive" - cd "$darwin_curdir" - $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" - done # $darwin_arches - ## Okay now we've a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` - $LIPO -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - $RM -rf unfat-$$ - cd "$darwin_orig_dir" - else - cd $darwin_orig_dir - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - } # !$opt_dry_run - ;; - *) - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` - done - - func_extract_archives_result=$my_oldobjs -} - - -# func_emit_wrapper [arg=no] -# -# Emit a libtool wrapper script on stdout. -# Don't directly open a file because we may want to -# incorporate the script contents within a cygwin/mingw -# wrapper executable. Must ONLY be called from within -# func_mode_link because it depends on a number of variables -# set therein. -# -# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR -# variable will take. If 'yes', then the emitted script -# will assume that the directory where it is stored is -# the $objdir directory. This is a cygwin/mingw-specific -# behavior. -func_emit_wrapper () -{ - func_emit_wrapper_arg1=${1-no} - - $ECHO "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM (GNU $PACKAGE) $VERSION -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='$sed_quote_subst' - -# Be Bourne compatible -if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command=\"$relink_command\" - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variables: - generated_by_libtool_version='$macro_version' - notinst_deplibs='$notinst_deplibs' -else - # When we are sourced in execute mode, \$file and \$ECHO are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - file=\"\$0\"" - - qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` - $ECHO "\ - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$1 -_LTECHO_EOF' -} - ECHO=\"$qECHO\" - fi - -# Very basic option parsing. These options are (a) specific to -# the libtool wrapper, (b) are identical between the wrapper -# /script/ and the wrapper /executable/ that is used only on -# windows platforms, and (c) all begin with the string "--lt-" -# (application programs are unlikely to have options that match -# this pattern). -# -# There are only two supported options: --lt-debug and -# --lt-dump-script. There is, deliberately, no --lt-help. -# -# The first argument to this parsing function should be the -# script's $0 value, followed by "$@". -lt_option_debug= -func_parse_lt_options () -{ - lt_script_arg0=\$0 - shift - for lt_opt - do - case \"\$lt_opt\" in - --lt-debug) lt_option_debug=1 ;; - --lt-dump-script) - lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` - test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. - lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` - cat \"\$lt_dump_D/\$lt_dump_F\" - exit 0 - ;; - --lt-*) - \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 - exit 1 - ;; - esac - done - - # Print the debug banner immediately: - if test -n \"\$lt_option_debug\"; then - echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 - fi -} - -# Used when --lt-debug. Prints its arguments to stdout -# (redirection is the responsibility of the caller) -func_lt_dump_args () -{ - lt_dump_args_N=1; - for lt_arg - do - \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" - lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` - done -} - -# Core function for launching the target application -func_exec_program_core () -{ -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2* | *-cegcc*) - $ECHO "\ - if test -n \"\$lt_option_debug\"; then - \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 - func_lt_dump_args \${1+\"\$@\"} 1>&2 - fi - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $ECHO "\ - if test -n \"\$lt_option_debug\"; then - \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 - func_lt_dump_args \${1+\"\$@\"} 1>&2 - fi - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $ECHO "\ - \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 - exit 1 -} - -# A function to encapsulate launching the target application -# Strips options in the --lt-* namespace from \$@ and -# launches target application with the remaining arguments. -func_exec_program () -{ - case \" \$* \" in - *\\ --lt-*) - for lt_wr_arg - do - case \$lt_wr_arg in - --lt-*) ;; - *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; - esac - shift - done ;; - esac - func_exec_program_core \${1+\"\$@\"} -} - - # Parse options - func_parse_lt_options \"\$0\" \${1+\"\$@\"} - - # Find the directory that this script lives in. - thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` - done - - # Usually 'no', except on cygwin/mingw when embedded into - # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 - if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then - # special case for '.' - if test \"\$thisdir\" = \".\"; then - thisdir=\`pwd\` - fi - # remove .libs from thisdir - case \"\$thisdir\" in - *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; - $objdir ) thisdir=. ;; - esac - fi - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test yes = "$fast_install"; then - $ECHO "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $MKDIR \"\$progdir\" - else - $RM \"\$progdir/\$file\" - fi" - - $ECHO "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - \$ECHO \"\$relink_command_output\" >&2 - $RM \"\$progdir/\$file\" - exit 1 - fi - fi - - $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $RM \"\$progdir/\$program\"; - $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $RM \"\$progdir/\$file\" - fi" - else - $ECHO "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - $ECHO "\ - - if test -f \"\$progdir/\$program\"; then" - - # fixup the dll searchpath if we need to. - # - # Fix the DLL searchpath if we need to. Do this before prepending - # to shlibpath, because on Windows, both are PATH and uninstalled - # libraries must come first. - if test -n "$dllsearchpath"; then - $ECHO "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - # Export our shlibpath_var if we have one. - if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $ECHO "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` - - export $shlibpath_var -" - fi - - $ECHO "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. - func_exec_program \${1+\"\$@\"} - fi - else - # The program doesn't exist. - \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2 - \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 - \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 - exit 1 - fi -fi\ -" -} - - -# func_emit_cwrapperexe_src -# emit the source code for a wrapper executable on stdout -# Must ONLY be called from within func_mode_link because -# it depends on a number of variable set therein. -func_emit_cwrapperexe_src () -{ - cat < -#include -#ifdef _MSC_VER -# include -# include -# include -#else -# include -# include -# ifdef __CYGWIN__ -# include -# endif -#endif -#include -#include -#include -#include -#include -#include -#include -#include - -#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) - -/* declarations of non-ANSI functions */ -#if defined __MINGW32__ -# ifdef __STRICT_ANSI__ -int _putenv (const char *); -# endif -#elif defined __CYGWIN__ -# ifdef __STRICT_ANSI__ -char *realpath (const char *, char *); -int putenv (char *); -int setenv (const char *, const char *, int); -# endif -/* #elif defined other_platform || defined ... */ -#endif - -/* portability defines, excluding path handling macros */ -#if defined _MSC_VER -# define setmode _setmode -# define stat _stat -# define chmod _chmod -# define getcwd _getcwd -# define putenv _putenv -# define S_IXUSR _S_IEXEC -#elif defined __MINGW32__ -# define setmode _setmode -# define stat _stat -# define chmod _chmod -# define getcwd _getcwd -# define putenv _putenv -#elif defined __CYGWIN__ -# define HAVE_SETENV -# define FOPEN_WB "wb" -/* #elif defined other platforms ... */ -#endif - -#if defined PATH_MAX -# define LT_PATHMAX PATH_MAX -#elif defined MAXPATHLEN -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#endif - -#ifndef S_IXOTH -# define S_IXOTH 0 -#endif -#ifndef S_IXGRP -# define S_IXGRP 0 -#endif - -/* path handling portability macros */ -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif - -#if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \ - defined __OS2__ -# define HAVE_DOS_BASED_FILE_SYSTEM -# define FOPEN_WB "wb" -# ifndef DIR_SEPARATOR_2 -# define DIR_SEPARATOR_2 '\\' -# endif -# ifndef PATH_SEPARATOR_2 -# define PATH_SEPARATOR_2 ';' -# endif -#endif - -#ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -#else /* DIR_SEPARATOR_2 */ -# define IS_DIR_SEPARATOR(ch) \ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -#endif /* DIR_SEPARATOR_2 */ - -#ifndef PATH_SEPARATOR_2 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -#else /* PATH_SEPARATOR_2 */ -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -#endif /* PATH_SEPARATOR_2 */ - -#ifndef FOPEN_WB -# define FOPEN_WB "w" -#endif -#ifndef _O_BINARY -# define _O_BINARY 0 -#endif - -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free (stale); stale = 0; } \ -} while (0) - -#if defined LT_DEBUGWRAPPER -static int lt_debug = 1; -#else -static int lt_debug = 0; -#endif - -const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ - -void *xmalloc (size_t num); -char *xstrdup (const char *string); -const char *base_name (const char *name); -char *find_executable (const char *wrapper); -char *chase_symlinks (const char *pathspec); -int make_executable (const char *path); -int check_executable (const char *path); -char *strendzap (char *str, const char *pat); -void lt_debugprintf (const char *file, int line, const char *fmt, ...); -void lt_fatal (const char *file, int line, const char *message, ...); -static const char *nonnull (const char *s); -static const char *nonempty (const char *s); -void lt_setenv (const char *name, const char *value); -char *lt_extend_str (const char *orig_value, const char *add, int to_end); -void lt_update_exe_path (const char *name, const char *value); -void lt_update_lib_path (const char *name, const char *value); -char **prepare_spawn (char **argv); -void lt_dump_script (FILE *f); -EOF - - cat <= 0) - && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) - return 1; - else - return 0; -} - -int -make_executable (const char *path) -{ - int rval = 0; - struct stat st; - - lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", - nonempty (path)); - if ((!path) || (!*path)) - return 0; - - if (stat (path, &st) >= 0) - { - rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); - } - return rval; -} - -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise - Does not chase symlinks, even on platforms that support them. -*/ -char * -find_executable (const char *wrapper) -{ - int has_slash = 0; - const char *p; - const char *p_next; - /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; - size_t tmp_len; - char *concat_name; - - lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", - nonempty (wrapper)); - - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; - - /* Absolute path? */ -#if defined HAVE_DOS_BASED_FILE_SYSTEM - if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - else - { -#endif - if (IS_DIR_SEPARATOR (wrapper[0])) - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } -#if defined HAVE_DOS_BASED_FILE_SYSTEM - } -#endif - - for (p = wrapper; *p; p++) - if (*p == '/') - { - has_slash = 1; - break; - } - if (!has_slash) - { - /* no slashes; search PATH */ - const char *path = getenv ("PATH"); - if (path != NULL) - { - for (p = path; *p; p = p_next) - { - const char *q; - size_t p_len; - for (q = p; *q; q++) - if (IS_PATH_SEPARATOR (*q)) - break; - p_len = (size_t) (q - p); - p_next = (*q == '\0' ? q : q + 1); - if (p_len == 0) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", - nonnull (strerror (errno))); - tmp_len = strlen (tmp); - concat_name = - XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - } - else - { - concat_name = - XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, p, p_len); - concat_name[p_len] = '/'; - strcpy (concat_name + p_len + 1, wrapper); - } - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - } - /* not found in PATH; assume curdir */ - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", - nonnull (strerror (errno))); - tmp_len = strlen (tmp); - concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - return NULL; -} - -char * -chase_symlinks (const char *pathspec) -{ -#ifndef S_ISLNK - return xstrdup (pathspec); -#else - char buf[LT_PATHMAX]; - struct stat s; - char *tmp_pathspec = xstrdup (pathspec); - char *p; - int has_symlinks = 0; - while (strlen (tmp_pathspec) && !has_symlinks) - { - lt_debugprintf (__FILE__, __LINE__, - "checking path component for symlinks: %s\n", - tmp_pathspec); - if (lstat (tmp_pathspec, &s) == 0) - { - if (S_ISLNK (s.st_mode) != 0) - { - has_symlinks = 1; - break; - } - - /* search backwards for last DIR_SEPARATOR */ - p = tmp_pathspec + strlen (tmp_pathspec) - 1; - while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - p--; - if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - { - /* no more DIR_SEPARATORS left */ - break; - } - *p = '\0'; - } - else - { - lt_fatal (__FILE__, __LINE__, - "error accessing file \"%s\": %s", - tmp_pathspec, nonnull (strerror (errno))); - } - } - XFREE (tmp_pathspec); - - if (!has_symlinks) - { - return xstrdup (pathspec); - } - - tmp_pathspec = realpath (pathspec, buf); - if (tmp_pathspec == 0) - { - lt_fatal (__FILE__, __LINE__, - "could not follow symlinks for %s", pathspec); - } - return xstrdup (tmp_pathspec); -#endif -} - -char * -strendzap (char *str, const char *pat) -{ - size_t len, patlen; - - assert (str != NULL); - assert (pat != NULL); - - len = strlen (str); - patlen = strlen (pat); - - if (patlen <= len) - { - str += len - patlen; - if (STREQ (str, pat)) - *str = '\0'; - } - return str; -} - -void -lt_debugprintf (const char *file, int line, const char *fmt, ...) -{ - va_list args; - if (lt_debug) - { - (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); - va_start (args, fmt); - (void) vfprintf (stderr, fmt, args); - va_end (args); - } -} - -static void -lt_error_core (int exit_status, const char *file, - int line, const char *mode, - const char *message, va_list ap) -{ - fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); - - if (exit_status >= 0) - exit (exit_status); -} - -void -lt_fatal (const char *file, int line, const char *message, ...) -{ - va_list ap; - va_start (ap, message); - lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); - va_end (ap); -} - -static const char * -nonnull (const char *s) -{ - return s ? s : "(null)"; -} - -static const char * -nonempty (const char *s) -{ - return (s && !*s) ? "(empty)" : nonnull (s); -} - -void -lt_setenv (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_setenv) setting '%s' to '%s'\n", - nonnull (name), nonnull (value)); - { -#ifdef HAVE_SETENV - /* always make a copy, for consistency with !HAVE_SETENV */ - char *str = xstrdup (value); - setenv (name, str, 1); -#else - size_t len = strlen (name) + 1 + strlen (value) + 1; - char *str = XMALLOC (char, len); - sprintf (str, "%s=%s", name, value); - if (putenv (str) != EXIT_SUCCESS) - { - XFREE (str); - } -#endif - } -} - -char * -lt_extend_str (const char *orig_value, const char *add, int to_end) -{ - char *new_value; - if (orig_value && *orig_value) - { - size_t orig_value_len = strlen (orig_value); - size_t add_len = strlen (add); - new_value = XMALLOC (char, add_len + orig_value_len + 1); - if (to_end) - { - strcpy (new_value, orig_value); - strcpy (new_value + orig_value_len, add); - } - else - { - strcpy (new_value, add); - strcpy (new_value + add_len, orig_value); - } - } - else - { - new_value = xstrdup (add); - } - return new_value; -} - -void -lt_update_exe_path (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", - nonnull (name), nonnull (value)); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - /* some systems can't cope with a ':'-terminated path #' */ - size_t len = strlen (new_value); - while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) - { - new_value[--len] = '\0'; - } - lt_setenv (name, new_value); - XFREE (new_value); - } -} - -void -lt_update_lib_path (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", - nonnull (name), nonnull (value)); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - } -} - -EOF - case $host_os in - mingw*) - cat <<"EOF" - -/* Prepares an argument vector before calling spawn(). - Note that spawn() does not by itself call the command interpreter - (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : - ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); - GetVersionEx(&v); - v.dwPlatformId == VER_PLATFORM_WIN32_NT; - }) ? "cmd.exe" : "command.com"). - Instead it simply concatenates the arguments, separated by ' ', and calls - CreateProcess(). We must quote the arguments since Win32 CreateProcess() - interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a - special way: - - Space and tab are interpreted as delimiters. They are not treated as - delimiters if they are surrounded by double quotes: "...". - - Unescaped double quotes are removed from the input. Their only effect is - that within double quotes, space and tab are treated like normal - characters. - - Backslashes not followed by double quotes are not special. - - But 2*n+1 backslashes followed by a double quote become - n backslashes followed by a double quote (n >= 0): - \" -> " - \\\" -> \" - \\\\\" -> \\" - */ -#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" -#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" -char ** -prepare_spawn (char **argv) -{ - size_t argc; - char **new_argv; - size_t i; - - /* Count number of arguments. */ - for (argc = 0; argv[argc] != NULL; argc++) - ; - - /* Allocate new argument vector. */ - new_argv = XMALLOC (char *, argc + 1); - - /* Put quoted arguments into the new argument vector. */ - for (i = 0; i < argc; i++) - { - const char *string = argv[i]; - - if (string[0] == '\0') - new_argv[i] = xstrdup ("\"\""); - else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) - { - int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); - size_t length; - unsigned int backslashes; - const char *s; - char *quoted_string; - char *p; - - length = 0; - backslashes = 0; - if (quote_around) - length++; - for (s = string; *s != '\0'; s++) - { - char c = *s; - if (c == '"') - length += backslashes + 1; - length++; - if (c == '\\') - backslashes++; - else - backslashes = 0; - } - if (quote_around) - length += backslashes + 1; - - quoted_string = XMALLOC (char, length + 1); - - p = quoted_string; - backslashes = 0; - if (quote_around) - *p++ = '"'; - for (s = string; *s != '\0'; s++) - { - char c = *s; - if (c == '"') - { - unsigned int j; - for (j = backslashes + 1; j > 0; j--) - *p++ = '\\'; - } - *p++ = c; - if (c == '\\') - backslashes++; - else - backslashes = 0; - } - if (quote_around) - { - unsigned int j; - for (j = backslashes; j > 0; j--) - *p++ = '\\'; - *p++ = '"'; - } - *p = '\0'; - - new_argv[i] = quoted_string; - } - else - new_argv[i] = (char *) string; - } - new_argv[argc] = NULL; - - return new_argv; -} -EOF - ;; - esac - - cat <<"EOF" -void lt_dump_script (FILE* f) -{ -EOF - func_emit_wrapper yes | - $SED -n -e ' -s/^\(.\{79\}\)\(..*\)/\1\ -\2/ -h -s/\([\\"]\)/\\\1/g -s/$/\\n/ -s/\([^\n]*\).*/ fputs ("\1", f);/p -g -D' - cat <<"EOF" -} -EOF -} -# end: func_emit_cwrapperexe_src - -# func_win32_import_lib_p ARG -# True if ARG is an import lib, as indicated by $file_magic_cmd -func_win32_import_lib_p () -{ - $debug_cmd - - case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in - *import*) : ;; - *) false ;; - esac -} - -# func_suncc_cstd_abi -# !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! -# Several compiler flags select an ABI that is incompatible with the -# Cstd library. Avoid specifying it if any are in CXXFLAGS. -func_suncc_cstd_abi () -{ - $debug_cmd - - case " $compile_command " in - *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) - suncc_use_cstd_abi=no - ;; - *) - suncc_use_cstd_abi=yes - ;; - esac -} - -# func_mode_link arg... -func_mode_link () -{ - $debug_cmd - - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - # It is impossible to link a dll without this setting, and - # we shouldn't force the makefile maintainer to figure out - # what system we are compiling for in order to pass an extra - # flag for every libtool invocation. - # allow_undefined=no - - # FIXME: Unfortunately, there are problems with the above when trying - # to make a dll that has undefined symbols, in which case not - # even a static library is built. For now, we need to specify - # -no-undefined on the libtool link line when we can be certain - # that all symbols are satisfied, otherwise we get a static library. - allow_undefined=yes - ;; - *) - allow_undefined=yes - ;; - esac - libtool_args=$nonopt - base_compile="$nonopt $@" - compile_command=$nonopt - finalize_command=$nonopt - - compile_rpath= - finalize_rpath= - compile_shlibpath= - finalize_shlibpath= - convenience= - old_convenience= - deplibs= - old_deplibs= - compiler_flags= - linker_flags= - dllsearchpath= - lib_search_path=`pwd` - inst_prefix_dir= - new_inherited_linker_flags= - - avoid_version=no - bindir= - dlfiles= - dlprefiles= - dlself=no - export_dynamic=no - export_symbols= - export_symbols_regex= - generated= - libobjs= - ltlibs= - module=no - no_install=no - objs= - os2dllname= - non_pic_objects= - precious_files_regex= - prefer_static_libs=no - preload=false - prev= - prevarg= - release= - rpath= - xrpath= - perm_rpath= - temp_rpath= - thread_safe=no - vinfo= - vinfo_number=no - weak_libs= - single_module=$wl-single_module - func_infer_tag $base_compile - - # We need to know -static, to get the right output filenames. - for arg - do - case $arg in - -shared) - test yes != "$build_libtool_libs" \ - && func_fatal_configuration "cannot build a shared library" - build_old_libs=no - break - ;; - -all-static | -static | -static-libtool-libs) - case $arg in - -all-static) - if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then - func_warning "complete static linking is impossible in this configuration" - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - -static) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=built - ;; - -static-libtool-libs) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - esac - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - while test "$#" -gt 0; do - arg=$1 - shift - func_quote_for_eval "$arg" - qarg=$func_quote_for_eval_unquoted_result - func_append libtool_args " $func_quote_for_eval_result" - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - output) - func_append compile_command " @OUTPUT@" - func_append finalize_command " @OUTPUT@" - ;; - esac - - case $prev in - bindir) - bindir=$arg - prev= - continue - ;; - dlfiles|dlprefiles) - $preload || { - # Add the symbol object into the linking commands. - func_append compile_command " @SYMFILE@" - func_append finalize_command " @SYMFILE@" - preload=: - } - case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test no = "$dlself"; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test dlprefiles = "$prev"; then - dlself=yes - elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test dlfiles = "$prev"; then - func_append dlfiles " $arg" - else - func_append dlprefiles " $arg" - fi - prev= - continue - ;; - esac - ;; - expsyms) - export_symbols=$arg - test -f "$arg" \ - || func_fatal_error "symbol file '$arg' does not exist" - prev= - continue - ;; - expsyms_regex) - export_symbols_regex=$arg - prev= - continue - ;; - framework) - case $host in - *-*-darwin*) - case "$deplibs " in - *" $qarg.ltframework "*) ;; - *) func_append deplibs " $qarg.ltframework" # this is fixed later - ;; - esac - ;; - esac - prev= - continue - ;; - inst_prefix) - inst_prefix_dir=$arg - prev= - continue - ;; - mllvm) - # Clang does not use LLVM to link, so we can simply discard any - # '-mllvm $arg' options when doing the link step. - prev= - continue - ;; - objectlist) - if test -f "$arg"; then - save_arg=$arg - moreargs= - for fil in `cat "$save_arg"` - do -# func_append moreargs " $fil" - arg=$fil - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test none = "$pic_object" && - test none = "$non_pic_object"; then - func_fatal_error "cannot find name of object for '$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir=$func_dirname_result - - if test none != "$pic_object"; then - # Prepend the subdirectory the object is found in. - pic_object=$xdir$pic_object - - if test dlfiles = "$prev"; then - if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then - func_append dlfiles " $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test dlprefiles = "$prev"; then - # Preload the old-style object. - func_append dlprefiles " $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg=$pic_object - fi - - # Non-PIC object. - if test none != "$non_pic_object"; then - # Prepend the subdirectory the object is found in. - non_pic_object=$xdir$non_pic_object - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test none = "$pic_object"; then - arg=$non_pic_object - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object=$pic_object - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir=$func_dirname_result - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "'$arg' is not a valid libtool object" - fi - fi - done - else - func_fatal_error "link input file '$arg' does not exist" - fi - arg=$save_arg - prev= - continue - ;; - os2dllname) - os2dllname=$arg - prev= - continue - ;; - precious_regex) - precious_files_regex=$arg - prev= - continue - ;; - release) - release=-$arg - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - if test rpath = "$prev"; then - case "$rpath " in - *" $arg "*) ;; - *) func_append rpath " $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) func_append xrpath " $arg" ;; - esac - fi - prev= - continue - ;; - shrext) - shrext_cmds=$arg - prev= - continue - ;; - weak) - func_append weak_libs " $arg" - prev= - continue - ;; - xcclinker) - func_append linker_flags " $qarg" - func_append compiler_flags " $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xcompiler) - func_append compiler_flags " $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xlinker) - func_append linker_flags " $qarg" - func_append compiler_flags " $wl$qarg" - prev= - func_append compile_command " $wl$qarg" - func_append finalize_command " $wl$qarg" - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n "$prev" - - prevarg=$arg - - case $arg in - -all-static) - if test -n "$link_static_flag"; then - # See comment for -static flag below, for more details. - func_append compile_command " $link_static_flag" - func_append finalize_command " $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - func_fatal_error "'-allow-undefined' must not be used because it is the default" - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -bindir) - prev=bindir - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - func_fatal_error "more than one -exported-symbols argument is not allowed" - fi - if test X-export-symbols = "X$arg"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - -framework) - prev=framework - continue - ;; - - -inst-prefix-dir) - prev=inst_prefix - continue - ;; - - # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* - # so, if we see these flags be careful not to treat them like -L - -L[A-Z][A-Z]*:*) - case $with_gcc/$host in - no/*-*-irix* | /*-*-irix*) - func_append compile_command " $arg" - func_append finalize_command " $arg" - ;; - esac - continue - ;; - - -L*) - func_stripname "-L" '' "$arg" - if test -z "$func_stripname_result"; then - if test "$#" -gt 0; then - func_fatal_error "require no space between '-L' and '$1'" - else - func_fatal_error "need path for '-L' option" - fi - fi - func_resolve_sysroot "$func_stripname_result" - dir=$func_resolve_sysroot_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - test -z "$absdir" && \ - func_fatal_error "cannot determine absolute directory name of '$dir'" - dir=$absdir - ;; - esac - case "$deplibs " in - *" -L$dir "* | *" $arg "*) - # Will only happen for absolute or sysroot arguments - ;; - *) - # Preserve sysroot, but never include relative directories - case $dir in - [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; - *) func_append deplibs " -L$dir" ;; - esac - func_append lib_search_path " $dir" - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - ::) dllsearchpath=$dir;; - *) func_append dllsearchpath ":$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) func_append dllsearchpath ":$testbindir";; - esac - ;; - esac - continue - ;; - - -l*) - if test X-lc = "X$arg" || test X-lm = "X$arg"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) - # These systems don't actually have a C or math library (as such) - continue - ;; - *-*-os2*) - # These systems don't actually have a C library (as such) - test X-lc = "X$arg" && continue - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) - # Do not include libc due to us having libc/libc_r. - test X-lc = "X$arg" && continue - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework - func_append deplibs " System.ltframework" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - test X-lc = "X$arg" && continue - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - test X-lc = "X$arg" && continue - ;; - esac - elif test X-lc_r = "X$arg"; then - case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) - # Do not include libc_r directly, use -pthread flag. - continue - ;; - esac - fi - func_append deplibs " $arg" - continue - ;; - - -mllvm) - prev=mllvm - continue - ;; - - -module) - module=yes - continue - ;; - - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - # Darwin uses the -arch flag to determine output architecture. - -model|-arch|-isysroot|--sysroot) - func_append compiler_flags " $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - prev=xcompiler - continue - ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ - |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) - func_append compiler_flags " $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - case "$new_inherited_linker_flags " in - *" $arg "*) ;; - * ) func_append new_inherited_linker_flags " $arg" ;; - esac - continue - ;; - - -multi_module) - single_module=$wl-multi_module - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; - - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) - # The PATH hackery in wrapper scripts is required on Windows - # and Darwin in order for the loader to find any dlls it needs. - func_warning "'-no-install' is ignored for $host" - func_warning "assuming '-no-fast-install' instead" - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -objectlist) - prev=objectlist - continue - ;; - - -os2dllname) - prev=os2dllname - continue - ;; - - -o) prev=output ;; - - -precious-files-regex) - prev=precious_regex - continue - ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -R) - prev=xrpath - continue - ;; - - -R*) - func_stripname '-R' '' "$arg" - dir=$func_stripname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - =*) - func_stripname '=' '' "$dir" - dir=$lt_sysroot$func_stripname_result - ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) func_append xrpath " $dir" ;; - esac - continue - ;; - - -shared) - # The effects of -shared are defined in a previous loop. - continue - ;; - - -shrext) - prev=shrext - continue - ;; - - -static | -static-libtool-libs) - # The effects of -static are defined in a previous loop. - # We used to do the same as -all-static on platforms that - # didn't have a PIC flag, but the assumption that the effects - # would be equivalent was wrong. It would break on at least - # Digital Unix and AIX. - continue - ;; - - -thread-safe) - thread_safe=yes - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - - -version-number) - prev=vinfo - vinfo_number=yes - continue - ;; - - -weak) - prev=weak - continue - ;; - - -Wc,*) - func_stripname '-Wc,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs=$IFS; IFS=, - for flag in $args; do - IFS=$save_ifs - func_quote_for_eval "$flag" - func_append arg " $func_quote_for_eval_result" - func_append compiler_flags " $func_quote_for_eval_result" - done - IFS=$save_ifs - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Wl,*) - func_stripname '-Wl,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs=$IFS; IFS=, - for flag in $args; do - IFS=$save_ifs - func_quote_for_eval "$flag" - func_append arg " $wl$func_quote_for_eval_result" - func_append compiler_flags " $wl$func_quote_for_eval_result" - func_append linker_flags " $func_quote_for_eval_result" - done - IFS=$save_ifs - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Xlinker) - prev=xlinker - continue - ;; - - -XCClinker) - prev=xcclinker - continue - ;; - - # -msg_* for osf cc - -msg_*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - ;; - - # Flags to be passed through unchanged, with rationale: - # -64, -mips[0-9] enable 64-bit mode for the SGI compiler - # -r[0-9][0-9]* specify processor for the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler - # +DA*, +DD* enable 64-bit mode for the HP compiler - # -q* compiler args for the IBM compiler - # -m*, -t[45]*, -txscale* architecture-specific flags for GCC - # -F/path path to uninstalled frameworks, gcc on darwin - # -p, -pg, --coverage, -fprofile-* profiling flags for GCC - # -fstack-protector* stack protector flags for GCC - # @file GCC response files - # -tp=* Portland pgcc target processor selection - # --sysroot=* for sysroot support - # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization - # -specs=* GCC specs files - # -stdlib=* select c++ std lib with clang - # -fsanitize=* Clang/GCC memory and address sanitizer - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ - -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ - -specs=*|-fsanitize=*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - func_append compile_command " $arg" - func_append finalize_command " $arg" - func_append compiler_flags " $arg" - continue - ;; - - -Z*) - if test os2 = "`expr $host : '.*\(os2\)'`"; then - # OS/2 uses -Zxxx to specify OS/2-specific options - compiler_flags="$compiler_flags $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - case $arg in - -Zlinker | -Zstack) - prev=xcompiler - ;; - esac - continue - else - # Otherwise treat like 'Some other compiler flag' below - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - fi - ;; - - # Some other compiler flag. - -* | +*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - ;; - - *.$objext) - # A standard object. - func_append objs " $arg" - ;; - - *.lo) - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test none = "$pic_object" && - test none = "$non_pic_object"; then - func_fatal_error "cannot find name of object for '$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir=$func_dirname_result - - test none = "$pic_object" || { - # Prepend the subdirectory the object is found in. - pic_object=$xdir$pic_object - - if test dlfiles = "$prev"; then - if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then - func_append dlfiles " $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test dlprefiles = "$prev"; then - # Preload the old-style object. - func_append dlprefiles " $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg=$pic_object - } - - # Non-PIC object. - if test none != "$non_pic_object"; then - # Prepend the subdirectory the object is found in. - non_pic_object=$xdir$non_pic_object - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test none = "$pic_object"; then - arg=$non_pic_object - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object=$pic_object - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir=$func_dirname_result - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "'$arg' is not a valid libtool object" - fi - fi - ;; - - *.$libext) - # An archive. - func_append deplibs " $arg" - func_append old_deplibs " $arg" - continue - ;; - - *.la) - # A libtool-controlled library. - - func_resolve_sysroot "$arg" - if test dlfiles = "$prev"; then - # This library was specified with -dlopen. - func_append dlfiles " $func_resolve_sysroot_result" - prev= - elif test dlprefiles = "$prev"; then - # The library was specified with -dlpreopen. - func_append dlprefiles " $func_resolve_sysroot_result" - prev= - else - func_append deplibs " $func_resolve_sysroot_result" - fi - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - ;; - esac # arg - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - done # argument parsing loop - - test -n "$prev" && \ - func_fatal_help "the '$prevarg' option requires an argument" - - if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - - oldlibs= - # calculate the name of the file, without its directory - func_basename "$output" - outputname=$func_basename_result - libobjs_save=$libobjs - - if test -n "$shlibpath_var"; then - # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\` - else - shlib_search_path= - fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - - # Definition is injected by LT_CONFIG during libtool generation. - func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" - - func_dirname "$output" "/" "" - output_objdir=$func_dirname_result$objdir - func_to_tool_file "$output_objdir/" - tool_output_objdir=$func_to_tool_file_result - # Create the object directory. - func_mkdir_p "$output_objdir" - - # Determine the type of output - case $output in - "") - func_fatal_help "you must specify an output file" - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - esac - - specialdeplibs= - - libs= - # Find all interdependent deplibs by searching for libraries - # that are linked more than once (e.g. -la -lb -la) - for deplib in $deplibs; do - if $opt_preserve_dup_deps; then - case "$libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append libs " $deplib" - done - - if test lib = "$linkmode"; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" - - # Compute libraries that are listed more than once in $predeps - # $postdeps and mark them as special (i.e., whose duplicates are - # not to be eliminated). - pre_post_deps= - if $opt_duplicate_compiler_generated_deps; then - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in - *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; - esac - func_append pre_post_deps " $pre_post_dep" - done - fi - pre_post_deps= - fi - - deplibs= - newdependency_libs= - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries - notinst_path= # paths that contain not-installed libtool libraries - - case $linkmode in - lib) - passes="conv dlpreopen link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" - ;; - esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=false - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - - for pass in $passes; do - # The preopen pass in lib mode reverses $deplibs; put it back here - # so that -L comes before libs that need it for instance... - if test lib,link = "$linkmode,$pass"; then - ## FIXME: Find the place where the list is rebuilt in the wrong - ## order, and fix it there properly - tmp_deplibs= - for deplib in $deplibs; do - tmp_deplibs="$deplib $tmp_deplibs" - done - deplibs=$tmp_deplibs - fi - - if test lib,link = "$linkmode,$pass" || - test prog,scan = "$linkmode,$pass"; then - libs=$deplibs - deplibs= - fi - if test prog = "$linkmode"; then - case $pass in - dlopen) libs=$dlfiles ;; - dlpreopen) libs=$dlprefiles ;; - link) - libs="$deplibs %DEPLIBS%" - test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" - ;; - esac - fi - if test lib,dlpreopen = "$linkmode,$pass"; then - # Collect and forward deplibs of preopened libtool libs - for lib in $dlprefiles; do - # Ignore non-libtool-libs - dependency_libs= - func_resolve_sysroot "$lib" - case $lib in - *.la) func_source "$func_resolve_sysroot_result" ;; - esac - - # Collect preopened libtool deplibs, except any this library - # has declared as weak libs - for deplib in $dependency_libs; do - func_basename "$deplib" - deplib_base=$func_basename_result - case " $weak_libs " in - *" $deplib_base "*) ;; - *) func_append deplibs " $deplib" ;; - esac - done - done - libs=$dlprefiles - fi - if test dlopen = "$pass"; then - # Collect dlpreopened libraries - save_deplibs=$deplibs - deplibs= - fi - - for deplib in $libs; do - lib= - found=false - case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ - |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) - if test prog,link = "$linkmode,$pass"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - func_append compiler_flags " $deplib" - if test lib = "$linkmode"; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) func_append new_inherited_linker_flags " $deplib" ;; - esac - fi - fi - continue - ;; - -l*) - if test lib != "$linkmode" && test prog != "$linkmode"; then - func_warning "'-l' is ignored for archives/objects" - continue - fi - func_stripname '-l' '' "$deplib" - name=$func_stripname_result - if test lib = "$linkmode"; then - searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" - else - searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" - fi - for searchdir in $searchdirs; do - for search_ext in .la $std_shrext .so .a; do - # Search the libtool library - lib=$searchdir/lib$name$search_ext - if test -f "$lib"; then - if test .la = "$search_ext"; then - found=: - else - found=false - fi - break 2 - fi - done - done - if $found; then - # deplib is a libtool library - # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, - # We need to do some special things here, and not later. - if test yes = "$allow_libtool_libs_with_static_runtimes"; then - case " $predeps $postdeps " in - *" $deplib "*) - if func_lalib_p "$lib"; then - library_names= - old_library= - func_source "$lib" - for l in $old_library $library_names; do - ll=$l - done - if test "X$ll" = "X$old_library"; then # only static version available - found=false - func_dirname "$lib" "" "." - ladir=$func_dirname_result - lib=$ladir/$old_library - if test prog,link = "$linkmode,$pass"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - fi - ;; - *) ;; - esac - fi - else - # deplib doesn't seem to be a libtool library - if test prog,link = "$linkmode,$pass"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - ;; # -l - *.ltframework) - if test prog,link = "$linkmode,$pass"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - if test lib = "$linkmode"; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) func_append new_inherited_linker_flags " $deplib" ;; - esac - fi - fi - continue - ;; - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test conv = "$pass" && continue - newdependency_libs="$deplib $newdependency_libs" - func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - prog) - if test conv = "$pass"; then - deplibs="$deplib $deplibs" - continue - fi - if test scan = "$pass"; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - *) - func_warning "'-L' is ignored for archives/objects" - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test link = "$pass"; then - func_stripname '-R' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - dir=$func_resolve_sysroot_result - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) func_append xrpath " $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) - func_resolve_sysroot "$deplib" - lib=$func_resolve_sysroot_result - ;; - *.$libext) - if test conv = "$pass"; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - # Linking convenience modules into shared libraries is allowed, - # but linking other static libraries is non-portable. - case " $dlpreconveniencelibs " in - *" $deplib "*) ;; - *) - valid_a_lib=false - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=: - fi - ;; - pass_all) - valid_a_lib=: - ;; - esac - if $valid_a_lib; then - echo - $ECHO "*** Warning: Linking the shared library $output against the" - $ECHO "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - else - echo - $ECHO "*** Warning: Trying to link with static lib archive $deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because the file extensions .$libext of this argument makes me believe" - echo "*** that it is just a static archive that I should not use here." - fi - ;; - esac - continue - ;; - prog) - if test link != "$pass"; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test conv = "$pass"; then - deplibs="$deplib $deplibs" - elif test prog = "$linkmode"; then - if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then - # If there is no dlopen support or we're linking statically, - # we need to preload. - func_append newdlprefiles " $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - func_append newdlfiles " $deplib" - fi - fi - continue - ;; - %DEPLIBS%) - alldeplibs=: - continue - ;; - esac # case $deplib - - $found || test -f "$lib" \ - || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$lib" \ - || func_fatal_error "'$lib' is not a valid libtool archive" - - func_dirname "$lib" "" "." - ladir=$func_dirname_result - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - inherited_linker_flags= - # If the library was installed with an old release of libtool, - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no - avoidtemprpath= - - - # Read the .la file - func_source "$lib" - - # Convert "-framework foo" to "foo.ltframework" - if test -n "$inherited_linker_flags"; then - tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` - for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do - case " $new_inherited_linker_flags " in - *" $tmp_inherited_linker_flag "*) ;; - *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; - esac - done - fi - dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - if test lib,link = "$linkmode,$pass" || - test prog,scan = "$linkmode,$pass" || - { test prog != "$linkmode" && test lib != "$linkmode"; }; then - test -n "$dlopen" && func_append dlfiles " $dlopen" - test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" - fi - - if test conv = "$pass"; then - # Only check for convenience libraries - deplibs="$lib $deplibs" - if test -z "$libdir"; then - if test -z "$old_library"; then - func_fatal_error "cannot find name of link library for '$lib'" - fi - # It is a libtool convenience library, so add in its objects. - func_append convenience " $ladir/$objdir/$old_library" - func_append old_convenience " $ladir/$objdir/$old_library" - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if $opt_preserve_dup_deps; then - case "$tmp_libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append tmp_libs " $deplib" - done - elif test prog != "$linkmode" && test lib != "$linkmode"; then - func_fatal_error "'$lib' is not a convenience library" - fi - continue - fi # $pass = conv - - - # Get the name of the library we link against. - linklib= - if test -n "$old_library" && - { test yes = "$prefer_static_libs" || - test built,no = "$prefer_static_libs,$installed"; }; then - linklib=$old_library - else - for l in $old_library $library_names; do - linklib=$l - done - fi - if test -z "$linklib"; then - func_fatal_error "cannot find name of link library for '$lib'" - fi - - # This library was specified with -dlopen. - if test dlopen = "$pass"; then - test -z "$libdir" \ - && func_fatal_error "cannot -dlopen a convenience library: '$lib'" - if test -z "$dlname" || - test yes != "$dlopen_support" || - test no = "$build_libtool_libs" - then - # If there is no dlname, no dlopen support or we're linking - # statically, we need to preload. We also need to preload any - # dependent libraries so libltdl's deplib preloader doesn't - # bomb out in the load deplibs phase. - func_append dlprefiles " $lib $dependency_libs" - else - func_append newdlfiles " $lib" - fi - continue - fi # $pass = dlopen - - # We need an absolute path. - case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;; - *) - abs_ladir=`cd "$ladir" && pwd` - if test -z "$abs_ladir"; then - func_warning "cannot determine absolute directory name of '$ladir'" - func_warning "passing it literally to the linker, although it might fail" - abs_ladir=$ladir - fi - ;; - esac - func_basename "$lib" - laname=$func_basename_result - - # Find the relevant object directory and library name. - if test yes = "$installed"; then - if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - func_warning "library '$lib' was moved." - dir=$ladir - absdir=$abs_ladir - libdir=$abs_ladir - else - dir=$lt_sysroot$libdir - absdir=$lt_sysroot$libdir - fi - test yes = "$hardcode_automatic" && avoidtemprpath=yes - else - if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir=$ladir - absdir=$abs_ladir - # Remove this search path later - func_append notinst_path " $abs_ladir" - else - dir=$ladir/$objdir - absdir=$abs_ladir/$objdir - # Remove this search path later - func_append notinst_path " $abs_ladir" - fi - fi # $installed = yes - func_stripname 'lib' '.la' "$laname" - name=$func_stripname_result - - # This library was specified with -dlpreopen. - if test dlpreopen = "$pass"; then - if test -z "$libdir" && test prog = "$linkmode"; then - func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" - fi - case $host in - # special handling for platforms with PE-DLLs. - *cygwin* | *mingw* | *cegcc* ) - # Linker will automatically link against shared library if both - # static and shared are present. Therefore, ensure we extract - # symbols from the import library if a shared library is present - # (otherwise, the dlopen module name will be incorrect). We do - # this by putting the import library name into $newdlprefiles. - # We recover the dlopen module name by 'saving' the la file - # name in a special purpose variable, and (later) extracting the - # dlname from the la file. - if test -n "$dlname"; then - func_tr_sh "$dir/$linklib" - eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" - func_append newdlprefiles " $dir/$linklib" - else - func_append newdlprefiles " $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - func_append dlpreconveniencelibs " $dir/$old_library" - fi - ;; - * ) - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - func_append newdlprefiles " $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - func_append dlpreconveniencelibs " $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - func_append newdlprefiles " $dir/$dlname" - else - func_append newdlprefiles " $dir/$linklib" - fi - ;; - esac - fi # $pass = dlpreopen - - if test -z "$libdir"; then - # Link the convenience library - if test lib = "$linkmode"; then - deplibs="$dir/$old_library $deplibs" - elif test prog,link = "$linkmode,$pass"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" - else - deplibs="$lib $deplibs" # used for prog,scan pass - fi - continue - fi - - - if test prog = "$linkmode" && test link != "$pass"; then - func_append newlib_search_path " $ladir" - deplibs="$lib $deplibs" - - linkalldeplibs=false - if test no != "$link_all_deplibs" || test -z "$library_names" || - test no = "$build_libtool_libs"; then - linkalldeplibs=: - fi - - tmp_libs= - for deplib in $dependency_libs; do - case $deplib in - -L*) func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - esac - # Need to link against all dependency_libs? - if $linkalldeplibs; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi - if $opt_preserve_dup_deps; then - case "$tmp_libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append tmp_libs " $deplib" - done # for deplib - continue - fi # $linkmode = prog... - - if test prog,link = "$linkmode,$pass"; then - if test -n "$library_names" && - { { test no = "$prefer_static_libs" || - test built,yes = "$prefer_static_libs,$installed"; } || - test -z "$old_library"; }; then - # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then - # Make sure the rpath contains only unique directories. - case $temp_rpath: in - *"$absdir:"*) ;; - *) func_append temp_rpath "$absdir:" ;; - esac - fi - - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) func_append compile_rpath " $absdir" ;; - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - ;; - esac - fi # $linkmode,$pass = prog,link... - - if $alldeplibs && - { test pass_all = "$deplibs_check_method" || - { test yes = "$build_libtool_libs" && - test -n "$library_names"; }; }; then - # We only need to search for static libraries - continue - fi - fi - - link_static=no # Whether the deplib will be linked statically - use_static_libs=$prefer_static_libs - if test built = "$use_static_libs" && test yes = "$installed"; then - use_static_libs=no - fi - if test -n "$library_names" && - { test no = "$use_static_libs" || test -z "$old_library"; }; then - case $host in - *cygwin* | *mingw* | *cegcc* | *os2*) - # No point in relinking DLLs because paths are not encoded - func_append notinst_deplibs " $lib" - need_relink=no - ;; - *) - if test no = "$installed"; then - func_append notinst_deplibs " $lib" - need_relink=yes - fi - ;; - esac - # This is a shared library - - # Warn about portability, can't link against -module's on some - # systems (darwin). Don't bleat about dlopened modules though! - dlopenmodule= - for dlpremoduletest in $dlprefiles; do - if test "X$dlpremoduletest" = "X$lib"; then - dlopenmodule=$dlpremoduletest - break - fi - done - if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then - echo - if test prog = "$linkmode"; then - $ECHO "*** Warning: Linking the executable $output against the loadable module" - else - $ECHO "*** Warning: Linking the shared library $output against the loadable module" - fi - $ECHO "*** $linklib is not portable!" - fi - if test lib = "$linkmode" && - test yes = "$hardcode_into_libs"; then - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) func_append compile_rpath " $absdir" ;; - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - ;; - esac - fi - - if test -n "$old_archive_from_expsyms_cmds"; then - # figure out the soname - set dummy $library_names - shift - realname=$1 - shift - libname=`eval "\\$ECHO \"$libname_spec\""` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname=$dlname - elif test -n "$soname_spec"; then - # bleh windows - case $host in - *cygwin* | mingw* | *cegcc* | *os2*) - func_arith $current - $age - major=$func_arith_result - versuffix=-$major - ;; - esac - eval soname=\"$soname_spec\" - else - soname=$realname - fi - - # Make a new name for the extract_expsyms_cmds to use - soroot=$soname - func_basename "$soroot" - soname=$func_basename_result - func_stripname 'lib' '.dll' "$soname" - newlib=libimp-$func_stripname_result.a - - # If the library has no export list, then create one now - if test -f "$output_objdir/$soname-def"; then : - else - func_verbose "extracting exported symbol list from '$soname'" - func_execute_cmds "$extract_expsyms_cmds" 'exit $?' - fi - - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - func_verbose "generating import library for '$soname'" - func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - - if test prog = "$linkmode" || test relink != "$opt_mode"; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test no = "$hardcode_direct"; then - add=$dir/$linklib - case $host in - *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;; - *-*-sysv4*uw2*) add_dir=-L$dir ;; - *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir=-L$dir ;; - *-*-darwin* ) - # if the lib is a (non-dlopened) module then we cannot - # link against it, someone is ignoring the earlier warnings - if /usr/bin/file -L $add 2> /dev/null | - $GREP ": [^:]* bundle" >/dev/null; then - if test "X$dlopenmodule" != "X$lib"; then - $ECHO "*** Warning: lib $linklib is a module, not a shared library" - if test -z "$old_library"; then - echo - echo "*** And there doesn't seem to be a static archive available" - echo "*** The link will probably fail, sorry" - else - add=$dir/$old_library - fi - elif test -n "$old_library"; then - add=$dir/$old_library - fi - fi - esac - elif test no = "$hardcode_minus_L"; then - case $host in - *-*-sunos*) add_shlibpath=$dir ;; - esac - add_dir=-L$dir - add=-l$name - elif test no = "$hardcode_shlibpath_var"; then - add_shlibpath=$dir - add=-l$name - else - lib_linked=no - fi - ;; - relink) - if test yes = "$hardcode_direct" && - test no = "$hardcode_direct_absolute"; then - add=$dir/$linklib - elif test yes = "$hardcode_minus_L"; then - add_dir=-L$absdir - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - func_append add_dir " -L$inst_prefix_dir$libdir" - ;; - esac - fi - add=-l$name - elif test yes = "$hardcode_shlibpath_var"; then - add_shlibpath=$dir - add=-l$name - else - lib_linked=no - fi - ;; - *) lib_linked=no ;; - esac - - if test yes != "$lib_linked"; then - func_fatal_configuration "unsupported hardcode properties" - fi - - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) func_append compile_shlibpath "$add_shlibpath:" ;; - esac - fi - if test prog = "$linkmode"; then - test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" - test -n "$add" && compile_deplibs="$add $compile_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - if test yes != "$hardcode_direct" && - test yes != "$hardcode_minus_L" && - test yes = "$hardcode_shlibpath_var"; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) func_append finalize_shlibpath "$libdir:" ;; - esac - fi - fi - fi - - if test prog = "$linkmode" || test relink = "$opt_mode"; then - add_shlibpath= - add_dir= - add= - # Finalize command for both is simple: just hardcode it. - if test yes = "$hardcode_direct" && - test no = "$hardcode_direct_absolute"; then - add=$libdir/$linklib - elif test yes = "$hardcode_minus_L"; then - add_dir=-L$libdir - add=-l$name - elif test yes = "$hardcode_shlibpath_var"; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) func_append finalize_shlibpath "$libdir:" ;; - esac - add=-l$name - elif test yes = "$hardcode_automatic"; then - if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib"; then - add=$inst_prefix_dir$libdir/$linklib - else - add=$libdir/$linklib - fi - else - # We cannot seem to hardcode it, guess we'll fake it. - add_dir=-L$libdir - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - func_append add_dir " -L$inst_prefix_dir$libdir" - ;; - esac - fi - add=-l$name - fi - - if test prog = "$linkmode"; then - test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" - test -n "$add" && finalize_deplibs="$add $finalize_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - fi - fi - elif test prog = "$linkmode"; then - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test unsupported != "$hardcode_direct"; then - test -n "$old_library" && linklib=$old_library - compile_deplibs="$dir/$linklib $compile_deplibs" - finalize_deplibs="$dir/$linklib $finalize_deplibs" - else - compile_deplibs="-l$name -L$dir $compile_deplibs" - finalize_deplibs="-l$name -L$dir $finalize_deplibs" - fi - elif test yes = "$build_libtool_libs"; then - # Not a shared library - if test pass_all != "$deplibs_check_method"; then - # We're trying link a shared library against a static one - # but the system doesn't support it. - - # Just print a warning and add the library to dependency_libs so - # that the program can be linked against the static library. - echo - $ECHO "*** Warning: This system cannot link to static lib archive $lib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have." - if test yes = "$module"; then - echo "*** But as you try to build a module library, libtool will still create " - echo "*** a static module, that should work as long as the dlopening application" - echo "*** is linked with the -dlopen flag to resolve symbols at runtime." - if test -z "$global_symbol_pipe"; then - echo - echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using 'nm' or equivalent, but libtool could" - echo "*** not find such a program. So, this module is probably useless." - echo "*** 'nm' from GNU binutils and a full rebuild may help." - fi - if test no = "$build_old_libs"; then - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - else - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? - - if test lib = "$linkmode"; then - if test -n "$dependency_libs" && - { test yes != "$hardcode_into_libs" || - test yes = "$build_old_libs" || - test yes = "$link_static"; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do - case $libdir in - -R*) func_stripname '-R' '' "$libdir" - temp_xrpath=$func_stripname_result - case " $xrpath " in - *" $temp_xrpath "*) ;; - *) func_append xrpath " $temp_xrpath";; - esac;; - *) func_append temp_deplibs " $libdir";; - esac - done - dependency_libs=$temp_deplibs - fi - - func_append newlib_search_path " $absdir" - # Link against this library - test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" - case $deplib in - -L*) func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result";; - *) func_resolve_sysroot "$deplib" ;; - esac - if $opt_preserve_dup_deps; then - case "$tmp_libs " in - *" $func_resolve_sysroot_result "*) - func_append specialdeplibs " $func_resolve_sysroot_result" ;; - esac - fi - func_append tmp_libs " $func_resolve_sysroot_result" - done - - if test no != "$link_all_deplibs"; then - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - path= - case $deplib in - -L*) path=$deplib ;; - *.la) - func_resolve_sysroot "$deplib" - deplib=$func_resolve_sysroot_result - func_dirname "$deplib" "" "." - dir=$func_dirname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - func_warning "cannot determine absolute directory name of '$dir'" - absdir=$dir - fi - ;; - esac - if $GREP "^installed=no" $deplib > /dev/null; then - case $host in - *-*-darwin*) - depdepl= - eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names"; then - for tmp in $deplibrary_names; do - depdepl=$tmp - done - if test -f "$absdir/$objdir/$depdepl"; then - depdepl=$absdir/$objdir/$depdepl - darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - if test -z "$darwin_install_name"; then - darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - fi - func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" - func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" - path= - fi - fi - ;; - *) - path=-L$absdir/$objdir - ;; - esac - else - eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "'$deplib' is not a valid libtool archive" - test "$absdir" != "$libdir" && \ - func_warning "'$deplib' seems to be moved" - - path=-L$absdir - fi - ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - if test link = "$pass"; then - if test prog = "$linkmode"; then - compile_deplibs="$new_inherited_linker_flags $compile_deplibs" - finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" - else - compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - fi - fi - dependency_libs=$newdependency_libs - if test dlpreopen = "$pass"; then - # Link the dlpreopened libraries before other libraries - for deplib in $save_deplibs; do - deplibs="$deplib $deplibs" - done - fi - if test dlopen != "$pass"; then - test conv = "$pass" || { - # Make sure lib_search_path contains only unique directories. - lib_search_path= - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; - *) func_append lib_search_path " $dir" ;; - esac - done - newlib_search_path= - } - - if test prog,link = "$linkmode,$pass"; then - vars="compile_deplibs finalize_deplibs" - else - vars=deplibs - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order - eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - # FIXME: Pedantically, this is the right thing to do, so - # that some nasty dependency loop isn't accidentally - # broken: - #new_libs="$deplib $new_libs" - # Pragmatically, this seems to cause very few problems in - # practice: - case $deplib in - -L*) new_libs="$deplib $new_libs" ;; - -R*) ;; - *) - # And here is the reason: when a library appears more - # than once as an explicit dependence of a library, or - # is implicitly linked in more than once by the - # compiler, it is considered special, and multiple - # occurrences thereof are not removed. Compare this - # with having the same library being listed as a - # dependency of multiple other libraries: in this case, - # we know (pedantically, we assume) the library does not - # need to be listed more than once, so we keep only the - # last copy. This is not always right, but it is rare - # enough that we require users that really mean to play - # such unportable linking tricks to link the library - # using -Wl,-lname, so that libtool does not consider it - # for duplicate removal. - case " $specialdeplibs " in - *" $deplib "*) new_libs="$deplib $new_libs" ;; - *) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$deplib $new_libs" ;; - esac - ;; - esac - ;; - esac - done - tmp_libs= - for deplib in $new_libs; do - case $deplib in - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; - *) func_append tmp_libs " $deplib" ;; - esac - ;; - *) func_append tmp_libs " $deplib" ;; - esac - done - eval $var=\"$tmp_libs\" - done # for var - fi - - # Add Sun CC postdeps if required: - test CXX = "$tagname" && { - case $host_os in - linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C++ 5.9 - func_suncc_cstd_abi - - if test no != "$suncc_use_cstd_abi"; then - func_append postdeps ' -library=Cstd -library=Crun' - fi - ;; - esac - ;; - - solaris*) - func_cc_basename "$CC" - case $func_cc_basename_result in - CC* | sunCC*) - func_suncc_cstd_abi - - if test no != "$suncc_use_cstd_abi"; then - func_append postdeps ' -library=Cstd -library=Crun' - fi - ;; - esac - ;; - esac - } - - # Last step: remove runtime libs from dependency_libs - # (they stay in deplibs) - tmp_libs= - for i in $dependency_libs; do - case " $predeps $postdeps $compiler_lib_search_path " in - *" $i "*) - i= - ;; - esac - if test -n "$i"; then - func_append tmp_libs " $i" - fi - done - dependency_libs=$tmp_libs - done # for pass - if test prog = "$linkmode"; then - dlfiles=$newdlfiles - fi - if test prog = "$linkmode" || test lib = "$linkmode"; then - dlprefiles=$newdlprefiles - fi - - case $linkmode in - oldlib) - if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then - func_warning "'-dlopen' is ignored for archives" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "'-l' and '-L' are ignored for archives" ;; - esac - - test -n "$rpath" && \ - func_warning "'-rpath' is ignored for archives" - - test -n "$xrpath" && \ - func_warning "'-R' is ignored for archives" - - test -n "$vinfo" && \ - func_warning "'-version-info/-version-number' is ignored for archives" - - test -n "$release" && \ - func_warning "'-release' is ignored for archives" - - test -n "$export_symbols$export_symbols_regex" && \ - func_warning "'-export-symbols' is ignored for archives" - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs=$output - func_append objs "$old_deplibs" - ;; - - lib) - # Make sure we only generate libraries of the form 'libNAME.la'. - case $outputname in - lib*) - func_stripname 'lib' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - test no = "$module" \ - && func_fatal_help "libtool library '$output' must begin with 'lib'" - - if test no != "$need_lib_prefix"; then - # Add the "lib" prefix for modules if required - func_stripname '' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - func_stripname '' '.la' "$outputname" - libname=$func_stripname_result - fi - ;; - esac - - if test -n "$objs"; then - if test pass_all != "$deplibs_check_method"; then - func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" - else - echo - $ECHO "*** Warning: Linking the shared library $output against the non-libtool" - $ECHO "*** objects $objs is not portable!" - func_append libobjs " $objs" - fi - fi - - test no = "$dlself" \ - || func_warning "'-dlopen self' is ignored for libtool libraries" - - set dummy $rpath - shift - test 1 -lt "$#" \ - && func_warning "ignoring multiple '-rpath's for a libtool library" - - install_libdir=$1 - - oldlibs= - if test -z "$rpath"; then - if test yes = "$build_libtool_libs"; then - # Building a libtool convenience library. - # Some compilers have problems with a '.al' extension so - # convenience libraries should have the same extension an - # archive normally would. - oldlibs="$output_objdir/$libname.$libext $oldlibs" - build_libtool_libs=convenience - build_old_libs=yes - fi - - test -n "$vinfo" && \ - func_warning "'-version-info/-version-number' is ignored for convenience libraries" - - test -n "$release" && \ - func_warning "'-release' is ignored for convenience libraries" - else - - # Parse the version information argument. - save_ifs=$IFS; IFS=: - set dummy $vinfo 0 0 0 - shift - IFS=$save_ifs - - test -n "$7" && \ - func_fatal_help "too many parameters to '-version-info'" - - # convert absolute version numbers to libtool ages - # this retains compatibility with .la files and attempts - # to make the code below a bit more comprehensible - - case $vinfo_number in - yes) - number_major=$1 - number_minor=$2 - number_revision=$3 - # - # There are really only two kinds -- those that - # use the current revision as the major version - # and those that subtract age and use age as - # a minor version. But, then there is irix - # that has an extra 1 added just for fun - # - case $version_type in - # correct linux to gnu/linux during the next big refactor - darwin|freebsd-elf|linux|osf|windows|none) - func_arith $number_major + $number_minor - current=$func_arith_result - age=$number_minor - revision=$number_revision - ;; - freebsd-aout|qnx|sunos) - current=$number_major - revision=$number_minor - age=0 - ;; - irix|nonstopux) - func_arith $number_major + $number_minor - current=$func_arith_result - age=$number_minor - revision=$number_minor - lt_irix_increment=no - ;; - *) - func_fatal_configuration "$modename: unknown library version type '$version_type'" - ;; - esac - ;; - no) - current=$1 - revision=$2 - age=$3 - ;; - esac - - # Check that each of the things are valid numbers. - case $current in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "CURRENT '$current' must be a nonnegative integer" - func_fatal_error "'$vinfo' is not valid version information" - ;; - esac - - case $revision in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "REVISION '$revision' must be a nonnegative integer" - func_fatal_error "'$vinfo' is not valid version information" - ;; - esac - - case $age in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "AGE '$age' must be a nonnegative integer" - func_fatal_error "'$vinfo' is not valid version information" - ;; - esac - - if test "$age" -gt "$current"; then - func_error "AGE '$age' is greater than the current interface number '$current'" - func_fatal_error "'$vinfo' is not valid version information" - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case $version_type in - none) ;; - - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - func_arith $current - $age - major=.$func_arith_result - versuffix=$major.$age.$revision - # Darwin ld doesn't like 0 for these options... - func_arith $current + 1 - minor_current=$func_arith_result - xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - # On Darwin other compilers - case $CC in - nagfor*) - verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" - ;; - *) - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - ;; - esac - ;; - - freebsd-aout) - major=.$current - versuffix=.$current.$revision - ;; - - freebsd-elf) - func_arith $current - $age - major=.$func_arith_result - versuffix=$major.$age.$revision - ;; - - irix | nonstopux) - if test no = "$lt_irix_increment"; then - func_arith $current - $age - else - func_arith $current - $age + 1 - fi - major=$func_arith_result - - case $version_type in - nonstopux) verstring_prefix=nonstopux ;; - *) verstring_prefix=sgi ;; - esac - verstring=$verstring_prefix$major.$revision - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test 0 -ne "$loop"; do - func_arith $revision - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring=$verstring_prefix$major.$iface:$verstring - done - - # Before this point, $major must not contain '.'. - major=.$major - versuffix=$major.$revision - ;; - - linux) # correct to gnu/linux during the next big refactor - func_arith $current - $age - major=.$func_arith_result - versuffix=$major.$age.$revision - ;; - - osf) - func_arith $current - $age - major=.$func_arith_result - versuffix=.$current.$age.$revision - verstring=$current.$age.$revision - - # Add in all the interfaces that we are compatible with. - loop=$age - while test 0 -ne "$loop"; do - func_arith $current - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring=$verstring:$iface.0 - done - - # Make executables depend on our current version. - func_append verstring ":$current.0" - ;; - - qnx) - major=.$current - versuffix=.$current - ;; - - sco) - major=.$current - versuffix=.$current - ;; - - sunos) - major=.$current - versuffix=.$current.$revision - ;; - - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 file systems. - func_arith $current - $age - major=$func_arith_result - versuffix=-$major - ;; - - *) - func_fatal_configuration "unknown library version type '$version_type'" - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - case $version_type in - darwin) - # we can't check for "0.0" in archive_cmds due to quoting - # problems, so we reset it completely - verstring= - ;; - *) - verstring=0.0 - ;; - esac - if test no = "$need_version"; then - versuffix= - else - versuffix=.0.0 - fi - fi - - # Remove version info from name if versioning should be avoided - if test yes,no = "$avoid_version,$need_version"; then - major= - versuffix= - verstring= - fi - - # Check to see if the archive will have undefined symbols. - if test yes = "$allow_undefined"; then - if test unsupported = "$allow_undefined_flag"; then - if test yes = "$build_old_libs"; then - func_warning "undefined symbols not allowed in $host shared libraries; building static only" - build_libtool_libs=no - else - func_fatal_error "can't build $host shared library unless -no-undefined is specified" - fi - fi - else - # Don't allow undefined symbols. - allow_undefined_flag=$no_undefined_flag - fi - - fi - - func_generate_dlsyms "$libname" "$libname" : - func_append libobjs " $symfileobj" - test " " = "$libobjs" && libobjs= - - if test relink != "$opt_mode"; then - # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. - removelist= - tempremovelist=`$ECHO "$output_objdir/*"` - for p in $tempremovelist; do - case $p in - *.$objext | *.gcno) - ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) - if test -n "$precious_files_regex"; then - if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 - then - continue - fi - fi - func_append removelist " $p" - ;; - *) ;; - esac - done - test -n "$removelist" && \ - func_show_eval "${RM}r \$removelist" - fi - - # Now set the variables for building old libraries. - if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then - func_append oldlibs " $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` - fi - - # Eliminate all temporary directories. - #for path in $notinst_path; do - # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` - # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` - # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` - #done - - if test -n "$xrpath"; then - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do - func_replace_sysroot "$libdir" - func_append temp_xrpath " -R$func_replace_sysroot_result" - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - done - if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi - - # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles=$dlfiles - dlfiles= - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; - *) func_append dlfiles " $lib" ;; - esac - done - - # Make sure dlprefiles contains only unique files - old_dlprefiles=$dlprefiles - dlprefiles= - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; - *) func_append dlprefiles " $lib" ;; - esac - done - - if test yes = "$build_libtool_libs"; then - if test -n "$rpath"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework - func_append deplibs " System.ltframework" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - ;; - *) - # Add libc to deplibs on all other systems if necessary. - if test yes = "$build_libtool_need_lc"; then - func_append deplibs " -lc" - fi - ;; - esac - fi - - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # I'm not sure if I'm treating the release correctly. I think - # release should show up in the -l (ie -lgmp5) so we don't want to - # add it in twice. Is that correct? - release= - versuffix= - major= - newdeplibs= - droppeddeps=no - case $deplibs_check_method in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behavior. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $opt_dry_run || $RM conftest.c - cat > conftest.c </dev/null` - $nocaseglob - else - potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` - fi - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null | - $GREP " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib=$potent_lib - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | $SED 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;; - *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | - $SED -e 10q | - $EGREP "$file_magic_regex" > /dev/null; then - func_append newdeplibs " $a_deplib" - a_deplib= - break 2 - fi - done - done - fi - if test -n "$a_deplib"; then - droppeddeps=yes - echo - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib"; then - $ECHO "*** with $libname but no candidates were found. (...for file magic test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a file magic. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - func_append newdeplibs " $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - for a_deplib in $deplibs; do - case $a_deplib in - -l*) - func_stripname -l '' "$a_deplib" - name=$func_stripname_result - if test yes = "$allow_libtool_libs_with_static_runtimes"; then - case " $predeps $postdeps " in - *" $a_deplib "*) - func_append newdeplibs " $a_deplib" - a_deplib= - ;; - esac - fi - if test -n "$a_deplib"; then - libname=`eval "\\$ECHO \"$libname_spec\""` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - potlib=$potent_lib # see symlink-check above in file_magic test - if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ - $EGREP "$match_pattern_regex" > /dev/null; then - func_append newdeplibs " $a_deplib" - a_deplib= - break 2 - fi - done - done - fi - if test -n "$a_deplib"; then - droppeddeps=yes - echo - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib"; then - $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a regex pattern. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - func_append newdeplibs " $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs= - tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` - if test yes = "$allow_libtool_libs_with_static_runtimes"; then - for i in $predeps $postdeps; do - # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` - done - fi - case $tmp_deplibs in - *[!\ \ ]*) - echo - if test none = "$deplibs_check_method"; then - echo "*** Warning: inter-library dependencies are not supported in this platform." - else - echo "*** Warning: inter-library dependencies are not known to be supported." - fi - echo "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - ;; - esac - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library with the System framework - newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` - ;; - esac - - if test yes = "$droppeddeps"; then - if test yes = "$module"; then - echo - echo "*** Warning: libtool could not satisfy all declared inter-library" - $ECHO "*** dependencies of module $libname. Therefore, libtool will create" - echo "*** a static module, that should work as long as the dlopening" - echo "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - echo - echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using 'nm' or equivalent, but libtool could" - echo "*** not find such a program. So, this module is probably useless." - echo "*** 'nm' from GNU binutils and a full rebuild may help." - fi - if test no = "$build_old_libs"; then - oldlibs=$output_objdir/$libname.$libext - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - echo "*** The inter-library dependencies that have been dropped here will be" - echo "*** automatically added whenever a program is linked with this library" - echo "*** or is declared to -dlopen it." - - if test no = "$allow_undefined"; then - echo - echo "*** Since this library must not contain undefined symbols," - echo "*** because either the platform does not support them or" - echo "*** it was explicitly requested with -no-undefined," - echo "*** libtool will only create a static version of it." - if test no = "$build_old_libs"; then - oldlibs=$output_objdir/$libname.$libext - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - case $host in - *-*-darwin*) - newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $deplibs " in - *" -L$path/$objdir "*) - func_append new_libs " -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) func_append new_libs " $deplib" ;; - esac - ;; - *) func_append new_libs " $deplib" ;; - esac - done - deplibs=$new_libs - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= - - # Test again, we may have decided not to build it any more - if test yes = "$build_libtool_libs"; then - # Remove $wl instances when linking with ld. - # FIXME: should test the right _cmds variable. - case $archive_cmds in - *\$LD\ *) wl= ;; - esac - if test yes = "$hardcode_into_libs"; then - # Hardcode the library paths - hardcode_libdirs= - dep_rpath= - rpath=$finalize_rpath - test relink = "$opt_mode" || rpath=$compile_rpath$rpath - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - func_replace_sysroot "$libdir" - libdir=$func_replace_sysroot_result - if test -z "$hardcode_libdirs"; then - hardcode_libdirs=$libdir - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - func_append dep_rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) func_append perm_rpath " $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir=$hardcode_libdirs - eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" - fi - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - func_append rpath "$dir:" - done - eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi - - shlibpath=$finalize_shlibpath - test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath - if test -n "$shlibpath"; then - eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi - - # Get the real and link names of the library. - eval shared_ext=\"$shrext_cmds\" - eval library_names=\"$library_names_spec\" - set dummy $library_names - shift - realname=$1 - shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname=$realname - fi - if test -z "$dlname"; then - dlname=$soname - fi - - lib=$output_objdir/$realname - linknames= - for link - do - func_append linknames " $link" - done - - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` - test "X$libobjs" = "X " && libobjs= - - delfiles= - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" - export_symbols=$output_objdir/$libname.uexp - func_append delfiles " $export_symbols" - fi - - orig_export_symbols= - case $host_os in - cygwin* | mingw* | cegcc*) - if test -n "$export_symbols" && test -z "$export_symbols_regex"; then - # exporting using user supplied symfile - func_dll_def_p "$export_symbols" || { - # and it's NOT already a .def file. Must figure out - # which of the given symbols are data symbols and tag - # them as such. So, trigger use of export_symbols_cmds. - # export_symbols gets reassigned inside the "prepare - # the list of exported symbols" if statement, so the - # include_expsyms logic still works. - orig_export_symbols=$export_symbols - export_symbols= - always_export_symbols=yes - } - fi - ;; - esac - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then - func_verbose "generating symbol list for '$libname.la'" - export_symbols=$output_objdir/$libname.exp - $opt_dry_run || $RM $export_symbols - cmds=$export_symbols_cmds - save_ifs=$IFS; IFS='~' - for cmd1 in $cmds; do - IFS=$save_ifs - # Take the normal branch if the nm_file_list_spec branch - # doesn't work or if tool conversion is not needed. - case $nm_file_list_spec~$to_tool_file_cmd in - *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) - try_normal_branch=yes - eval cmd=\"$cmd1\" - func_len " $cmd" - len=$func_len_result - ;; - *) - try_normal_branch=no - ;; - esac - if test yes = "$try_normal_branch" \ - && { test "$len" -lt "$max_cmd_len" \ - || test "$max_cmd_len" -le -1; } - then - func_show_eval "$cmd" 'exit $?' - skipped_export=false - elif test -n "$nm_file_list_spec"; then - func_basename "$output" - output_la=$func_basename_result - save_libobjs=$libobjs - save_output=$output - output=$output_objdir/$output_la.nm - func_to_tool_file "$output" - libobjs=$nm_file_list_spec$func_to_tool_file_result - func_append delfiles " $output" - func_verbose "creating $NM input file list: $output" - for obj in $save_libobjs; do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" - done > "$output" - eval cmd=\"$cmd1\" - func_show_eval "$cmd" 'exit $?' - output=$save_output - libobjs=$save_libobjs - skipped_export=false - else - # The command line is too long to execute in one step. - func_verbose "using reloadable object file for export list..." - skipped_export=: - # Break out early, otherwise skipped_export may be - # set to false by a later but shorter cmd. - break - fi - done - IFS=$save_ifs - if test -n "$export_symbols_regex" && test : != "$skipped_export"; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols=$export_symbols - test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols - $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' - fi - - if test : != "$skipped_export" && test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for '$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands, which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - func_append delfiles " $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - - tmp_deplibs= - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; - *) - func_append tmp_deplibs " $test_deplib" - ;; - esac - done - deplibs=$tmp_deplibs - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec" && - test yes = "$compiler_needs_object" && - test -z "$libobjs"; then - # extract the archives, so we have objects to list. - # TODO: could optimize this to just extract one archive. - whole_archive_flag_spec= - fi - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - else - gentop=$output_objdir/${outputname}x - func_append generated " $gentop" - - func_extract_archives $gentop $convenience - func_append libobjs " $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - fi - - if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - func_append linker_flags " $flag" - fi - - # Make a backup of the uninstalled library when relinking - if test relink = "$opt_mode"; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test yes = "$module" && test -n "$module_cmds"; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds - else - eval test_cmds=\"$module_cmds\" - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else - eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi - fi - - if test : != "$skipped_export" && - func_len " $test_cmds" && - len=$func_len_result && - test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else - # The command line is too long to link in one step, link piecewise - # or, if using GNU ld and skipped_export is not :, use a linker - # script. - - # Save the value of $output and $libobjs because we want to - # use them later. If we have whole_archive_flag_spec, we - # want to use save_libobjs as it was before - # whole_archive_flag_spec was expanded, because we can't - # assume the linker understands whole_archive_flag_spec. - # This may have to be revisited, in case too many - # convenience libraries get linked in and end up exceeding - # the spec. - if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - fi - save_output=$output - func_basename "$output" - output_la=$func_basename_result - - # Clear the reloadable object creation command queue and - # initialize k to one. - test_cmds= - concat_cmds= - objlist= - last_robj= - k=1 - - if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then - output=$output_objdir/$output_la.lnkscript - func_verbose "creating GNU ld script: $output" - echo 'INPUT (' > $output - for obj in $save_libobjs - do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" >> $output - done - echo ')' >> $output - func_append delfiles " $output" - func_to_tool_file "$output" - output=$func_to_tool_file_result - elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then - output=$output_objdir/$output_la.lnk - func_verbose "creating linker input file list: $output" - : > $output - set x $save_libobjs - shift - firstobj= - if test yes = "$compiler_needs_object"; then - firstobj="$1 " - shift - fi - for obj - do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" >> $output - done - func_append delfiles " $output" - func_to_tool_file "$output" - output=$firstobj\"$file_list_spec$func_to_tool_file_result\" - else - if test -n "$save_libobjs"; then - func_verbose "creating reloadable object files..." - output=$output_objdir/$output_la-$k.$objext - eval test_cmds=\"$reload_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - if test -z "$objlist" || - test "$len" -lt "$max_cmd_len"; then - func_append objlist " $obj" - else - # The command $test_cmds is almost too long, add a - # command to the queue. - if test 1 -eq "$k"; then - # The first file doesn't have a previous command to add. - reload_objs=$objlist - eval concat_cmds=\"$reload_cmds\" - else - # All subsequent reloadable object files will link in - # the last one created. - reload_objs="$objlist $last_robj" - eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" - fi - last_robj=$output_objdir/$output_la-$k.$objext - func_arith $k + 1 - k=$func_arith_result - output=$output_objdir/$output_la-$k.$objext - objlist=" $obj" - func_len " $last_robj" - func_arith $len0 + $func_len_result - len=$func_arith_result - fi - done - # Handle the remaining objects by creating one last - # reloadable object file. All subsequent reloadable object - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - reload_objs="$objlist $last_robj" - eval concat_cmds=\"\$concat_cmds$reload_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" - fi - func_append delfiles " $output" - - else - output= - fi - - ${skipped_export-false} && { - func_verbose "generating symbol list for '$libname.la'" - export_symbols=$output_objdir/$libname.exp - $opt_dry_run || $RM $export_symbols - libobjs=$output - # Append the command to create the export file. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" - fi - } - - test -n "$save_libobjs" && - func_verbose "creating a temporary reloadable object file: $output" - - # Loop through the commands generated above and execute them. - save_ifs=$IFS; IFS='~' - for cmd in $concat_cmds; do - IFS=$save_ifs - $opt_quiet || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test relink = "$opt_mode"; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS=$save_ifs - - if test -n "$export_symbols_regex" && ${skipped_export-false}; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - - ${skipped_export-false} && { - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols=$export_symbols - test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols - $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' - fi - - if test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for '$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands, which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - func_append delfiles " $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - } - - libobjs=$output - # Restore the value of output. - output=$save_output - - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - fi - # Expand the library linking commands again to reset the - # value of $libobjs for piecewise linking. - - # Do each of the archive commands. - if test yes = "$module" && test -n "$module_cmds"; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - cmds=$module_expsym_cmds - else - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds - else - cmds=$archive_cmds - fi - fi - fi - - if test -n "$delfiles"; then - # Append the command to remove temporary files to $cmds. - eval cmds=\"\$cmds~\$RM $delfiles\" - fi - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop=$output_objdir/${outputname}x - func_append generated " $gentop" - - func_extract_archives $gentop $dlprefiles - func_append libobjs " $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - - save_ifs=$IFS; IFS='~' - for cmd in $cmds; do - IFS=$sp$nl - eval cmd=\"$cmd\" - IFS=$save_ifs - $opt_quiet || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test relink = "$opt_mode"; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS=$save_ifs - - # Restore the uninstalled library and exit - if test relink = "$opt_mode"; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? - - if test -n "$convenience"; then - if test -z "$whole_archive_flag_spec"; then - func_show_eval '${RM}r "$gentop"' - fi - fi - - exit $EXIT_SUCCESS - fi - - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test yes = "$module" || test yes = "$export_dynamic"; then - # On all known operating systems, these are identical. - dlname=$soname - fi - fi - ;; - - obj) - if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then - func_warning "'-dlopen' is ignored for objects" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "'-l' and '-L' are ignored for objects" ;; - esac - - test -n "$rpath" && \ - func_warning "'-rpath' is ignored for objects" - - test -n "$xrpath" && \ - func_warning "'-R' is ignored for objects" - - test -n "$vinfo" && \ - func_warning "'-version-info' is ignored for objects" - - test -n "$release" && \ - func_warning "'-release' is ignored for objects" - - case $output in - *.lo) - test -n "$objs$old_deplibs" && \ - func_fatal_error "cannot build library object '$output' from non-libtool objects" - - libobj=$output - func_lo2o "$libobj" - obj=$func_lo2o_result - ;; - *) - libobj= - obj=$output - ;; - esac - - # Delete the old objects. - $opt_dry_run || $RM $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # if reload_cmds runs $LD directly, get rid of -Wl from - # whole_archive_flag_spec and hope we can get by with turning comma - # into space. - case $reload_cmds in - *\$LD[\ \$]*) wl= ;; - esac - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` - reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags - else - gentop=$output_objdir/${obj}x - func_append generated " $gentop" - - func_extract_archives $gentop $convenience - reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi - - # If we're not building shared, we need to use non_pic_objs - test yes = "$build_libtool_libs" || libobjs=$non_pic_objects - - # Create the old-style object. - reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs - - output=$obj - func_execute_cmds "$reload_cmds" 'exit $?' - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - fi - - test yes = "$build_libtool_libs" || { - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS - } - - if test -n "$pic_flag" || test default != "$pic_mode"; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output=$libobj - func_execute_cmds "$reload_cmds" 'exit $?' - fi - - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - ;; - - prog) - case $host in - *cygwin*) func_stripname '' '.exe' "$output" - output=$func_stripname_result.exe;; - esac - test -n "$vinfo" && \ - func_warning "'-version-info' is ignored for programs" - - test -n "$release" && \ - func_warning "'-release' is ignored for programs" - - $preload \ - && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ - && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` - finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` - ;; - esac - - case $host in - *-*-darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - # But is supposedly fixed on 10.4 or later (yay!). - if test CXX = "$tagname"; then - case ${MACOSX_DEPLOYMENT_TARGET-10.0} in - 10.[0123]) - func_append compile_command " $wl-bind_at_load" - func_append finalize_command " $wl-bind_at_load" - ;; - esac - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) - func_append new_libs " -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $compile_deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) func_append new_libs " $deplib" ;; - esac - ;; - *) func_append new_libs " $deplib" ;; - esac - done - compile_deplibs=$new_libs - - - func_append compile_command " $compile_deplibs" - func_append finalize_command " $finalize_deplibs" - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs=$libdir - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - func_append rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) func_append perm_rpath " $libdir" ;; - esac - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - ::) dllsearchpath=$libdir;; - *) func_append dllsearchpath ":$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) func_append dllsearchpath ":$testbindir";; - esac - ;; - esac - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir=$hardcode_libdirs - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath=$rpath - - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs=$libdir - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - func_append rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; - *) func_append finalize_perm_rpath " $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir=$hardcode_libdirs - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath=$rpath - - if test -n "$libobjs" && test yes = "$build_old_libs"; then - # Transform all the library objects into standard objects. - compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` - finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` - fi - - func_generate_dlsyms "$outputname" "@PROGRAM@" false - - # template prelinking step - if test -n "$prelink_cmds"; then - func_execute_cmds "$prelink_cmds" 'exit $?' - fi - - wrappers_required=: - case $host in - *cegcc* | *mingw32ce*) - # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. - wrappers_required=false - ;; - *cygwin* | *mingw* ) - test yes = "$build_libtool_libs" || wrappers_required=false - ;; - *) - if test no = "$need_relink" || test yes != "$build_libtool_libs"; then - wrappers_required=false - fi - ;; - esac - $wrappers_required || { - # Replace the output file specification. - compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` - link_command=$compile_command$compile_rpath - - # We have no uninstalled library dependencies, so finalize right now. - exit_status=0 - func_show_eval "$link_command" 'exit_status=$?' - - if test -n "$postlink_cmds"; then - func_to_tool_file "$output" - postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` - func_execute_cmds "$postlink_cmds" 'exit $?' - fi - - # Delete the generated files. - if test -f "$output_objdir/${outputname}S.$objext"; then - func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' - fi - - exit $exit_status - } - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - func_append rpath "$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - func_append rpath "$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test yes = "$no_install"; then - # We don't need to create a wrapper script. - link_command=$compile_var$compile_command$compile_rpath - # Replace the output file specification. - link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` - # Delete the old output file. - $opt_dry_run || $RM $output - # Link the executable and exit - func_show_eval "$link_command" 'exit $?' - - if test -n "$postlink_cmds"; then - func_to_tool_file "$output" - postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` - func_execute_cmds "$postlink_cmds" 'exit $?' - fi - - exit $EXIT_SUCCESS - fi - - case $hardcode_action,$fast_install in - relink,*) - # Fast installation is not supported - link_command=$compile_var$compile_command$compile_rpath - relink_command=$finalize_var$finalize_command$finalize_rpath - - func_warning "this platform does not like uninstalled shared libraries" - func_warning "'$output' will be relinked during installation" - ;; - *,yes) - link_command=$finalize_var$compile_command$finalize_rpath - relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` - ;; - *,no) - link_command=$compile_var$compile_command$compile_rpath - relink_command=$finalize_var$finalize_command$finalize_rpath - ;; - *,needless) - link_command=$finalize_var$compile_command$finalize_rpath - relink_command= - ;; - esac - - # Replace the output file specification. - link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname - - func_show_eval "$link_command" 'exit $?' - - if test -n "$postlink_cmds"; then - func_to_tool_file "$output_objdir/$outputname" - postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` - func_execute_cmds "$postlink_cmds" 'exit $?' - fi - - # Now create the wrapper script. - func_verbose "creating $output" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` - fi - - # Only actually do things if not in dry run mode. - $opt_dry_run || { - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) func_stripname '' '.exe' "$output" - output=$func_stripname_result ;; - esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) - exeext=.exe - func_stripname '' '.exe' "$outputname" - outputname=$func_stripname_result ;; - *) exeext= ;; - esac - case $host in - *cygwin* | *mingw* ) - func_dirname_and_basename "$output" "" "." - output_name=$func_basename_result - output_path=$func_dirname_result - cwrappersource=$output_path/$objdir/lt-$output_name.c - cwrapper=$output_path/$output_name.exe - $RM $cwrappersource $cwrapper - trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - - func_emit_cwrapperexe_src > $cwrappersource - - # The wrapper executable is built using the $host compiler, - # because it contains $host paths and files. If cross- - # compiling, it, like the target executable, must be - # executed on the $host or under an emulation environment. - $opt_dry_run || { - $LTCC $LTCFLAGS -o $cwrapper $cwrappersource - $STRIP $cwrapper - } - - # Now, create the wrapper script for func_source use: - func_ltwrapper_scriptname $cwrapper - $RM $func_ltwrapper_scriptname_result - trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 - $opt_dry_run || { - # note: this script will not be executed, so do not chmod. - if test "x$build" = "x$host"; then - $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result - else - func_emit_wrapper no > $func_ltwrapper_scriptname_result - fi - } - ;; - * ) - $RM $output - trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 - - func_emit_wrapper no > $output - chmod +x $output - ;; - esac - } - exit $EXIT_SUCCESS - ;; - esac - - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do - - case $build_libtool_libs in - convenience) - oldobjs="$libobjs_save $symfileobj" - addlibs=$convenience - build_libtool_libs=no - ;; - module) - oldobjs=$libobjs_save - addlibs=$old_convenience - build_libtool_libs=no - ;; - *) - oldobjs="$old_deplibs $non_pic_objects" - $preload && test -f "$symfileobj" \ - && func_append oldobjs " $symfileobj" - addlibs=$old_convenience - ;; - esac - - if test -n "$addlibs"; then - gentop=$output_objdir/${outputname}x - func_append generated " $gentop" - - func_extract_archives $gentop $addlibs - func_append oldobjs " $func_extract_archives_result" - fi - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then - cmds=$old_archive_from_new_cmds - else - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop=$output_objdir/${outputname}x - func_append generated " $gentop" - - func_extract_archives $gentop $dlprefiles - func_append oldobjs " $func_extract_archives_result" - fi - - # POSIX demands no paths to be encoded in archives. We have - # to avoid creating archives with duplicate basenames if we - # might have to extract them afterwards, e.g., when creating a - # static archive out of a convenience library, or when linking - # the entirety of a libtool archive into another (currently - # not supported by libtool). - if (for obj in $oldobjs - do - func_basename "$obj" - $ECHO "$func_basename_result" - done | sort | sort -uc >/dev/null 2>&1); then - : - else - echo "copying selected object files to avoid basename conflicts..." - gentop=$output_objdir/${outputname}x - func_append generated " $gentop" - func_mkdir_p "$gentop" - save_oldobjs=$oldobjs - oldobjs= - counter=1 - for obj in $save_oldobjs - do - func_basename "$obj" - objbase=$func_basename_result - case " $oldobjs " in - " ") oldobjs=$obj ;; - *[\ /]"$objbase "*) - while :; do - # Make sure we don't pick an alternate name that also - # overlaps. - newobj=lt$counter-$objbase - func_arith $counter + 1 - counter=$func_arith_result - case " $oldobjs " in - *[\ /]"$newobj "*) ;; - *) if test ! -f "$gentop/$newobj"; then break; fi ;; - esac - done - func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - func_append oldobjs " $gentop/$newobj" - ;; - *) func_append oldobjs " $obj" ;; - esac - done - fi - func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 - tool_oldlib=$func_to_tool_file_result - eval cmds=\"$old_archive_cmds\" - - func_len " $cmds" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - cmds=$old_archive_cmds - elif test -n "$archiver_list_spec"; then - func_verbose "using command file archive linking..." - for obj in $oldobjs - do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" - done > $output_objdir/$libname.libcmd - func_to_tool_file "$output_objdir/$libname.libcmd" - oldobjs=" $archiver_list_spec$func_to_tool_file_result" - cmds=$old_archive_cmds - else - # the command line is too long to link in one step, link in parts - func_verbose "using piecewise archive linking..." - save_RANLIB=$RANLIB - RANLIB=: - objlist= - concat_cmds= - save_oldobjs=$oldobjs - oldobjs= - # Is there a better way of finding the last object in the list? - for obj in $save_oldobjs - do - last_oldobj=$obj - done - eval test_cmds=\"$old_archive_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - for obj in $save_oldobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - func_append objlist " $obj" - if test "$len" -lt "$max_cmd_len"; then - : - else - # the above command should be used before it gets too long - oldobjs=$objlist - if test "$obj" = "$last_oldobj"; then - RANLIB=$save_RANLIB - fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\$concat_cmds$old_archive_cmds\" - objlist= - len=$len0 - fi - done - RANLIB=$save_RANLIB - oldobjs=$objlist - if test -z "$oldobjs"; then - eval cmds=\"\$concat_cmds\" - else - eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi - fi - func_execute_cmds "$cmds" 'exit $?' - done - - test -n "$generated" && \ - func_show_eval "${RM}r$generated" - - # Now create the libtool archive. - case $output in - *.la) - old_library= - test yes = "$build_old_libs" && old_library=$libname.$libext - func_verbose "creating $output" - - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` - if test yes = "$hardcode_automatic"; then - relink_command= - fi - - # Only create the output if not a dry run. - $opt_dry_run || { - for installed in no yes; do - if test yes = "$installed"; then - if test -z "$install_libdir"; then - break - fi - output=$output_objdir/${outputname}i - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do - case $deplib in - *.la) - func_basename "$deplib" - name=$func_basename_result - func_resolve_sysroot "$deplib" - eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` - test -z "$libdir" && \ - func_fatal_error "'$deplib' is not a valid libtool archive" - func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" - ;; - -L*) - func_stripname -L '' "$deplib" - func_replace_sysroot "$func_stripname_result" - func_append newdependency_libs " -L$func_replace_sysroot_result" - ;; - -R*) - func_stripname -R '' "$deplib" - func_replace_sysroot "$func_stripname_result" - func_append newdependency_libs " -R$func_replace_sysroot_result" - ;; - *) func_append newdependency_libs " $deplib" ;; - esac - done - dependency_libs=$newdependency_libs - newdlfiles= - - for lib in $dlfiles; do - case $lib in - *.la) - func_basename "$lib" - name=$func_basename_result - eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "'$lib' is not a valid libtool archive" - func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" - ;; - *) func_append newdlfiles " $lib" ;; - esac - done - dlfiles=$newdlfiles - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - *.la) - # Only pass preopened files to the pseudo-archive (for - # eventual linking with the app. that links it) if we - # didn't already link the preopened objects directly into - # the library: - func_basename "$lib" - name=$func_basename_result - eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "'$lib' is not a valid libtool archive" - func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" - ;; - esac - done - dlprefiles=$newdlprefiles - else - newdlfiles= - for lib in $dlfiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; - *) abs=`pwd`"/$lib" ;; - esac - func_append newdlfiles " $abs" - done - dlfiles=$newdlfiles - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; - *) abs=`pwd`"/$lib" ;; - esac - func_append newdlprefiles " $abs" - done - dlprefiles=$newdlprefiles - fi - $RM $output - # place dlname in correct position for cygwin - # In fact, it would be nice if we could use this code for all target - # systems that can't hard-code library paths into their executables - # and that have no shared library path variable independent of PATH, - # but it turns out we can't easily determine that from inspecting - # libtool variables, so we have to hard-code the OSs to which it - # applies here; at the moment, that means platforms that use the PE - # object format with DLL files. See the long comment at the top of - # tests/bindir.at for full details. - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) - # If a -bindir argument was supplied, place the dll there. - if test -n "$bindir"; then - func_relative_path "$install_libdir" "$bindir" - tdlname=$func_relative_path_result/$dlname - else - # Otherwise fall back on heuristic. - tdlname=../bin/$dlname - fi - ;; - esac - $ECHO > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM (GNU $PACKAGE) $VERSION -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Linker flags that cannot go in dependency_libs. -inherited_linker_flags='$new_inherited_linker_flags' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Names of additional weak libraries provided by this library -weak_library_names='$weak_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# Should we warn about portability when linking against -modules? -shouldnotlink=$module - -# Files to dlopen/dlpreopen -dlopen='$dlfiles' -dlpreopen='$dlprefiles' - -# Directory that this library needs to be installed in: -libdir='$install_libdir'" - if test no,yes = "$installed,$need_relink"; then - $ECHO >> $output "\ -relink_command=\"$relink_command\"" - fi - done - } - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' - ;; - esac - exit $EXIT_SUCCESS -} - -if test link = "$opt_mode" || test relink = "$opt_mode"; then - func_mode_link ${1+"$@"} -fi - - -# func_mode_uninstall arg... -func_mode_uninstall () -{ - $debug_cmd - - RM=$nonopt - files= - rmforce=false - exit_status=0 - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic=$magic - - for arg - do - case $arg in - -f) func_append RM " $arg"; rmforce=: ;; - -*) func_append RM " $arg" ;; - *) func_append files " $arg" ;; - esac - done - - test -z "$RM" && \ - func_fatal_help "you must specify an RM program" - - rmdirs= - - for file in $files; do - func_dirname "$file" "" "." - dir=$func_dirname_result - if test . = "$dir"; then - odir=$objdir - else - odir=$dir/$objdir - fi - func_basename "$file" - name=$func_basename_result - test uninstall = "$opt_mode" && odir=$dir - - # Remember odir for removal later, being careful to avoid duplicates - if test clean = "$opt_mode"; then - case " $rmdirs " in - *" $odir "*) ;; - *) func_append rmdirs " $odir" ;; - esac - fi - - # Don't error if the file doesn't exist and rm -f was used. - if { test -L "$file"; } >/dev/null 2>&1 || - { test -h "$file"; } >/dev/null 2>&1 || - test -f "$file"; then - : - elif test -d "$file"; then - exit_status=1 - continue - elif $rmforce; then - continue - fi - - rmfiles=$file - - case $name in - *.la) - # Possibly a libtool archive, so verify it. - if func_lalib_p "$file"; then - func_source $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - func_append rmfiles " $odir/$n" - done - test -n "$old_library" && func_append rmfiles " $odir/$old_library" - - case $opt_mode in - clean) - case " $library_names " in - *" $dlname "*) ;; - *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; - esac - test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" - ;; - uninstall) - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' - fi - # FIXME: should reinstall the best remaining shared library. - ;; - esac - fi - ;; - - *.lo) - # Possibly a libtool object, so verify it. - if func_lalib_p "$file"; then - - # Read the .lo file - func_source $dir/$name - - # Add PIC object to the list of files to remove. - if test -n "$pic_object" && test none != "$pic_object"; then - func_append rmfiles " $dir/$pic_object" - fi - - # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" && test none != "$non_pic_object"; then - func_append rmfiles " $dir/$non_pic_object" - fi - fi - ;; - - *) - if test clean = "$opt_mode"; then - noexename=$name - case $file in - *.exe) - func_stripname '' '.exe' "$file" - file=$func_stripname_result - func_stripname '' '.exe' "$name" - noexename=$func_stripname_result - # $file with .exe has already been added to rmfiles, - # add $file without .exe - func_append rmfiles " $file" - ;; - esac - # Do a test to see if this is a libtool program. - if func_ltwrapper_p "$file"; then - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - relink_command= - func_source $func_ltwrapper_scriptname_result - func_append rmfiles " $func_ltwrapper_scriptname_result" - else - relink_command= - func_source $dir/$noexename - fi - - # note $name still contains .exe if it was in $file originally - # as does the version of $file that was added into $rmfiles - func_append rmfiles " $odir/$name $odir/${name}S.$objext" - if test yes = "$fast_install" && test -n "$relink_command"; then - func_append rmfiles " $odir/lt-$name" - fi - if test "X$noexename" != "X$name"; then - func_append rmfiles " $odir/lt-$noexename.c" - fi - fi - fi - ;; - esac - func_show_eval "$RM $rmfiles" 'exit_status=1' - done - - # Try to remove the $objdir's in the directories where we deleted files - for dir in $rmdirs; do - if test -d "$dir"; then - func_show_eval "rmdir $dir >/dev/null 2>&1" - fi - done - - exit $exit_status -} - -if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then - func_mode_uninstall ${1+"$@"} -fi - -test -z "$opt_mode" && { - help=$generic_help - func_fatal_help "you must specify a MODE" -} - -test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode '$opt_mode'" - -if test -n "$exec_cmd"; then - eval exec "$exec_cmd" - exit $EXIT_FAILURE -fi - -exit $exit_status - - -# The TAGs below are defined such that we never get into a situation -# where we disable both kinds of libraries. Given conflicting -# choices, we go for a static library, that is the most portable, -# since we can't tell whether shared libraries were disabled because -# the user asked for that or because the platform doesn't support -# them. This is particularly important on AIX, because we don't -# support having both static and shared libraries enabled at the same -# time on that platform, so we default to a shared-only configuration. -# If a disable-shared tag is given, we'll fallback to a static-only -# configuration. But we'll never go from static-only to shared-only. - -# ### BEGIN LIBTOOL TAG CONFIG: disable-shared -build_libtool_libs=no -build_old_libs=yes -# ### END LIBTOOL TAG CONFIG: disable-shared - -# ### BEGIN LIBTOOL TAG CONFIG: disable-static -build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` -# ### END LIBTOOL TAG CONFIG: disable-static - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: diff --git a/m4/acinclude.m4 b/m4/acinclude.m4 deleted file mode 100644 index 139e60095162..000000000000 --- a/m4/acinclude.m4 +++ /dev/null @@ -1,510 +0,0 @@ -dnl *************************************************************************** -dnl $Id$ -dnl -dnl Project: GDAL -dnl Purpose: Configure extra local definitions. -dnl Author: Frank Warmerdam, warmerdam@pobox.com -dnl -dnl *************************************************************************** -dnl Copyright (c) 2000, Frank Warmerdam -dnl -dnl Permission is hereby granted, free of charge, to any person obtaining a -dnl copy of this software and associated documentation files (the "Software"), -dnl to deal in the Software without restriction, including without limitation -dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, -dnl and/or sell copies of the Software, and to permit persons to whom the -dnl Software is furnished to do so, subject to the following conditions: -dnl -dnl The above copyright notice and this permission notice shall be included -dnl in all copies or substantial portions of the Software. -dnl -dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -dnl DEALINGS IN THE SOFTWARE. -dnl *************************************************************************** - -dnl --------------------------------------------------------------------------- -dnl Try to establish a 64 bit integer type. -dnl --------------------------------------------------------------------------- - -AC_DEFUN([AC_HAVE_LONG_LONG], -[ - AC_MSG_CHECKING([for 64bit integer type]) - - echo 'int main() { return (int)(long long)(0); }' >> conftest.c - if test -z "`${CC} ${CFLAGS} -o conftest conftest.c 2>&1`" ; then - AC_DEFINE(HAVE_LONG_LONG, 1, [Define to 1, if your compiler supports long long data type]) - AC_MSG_RESULT([long long]) - else - AC_MSG_ERROR([long long not found]) - fi - rm -rf conftest* -]) - -# AC_LANG_FUNC_LINK_TRY_CUSTOM(C++)(FUNCTION,INCLUDE,CODE) -# ---------------------------------- -m4_define([AC_LANG_FUNC_LINK_TRY_CUSTOM], -[AC_LANG_PROGRAM( -[ -#include -$2 -void test_f() -{ - $3 -} -])]) - -# ----------------------------------------------------------------- -# AC_CHECK_FUNC_CUSTOM(FUNCTION, [INCLUDE], [CODE], -# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# ----------------------------------------------------------------- -# This function is primarily added to facilitate testing that -# function prototypes are properly found such that functions can -# be compiled properly in C++. In particular, we want to include -# the real include file, not internal define prototypes. -# -# e.g. -# AC_LANG_PUSH(C++) -# AC_CHECK_FUNC_CUSTOM(gmtime_r,[#include ],[time_t t; struct tm ltime; t = time(0); gmtime_r( &t, <ime );]) -# AC_LANG_POP(C++) -# ----------------------------------------------------------------- -AC_DEFUN([AC_CHECK_FUNC_CUSTOM], -[AS_VAR_PUSHDEF([ac_var], [ac_cv_func_$1])dnl -AC_CACHE_CHECK([for $1], ac_var, -[AC_LINK_IFELSE([AC_LANG_FUNC_LINK_TRY_CUSTOM([$1],[$2],[$3])], - [AS_VAR_SET(ac_var, yes)], - [AS_VAR_SET(ac_var, no)])]) -AS_IF([test AS_VAR_GET(ac_var) = yes], [$4], [$5])dnl -AS_VAR_POPDEF([ac_var])dnl -dnl AC_MSG_RESULT([AC_LANG_FUNC_LINK_TRY_CUSTOM([$1],[$2],[$3])]) -dnl exit -])# AC_CHECK_FUNC - - -dnl --------------------------------------------------------------------------- -dnl Check for Unix 64 bit STDIO API (fseek64, ftell64 like on IRIX). -dnl --------------------------------------------------------------------------- - -AC_DEFUN([AC_UNIX_STDIO_64], -[ - AC_ARG_WITH(unix-stdio-64,[ --with-unix-stdio-64[=ARG] Utilize 64 stdio api (yes/no)],,) - - AC_MSG_CHECKING([for 64bit file io]) - - HAVE_UNIX_STDIO_64="$with_unix_stdio_64" - HAVE_MINGW_64_IO=no - - dnl Special case when using mingw cross compiler. - dnl /* We need __MSVCRT_VERSION__ >= 0x0601 to have "struct __stat64" */ - dnl /* Latest versions of mingw32 define it, but with older ones, */ - dnl /* we need to define it manually */ - if test x"$with_unix_stdio_64" = x"" ; then - echo '#if defined(__MINGW32__)' > conftest.c - echo '#ifndef __MSVCRT_VERSION__' >> conftest.c - echo '#define __MSVCRT_VERSION__ 0x0601' >> conftest.c - echo '#endif' >> conftest.c - echo '#endif' >> conftest.c - echo '#include ' >> conftest.c - echo '#include ' >> conftest.c - echo 'int main() { struct __stat64 buf; _stat64( "", &buf ); return 0; }' >> conftest.c - if test -z "`${CC} ${CFLAGS} -o conftest conftest.c 2>&1`" ; then - HAVE_UNIX_STDIO_64=no - HAVE_MINGW_64_IO=yes - AC_DEFINE_UNQUOTED(VSI_STAT64,_stat64, [Define to name of 64bit stat function]) - AC_DEFINE_UNQUOTED(VSI_STAT64_T,__stat64, [Define to name of 64bit stat structure]) - fi - rm -rf conftest* - fi - - if test x"$HAVE_UNIX_STDIO_64" = x"yes" ; then - HAVE_UNIX_STDIO_64=yes - VSI_FTELL64=ftell64 - VSI_FSEEK64=fseek64 - fi - - if test x"$HAVE_UNIX_STDIO_64" = x"" ; then - echo '#include ' > conftest.c - echo 'int main() { long long off=0; fseek64(NULL, off, SEEK_SET); off = ftell64(NULL); return (int)off; }' >> conftest.c - if test -z "`${CC} ${CFLAGS} -o conftest conftest.c 2>&1`" ; then - HAVE_UNIX_STDIO_64=yes - VSI_FTELL64=ftell64 - VSI_FSEEK64=fseek64 - fi - rm -rf conftest* - fi - - dnl I use CXX in this one, to ensure that the prototypes are available. - dnl these functions seem to exist on Linux, but aren't normally defined - dnl by stdio.h. With CXX (C++) this becomes a fatal error. - - if test x"$HAVE_UNIX_STDIO_64" = x"" ; then - echo '#include ' > conftest.cpp - echo 'int main() { long long off=0; fseeko64(NULL, off, SEEK_SET); off = ftello64(NULL); return (int)off; }' >> conftest.cpp - if test -z "`${CXX} ${CXXFLAGS} -o conftest conftest.cpp 2>&1`" ; then - HAVE_UNIX_STDIO_64=yes - VSI_FTELL64=ftello64 - VSI_FSEEK64=fseeko64 - fi - rm -rf conftest* - fi - - dnl This is much like the first test, but we predefine _LARGEFILE64_SOURCE - dnl before including stdio.h. This should work on Linux 2.4 series systems. - - if test x"$HAVE_UNIX_STDIO_64" = x"" ; then - echo '#define _LARGEFILE64_SOURCE' > conftest.cpp - echo '#include ' >> conftest.cpp - echo 'int main() { long long off=0; fseeko64(NULL, off, SEEK_SET); off = ftello64(NULL); return (int)off; }' >> conftest.cpp - if test -z "`${CXX} ${CXXFLAGS} -o conftest conftest.cpp 2>&1`" ; then - HAVE_UNIX_STDIO_64=yes - VSI_FTELL64=ftello64 - VSI_FSEEK64=fseeko64 - AC_DEFINE(VSI_NEED_LARGEFILE64_SOURCE, 1, [Define to 1, if you have LARGEFILE64_SOURCE]) - fi - rm -rf conftest* - fi - - dnl Test special MacOS (Darwin) case. - - if test x"$HAVE_UNIX_STDIO_64" = x"" ; then - case "${host_os}" in - darwin*) - HAVE_UNIX_STDIO_64=yes - VSI_FTELL64=ftello - VSI_FSEEK64=fseeko - ;; - esac - fi - - dnl Test for BSD systems that support ftello/fseeko. - dnl OpenBSD throws warnings about using strcpy/strcat, so we use CC instead of CXX - - if test x"$HAVE_UNIX_STDIO_64" = x"" ; then - echo '#include ' > conftest.c - echo 'int main() { fpos_t off=0; fseeko(NULL, off, SEEK_SET); off = ftello(NULL); return (int)off; }' >> conftest.c - if test -z "`${CC} ${CFLAGS} -o conftest conftest.c 2>&1`" ; then - HAVE_UNIX_STDIO_64=yes - VSI_FTELL64=ftello - VSI_FSEEK64=fseeko - fi - rm -rf conftest* - fi - - dnl Needed for netBSD - if test x"$HAVE_UNIX_STDIO_64" = x"" ; then - echo '#include ' > conftest.c - echo 'int main() { off_t off=0; fseeko(NULL, off, SEEK_SET); off = ftello(NULL); return (int)off; }' >> conftest.c - if test -z "`${CC} ${CFLAGS} -o conftest conftest.c 2>&1`" ; then - HAVE_UNIX_STDIO_64=yes - VSI_FTELL64=ftello - VSI_FSEEK64=fseeko - fi - rm -rf conftest* - fi - - if test x"$HAVE_UNIX_STDIO_64" = x"yes" ; then - AC_MSG_RESULT([yes]) - - case "${host_os}" in - darwin*) - VSI_STAT64=stat - VSI_STAT64_T=stat - ;; - *) - AC_CHECK_FUNC(stat64, VSI_STAT64=stat64 VSI_STAT64_T=stat64, VSI_STAT64=stat VSI_STAT64_T=stat) - ;; - esac - AC_CHECK_FUNC(fopen64, VSI_FOPEN64=fopen64, VSI_FOPEN64=fopen) - AC_CHECK_FUNC(ftruncate64, VSI_FTRUNCATE64=ftruncate64, VSI_FTRUNCATE64=ftruncate) - - AC_DEFINE(UNIX_STDIO_64, 1, [Define to 1 if you have fseek64, ftell64]) - - export VSI_FTELL64 VSI_FSEEK64 VSI_STAT64 VSI_STAT64_T VSI_OPEN64 VSI_FTRUNCATE64 - AC_DEFINE_UNQUOTED(VSI_FTELL64,$VSI_FTELL64, [Define to name of 64bit ftell func]) - AC_DEFINE_UNQUOTED(VSI_FSEEK64,$VSI_FSEEK64, [Define to name of 64bit fseek func]) - AC_DEFINE_UNQUOTED(VSI_STAT64,$VSI_STAT64, [Define to name of 64bit stat function]) - AC_DEFINE_UNQUOTED(VSI_STAT64_T,$VSI_STAT64_T, [Define to name of 64bit stat structure]) - AC_DEFINE_UNQUOTED(VSI_FOPEN64,$VSI_FOPEN64, [Define to name of 64bit fopen function]) - AC_DEFINE_UNQUOTED(VSI_FTRUNCATE64,$VSI_FTRUNCATE64, [Define to name of 64bit ftruncate function]) - else - AC_MSG_RESULT([no]) - if test "$HAVE_MINGW_64_IO" = "no"; then - if test x"$with_unix_stdio_64" = x"no" ; then - CXXFLAGS="$CXXFLAGS -DBUILD_WITHOUT_64BIT_OFFSET" - AC_MSG_WARN([64-bit file I/O missing. Build will not support files larger than 4 GB]) - else - AC_MSG_ERROR([64-bit file I/O missing. Build will not support files larger than 4 GB. If that is intended, ./configure --with-unix-stdio-64=no]) - fi - fi - fi - -]) - -AC_DEFUN([AC_COMPILER_LOCALHACK], -[ - AC_MSG_CHECKING([if local/include already standard]) - - rm -f comp.out - echo 'int main() { int i = 1; if( *((unsigned char *) &i) == 0 ) printf( "BIGENDIAN"); return 0; }' >> conftest.c - ${CC} $CPPFLAGS $EXTRA_INCLUDES -o conftest conftest.c 2> comp.out - COMP_CHECK=`grep "system directory" comp.out | grep /usr/local/include` - if test -z "$COMP_CHECK" ; then - AC_MSG_RESULT([no, everything is ok]) - else - AC_MSG_RESULT([yes, stripping extras]) - CXXFLAGS=`echo "$CXXFLAGS " | sed "s/-I\/usr\/local\/include //"` - CFLAGS=`echo "$CFLAGS " | sed "s/-I\/usr\/local\/include //"` - EXTRA_INCLUDES=`echo "$EXTRA_INCLUDES " | sed "s/-I\/usr\/local\/include //"` - fi - rm -f comp.out -]) - -AC_DEFUN([AC_COMPILER_PIC], -[ - echo 'void f(){}' > conftest.c - if test -z "`${CC-cc} $CFLAGS -fPIC -c conftest.c 2>&1`"; then - CFLAGS="$CFLAGS -fPIC" - fi - if test -z "`${CXX-g++} $CXXFLAGS -fPIC -c conftest.c 2>&1`"; then - CXXFLAGS="$CXXFLAGS -fPIC" - fi - rm -rf conftest* -]) - -dnl -dnl Look for OGDI, and verify that we can link and run. -dnl -AC_DEFUN([AC_TRY_OGDI], -[ - saved_LIBS="$LIBS" - OGDI_LIBS=" -logdi -lzlib" - LIBS="$saved_LIBS $OGDI_LIBS" - AC_TRY_LINK(,[ void *cln_CreateClient(); cln_CreateClient(); ], - HAVE_OGDI=yes, HAVE_OGDI=no) - - if test "$HAVE_OGDI" = "no" ; then - OGDI_LIBS="-L$TOPDIR/bin/$TARGET -logdi -lzlib" - LIBS="$saved_LIBS $OGDI_LIBS" - AC_TRY_LINK(,[ void *cln_CreateClient(); cln_CreateClient(); ], - HAVE_OGDI=yes, HAVE_OGDI=no) - fi - - if test "$HAVE_OGDI" = "yes" ; then - AC_CHECK_HEADER(ecs.h,have_ecs_h=yes,have_ecs_h=no) - - if test "$have_ecs_h" = "no"; then - if test -f "$TOPDIR/ogdi/include/ecs.h" ; then - echo "Found ecs.h in $TOPDIR/include" - OGDI_INCLUDE="-I$TOPDIR/ogdi/include -I$TOPDIR/proj" - else - HAVE_OGDI=no - fi - fi - fi - - if test "$HAVE_OGDI" = "no" ; then - OGDI_LIBS="" - OGDI_INCLUDE="" - echo "checking for OGDI ... no" - else - echo "checking for OGDI ... yes" - fi - - AC_SUBST(HAVE_OGDI,$HAVE_OGDI) - AC_SUBST(OGDI_INCLUDE,$OGDI_INCLUDE) - AC_SUBST(OGDI_LIBS,$OGDI_LIBS) - - LIBS="$saved_LIBS" -]) - -dnl -dnl Try to find something to link shared libraries with. Use "c++ -shared" -dnl in preference to "ld -shared" because it will link in required c++ -dnl run time support for us. -dnl -AC_DEFUN([AC_LD_SHARED], -[ - echo 'void g(); int main(){ g(); return 0; }' > conftest1.c - - echo '#include ' > conftest2.c - echo 'void g(); void g(){printf("");}' >> conftest2.c - ${CC} ${CFLAGS} -c conftest2.c - - SO_EXT="so" - export SO_EXT - LD_SHARED="/bin/true" - if test ! -z "`uname -a | grep IRIX`" ; then - IRIX_ALL=-all - else - IRIX_ALL= - fi - - AC_ARG_WITH(ld-shared,[ --without-ld-shared Disable shared library support],,) - - if test "$with_ld_shared" != "" ; then - if test "$with_ld_shared" = "no" ; then - echo "user disabled shared library support." - elif test "$with_ld_shared" = "yes" ; then - AC_MSG_ERROR([--with-ld-shared not supported]) - else - echo "using user supplied .so link command ... $with_ld_shared" - fi - LD_SHARED="$with_ld_shared" - fi - - dnl Check For Cygwin case. Actually verify that the produced DLL works. - - if test ! -z "`uname -a | grep CYGWIN`" \ - -a "$LD_SHARED" = "/bin/true" \ - -a -z "`gcc -shared conftest2.o -o libconftest.dll`" ; then - if test -z "`${CC} conftest1.c -L./ -lconftest -o conftest1 2>&1`"; then - LD_LIBRARY_PATH_OLD="$LD_LIBRARY_PATH" - if test -z "$LD_LIBRARY_PATH" ; then - LD_LIBRARY_PATH="`pwd`" - else - LD_LIBRARY_PATH="`pwd`:$LD_LIBRARY_PATH" - fi - export LD_LIBRARY_PATH - if test -z "`./conftest1 2>&1`" ; then - echo "checking for Cygwin gcc -shared ... yes" - LD_SHARED="c++ -shared" - SO_EXT="dll" - fi - LD_LIBRARY_PATH="$LD_LIBRARY_PATH_OLD" - fi - fi - - dnl Test special MacOS (Darwin) case. - - if test ! -z "`uname | grep Darwin`" \ - -a "$LD_SHARED" = "/bin/true" \ - -a -z "`${CXX} -dynamiclib conftest2.o -o libconftest.so 2>&1`" ; then - ${CC} -c conftest1.c - if test -z "`${CXX} conftest1.o libconftest.so -o conftest1 2>&1`"; then - DYLD_LIBRARY_PATH_OLD="$DYLD_LIBRARY_PATH" - if test -z "$DYLD_LIBRARY_PATH" ; then - DYLD_LIBRARY_PATH="`pwd`" - else - DYLD_LIBRARY_PATH="`pwd`:$DYLD_LIBRARY_PATH" - fi - export DYLD_LIBRARY_PATH - if test -z "`./conftest1 2>&1`" ; then - echo "checking for ${CXX} -dynamiclib ... yes" - LD_SHARED="${CXX} -dynamiclib" - SO_EXT=dylib - fi - DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH_OLD" - fi - rm -f conftest1.o - fi - - if test "$LD_SHARED" = "/bin/true" \ - -a -z "`${CXX} -shared $IRIX_ALL conftest2.o -o libconftest.so 2>&1|grep -v WARNING`" ; then - if test -z "`${CC} conftest1.c libconftest.so -o conftest1 2>&1`"; then - LD_LIBRARY_PATH_OLD="$LD_LIBRARY_PATH" - if test -z "$LD_LIBRARY_PATH" ; then - LD_LIBRARY_PATH="`pwd`" - else - LD_LIBRARY_PATH="`pwd`:$LD_LIBRARY_PATH" - fi - export LD_LIBRARY_PATH - if test -z "`./conftest1 2>&1`" ; then - echo "checking for ${CXX} -shared ... yes" - LD_SHARED="${CXX} -shared $IRIX_ALL" - else - echo "checking for ${CXX} -shared ... no(3)" - fi - LD_LIBRARY_PATH="$LD_LIBRARY_PATH_OLD" - else - echo "checking for ${CXX} -shared ... no(2)" - fi - else - if test "$LD_SHARED" = "/bin/true" ; then - echo "checking for ${CXX} -shared ... no(1)" - fi - fi - - if test "$LD_SHARED" = "/bin/true" \ - -a -z "`ld -shared conftest2.o -o libconftest.so 2>&1`" ; then - if test -z "`${CC} conftest1.c libconftest.so -o conftest1 2>&1`"; then - LD_LIBRARY_PATH_OLD="$LD_LIBRARY_PATH" - if test -z "$LD_LIBRARY_PATH" ; then - LD_LIBRARY_PATH="`pwd`" - else - LD_LIBRARY_PATH="`pwd`:$LD_LIBRARY_PATH" - fi - export LD_LIBRARY_PATH - if test -z "`./conftest1 2>&1`" ; then - echo "checking for ld -shared ... yes" - LD_SHARED="ld -shared" - fi - LD_LIBRARY_PATH="$LD_LIBRARY_PATH_OLD" - fi - fi - - if test "$LD_SHARED" = "/bin/true" ; then - echo "checking for ld -shared ... no" - if test ! -x /bin/true ; then - LD_SHARED=/usr/bin/true - fi - fi - if test "$LD_SHARED" = "no" ; then - if test -x /bin/true ; then - LD_SHARED=/bin/true - else - LD_SHARED=/usr/bin/true - fi - fi - - rm -rf conftest* libconftest* - - AC_SUBST(LD_SHARED,$LD_SHARED) - AC_SUBST(SO_EXT,$SO_EXT) -]) - -# -------------------------------------------------------- -dnl AC_CHECK_FW_FUNC(FRAMEWORK-BASENAME, FUNCTION, -dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], -dnl [OTHER-LIBRARIES]) -dnl ------------------------------------------------------ -dnl -dnl Duplicate of AC_CHECK_LIB, with small edit to handle -framework $1, i.e.: -dnl "-framework JavaVM" instead of "-ljvm" -dnl See autoconf-src/lib/autoconf/libs.m4 for more information - -AC_DEFUN([AC_CHECK_FW_FUNC], -[m4_ifval([$3], , [AH_CHECK_LIB([$1])])dnl -AS_LITERAL_WORD_IF([$1], - [AS_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$1_$2])], - [AS_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$1''_$2])])dnl -AC_CACHE_CHECK([for $2 in -framework $1], [ac_Lib], -[ac_check_fw_func_save_LIBS=$LIBS -LIBS="-framework $1 $5 $LIBS" -AC_LINK_IFELSE([AC_LANG_CALL([], [$2])], - [AS_VAR_SET([ac_Lib], [yes])], - [AS_VAR_SET([ac_Lib], [no])]) -LIBS=$ac_check_fw_func_save_LIBS]) -AS_VAR_IF([ac_Lib], [yes], - [m4_default([$3], [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_LIB$1)) - LIBS="-framework $1 $LIBS" -])], - [$4]) -AS_VAR_POPDEF([ac_Lib])dnl -])# AC_CHECK_FW_FUNC - -dnl --------------------------------------------------------------------------- -dnl Message output -dnl --------------------------------------------------------------------------- -AC_DEFUN([LOC_MSG],[ -echo "$1" -]) - -AC_DEFUN([LOC_YES_NO],[if test -n "${$1}" ; then echo yes ; else echo no ; fi]) - -AC_DEFUN([LOC_MSG_USE],[ -[echo " $1: ]`LOC_YES_NO($2)`"]) - diff --git a/m4/ax_cflags_warn_all.m4 b/m4/ax_cflags_warn_all.m4 deleted file mode 100644 index 9235a18c7a83..000000000000 --- a/m4/ax_cflags_warn_all.m4 +++ /dev/null @@ -1,158 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_cflags_warn_all.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CFLAGS_WARN_ALL [(shellvar[, default[, action-if-found[, action-if-not-found]]])] -# AX_CXXFLAGS_WARN_ALL [(shellvar[, default[, action-if-found[, action-if-not-found]]])] -# AX_FCFLAGS_WARN_ALL [(shellvar[, default[, action-if-found[, action-if-not-found]]])] -# -# DESCRIPTION -# -# Specify compiler options that enable most reasonable warnings. For the -# GNU Compiler Collection (GCC), for example, it will be "-Wall". The -# result is added to shellvar, one of CFLAGS, CXXFLAGS or FCFLAGS if the -# first parameter is not specified. -# -# Each of these macros accepts the following optional arguments: -# -# - $1 - shellvar -# shell variable to use (CFLAGS, CXXFLAGS or FCFLAGS if not -# specified, depending on macro) -# -# - $2 - default -# value to use for flags if compiler vendor cannot be determined (by -# default, "") -# -# - $3 - action-if-found -# action to take if the compiler vendor has been successfully -# determined (by default, add the appropriate compiler flags to -# shellvar) -# -# - $4 - action-if-not-found -# action to take if the compiler vendor has not been determined or -# is unknown (by default, add the default flags, or "" if not -# specified, to shellvar) -# -# These macros use AX_COMPILER_VENDOR to determine which flags should be -# returned for a given compiler. Not all compilers currently have flags -# defined for them; patches are welcome. If need be, compiler flags may -# be made language-dependent: use a construct like the following: -# -# [vendor_name], [m4_if(_AC_LANG_PREFIX,[C], VAR="--relevant-c-flags",dnl -# m4_if(_AC_LANG_PREFIX,[CXX], VAR="--relevant-c++-flags",dnl -# m4_if(_AC_LANG_PREFIX,[FC], VAR="--relevant-fortran-flags",dnl -# VAR="$2"; FOUND="no")))], -# -# Note: These macros also depend on AX_PREPEND_FLAG. -# -# LICENSE -# -# Copyright (c) 2008 Guido U. Draheim -# Copyright (c) 2010 Rhys Ulerich -# Copyright (c) 2018 John Zaitseff -# -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 3 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 25 - -AC_DEFUN([AX_FLAGS_WARN_ALL], [ - AX_REQUIRE_DEFINED([AX_PREPEND_FLAG])dnl - AC_REQUIRE([AX_COMPILER_VENDOR])dnl - - AS_VAR_PUSHDEF([FLAGS], [m4_default($1,_AC_LANG_PREFIX[]FLAGS)])dnl - AS_VAR_PUSHDEF([VAR], [ac_cv_[]_AC_LANG_ABBREV[]flags_warn_all])dnl - AS_VAR_PUSHDEF([FOUND], [ac_save_[]_AC_LANG_ABBREV[]flags_warn_all_found])dnl - - AC_CACHE_CHECK([FLAGS for most reasonable warnings], VAR, [ - VAR="" - FOUND="yes" - dnl Cases are listed in the order found in ax_compiler_vendor.m4 - AS_CASE("$ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor", - [intel], [VAR="-w2"], - [ibm], [VAR="-qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd"], - [pathscale], [], - [clang], [VAR="-Wall"], - [cray], [VAR="-h msglevel 2"], - [fujitsu], [], - [sdcc], [], - [sx], [VAR="-pvctl[,]fullmsg"], - [portland], [], - [gnu], [VAR="-Wall"], - [sun], [VAR="-v"], - [hp], [VAR="+w1"], - [dec], [VAR="-verbose -w0 -warnprotos"], - [borland], [], - [comeau], [], - [kai], [], - [lcc], [], - [sgi], [VAR="-fullwarn"], - [microsoft], [], - [metrowerks], [], - [watcom], [], - [tcc], [], - [unknown], [ - VAR="$2" - FOUND="no" - ], - [ - AC_MSG_WARN([Unknown compiler vendor returned by [AX_COMPILER_VENDOR]]) - VAR="$2" - FOUND="no" - ] - ) - - AS_IF([test "x$FOUND" = "xyes"], [dnl - m4_default($3, [AS_IF([test "x$VAR" != "x"], [AX_PREPEND_FLAG([$VAR], [FLAGS])])]) - ], [dnl - m4_default($4, [m4_ifval($2, [AX_PREPEND_FLAG([$VAR], [FLAGS])], [true])]) - ])dnl - ])dnl - - AS_VAR_POPDEF([FOUND])dnl - AS_VAR_POPDEF([VAR])dnl - AS_VAR_POPDEF([FLAGS])dnl -])dnl AX_FLAGS_WARN_ALL - -AC_DEFUN([AX_CFLAGS_WARN_ALL], [dnl - AC_LANG_PUSH([C]) - AX_FLAGS_WARN_ALL([$1], [$2], [$3], [$4]) - AC_LANG_POP([C]) -])dnl - -AC_DEFUN([AX_CXXFLAGS_WARN_ALL], [dnl - AC_LANG_PUSH([C++]) - AX_FLAGS_WARN_ALL([$1], [$2], [$3], [$4]) - AC_LANG_POP([C++]) -])dnl - -AC_DEFUN([AX_FCFLAGS_WARN_ALL], [dnl - AC_LANG_PUSH([Fortran]) - AX_FLAGS_WARN_ALL([$1], [$2], [$3], [$4]) - AC_LANG_POP([Fortran]) -])dnl diff --git a/m4/ax_check_compile_flag.m4 b/m4/ax_check_compile_flag.m4 deleted file mode 100644 index ca3639715e72..000000000000 --- a/m4/ax_check_compile_flag.m4 +++ /dev/null @@ -1,74 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) -# -# DESCRIPTION -# -# Check whether the given FLAG works with the current language's compiler -# or gives an error. (Warnings, however, are ignored) -# -# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on -# success/failure. -# -# If EXTRA-FLAGS is defined, it is added to the current language's default -# flags (e.g. CFLAGS) when the check is done. The check is thus made with -# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to -# force the compiler to issue an error when a bad flag is given. -# -# INPUT gives an alternative input source to AC_COMPILE_IFELSE. -# -# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this -# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. -# -# LICENSE -# -# Copyright (c) 2008 Guido U. Draheim -# Copyright (c) 2011 Maarten Bosmans -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation, either version 3 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 4 - -AC_DEFUN([AX_CHECK_COMPILE_FLAG], -[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF -AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl -AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ - ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS - _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" - AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], - [AS_VAR_SET(CACHEVAR,[yes])], - [AS_VAR_SET(CACHEVAR,[no])]) - _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) -AS_VAR_IF(CACHEVAR,yes, - [m4_default([$2], :)], - [m4_default([$3], :)]) -AS_VAR_POPDEF([CACHEVAR])dnl -])dnl AX_CHECK_COMPILE_FLAGS diff --git a/m4/ax_compiler_vendor.m4 b/m4/ax_compiler_vendor.m4 deleted file mode 100644 index f06e865405ca..000000000000 --- a/m4/ax_compiler_vendor.m4 +++ /dev/null @@ -1,117 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_compiler_vendor.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_COMPILER_VENDOR -# -# DESCRIPTION -# -# Determine the vendor of the C, C++ or Fortran compiler. The vendor is -# returned in the cache variable $ax_cv_c_compiler_vendor for C, -# $ax_cv_cxx_compiler_vendor for C++ or $ax_cv_fc_compiler_vendor for -# (modern) Fortran. The value is one of "intel", "ibm", "pathscale", -# "clang" (LLVM), "cray", "fujitsu", "sdcc", "sx", "portland" (PGI), "gnu" -# (GCC), "sun" (Oracle Developer Studio), "hp", "dec", "borland", -# "comeau", "kai", "lcc", "sgi", "microsoft", "metrowerks", "watcom", -# "tcc" (Tiny CC) or "unknown" (if the compiler cannot be determined). -# -# To check for a Fortran compiler, you must first call AC_FC_PP_SRCEXT -# with an appropriate preprocessor-enabled extension. For example: -# -# AC_LANG_PUSH([Fortran]) -# AC_PROG_FC -# AC_FC_PP_SRCEXT([F]) -# AX_COMPILER_VENDOR -# AC_LANG_POP([Fortran]) -# -# LICENSE -# -# Copyright (c) 2008 Steven G. Johnson -# Copyright (c) 2008 Matteo Frigo -# Copyright (c) 2018-19 John Zaitseff -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation, either version 3 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 30 - -AC_DEFUN([AX_COMPILER_VENDOR], [dnl - AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor, [dnl - dnl If you modify this list of vendors, please add similar support - dnl to ax_compiler_version.m4 if at all possible. - dnl - dnl Note: Do NOT check for GCC first since some other compilers - dnl define __GNUC__ to remain compatible with it. Compilers that - dnl are very slow to start (such as Intel) are listed first. - - vendors=" - intel: __ICC,__ECC,__INTEL_COMPILER - ibm: __xlc__,__xlC__,__IBMC__,__IBMCPP__,__ibmxl__ - pathscale: __PATHCC__,__PATHSCALE__ - clang: __clang__ - cray: _CRAYC - fujitsu: __FUJITSU - sdcc: SDCC,__SDCC - sx: _SX - portland: __PGI - gnu: __GNUC__ - sun: __SUNPRO_C,__SUNPRO_CC,__SUNPRO_F90,__SUNPRO_F95 - hp: __HP_cc,__HP_aCC - dec: __DECC,__DECCXX,__DECC_VER,__DECCXX_VER - borland: __BORLANDC__,__CODEGEARC__,__TURBOC__ - comeau: __COMO__ - kai: __KCC - lcc: __LCC__ - sgi: __sgi,sgi - microsoft: _MSC_VER - metrowerks: __MWERKS__ - watcom: __WATCOMC__ - tcc: __TINYC__ - unknown: UNKNOWN - " - for ventest in $vendors; do - case $ventest in - *:) - vendor=$ventest - continue - ;; - *) - vencpp="defined("`echo $ventest | sed 's/,/) || defined(/g'`")" - ;; - esac - - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[ -#if !($vencpp) - thisisanerror; -#endif - ]])], [break]) - done - - ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=`echo $vendor | cut -d: -f1` - ]) -])dnl diff --git a/m4/ax_cxx_compile_stdcxx.m4 b/m4/ax_cxx_compile_stdcxx.m4 deleted file mode 100644 index 2c18e49c56c0..000000000000 --- a/m4/ax_cxx_compile_stdcxx.m4 +++ /dev/null @@ -1,562 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional]) -# -# DESCRIPTION -# -# Check for baseline language coverage in the compiler for the specified -# version of the C++ standard. If necessary, add switches to CXX and -# CXXCPP to enable support. VERSION may be '11' (for the C++11 standard) -# or '14' (for the C++14 standard). -# -# The second argument, if specified, indicates whether you insist on an -# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. -# -std=c++11). If neither is specified, you get whatever works, with -# preference for an extended mode. -# -# The third argument, if specified 'mandatory' or if left unspecified, -# indicates that baseline support for the specified C++ standard is -# required and that the macro should error out if no mode with that -# support is found. If specified 'optional', then configuration proceeds -# regardless, after defining HAVE_CXX${VERSION} if and only if a -# supporting mode is found. -# -# LICENSE -# -# Copyright (c) 2008 Benjamin Kosnik -# Copyright (c) 2012 Zack Weinberg -# Copyright (c) 2013 Roy Stogner -# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov -# Copyright (c) 2015 Paul Norman -# Copyright (c) 2015 Moritz Klammler -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 4 - -dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro -dnl (serial version number 13). - -AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl - m4_if([$1], [11], [], - [$1], [14], [], - [$1], [17], [m4_fatal([support for C++17 not yet implemented in AX_CXX_COMPILE_STDCXX])], - [m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl - m4_if([$2], [], [], - [$2], [ext], [], - [$2], [noext], [], - [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl - m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true], - [$3], [mandatory], [ax_cxx_compile_cxx$1_required=true], - [$3], [optional], [ax_cxx_compile_cxx$1_required=false], - [m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])]) - AC_LANG_PUSH([C++])dnl - ac_success=no - AC_CACHE_CHECK(whether $CXX supports C++$1 features by default, - ax_cv_cxx_compile_cxx$1, - [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], - [ax_cv_cxx_compile_cxx$1=yes], - [ax_cv_cxx_compile_cxx$1=no])]) - if test x$ax_cv_cxx_compile_cxx$1 = xyes; then - ac_success=yes - fi - - m4_if([$2], [noext], [], [dnl - if test x$ac_success = xno; then - for switch in -std=gnu++$1 -std=gnu++0x; do - cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) - AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch, - $cachevar, - [ac_save_CXX="$CXX" - CXX="$CXX $switch" - AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], - [eval $cachevar=yes], - [eval $cachevar=no]) - CXX="$ac_save_CXX"]) - if eval test x\$$cachevar = xyes; then - CXX="$CXX $switch" - if test -n "$CXXCPP" ; then - CXXCPP="$CXXCPP $switch" - fi - ac_success=yes - break - fi - done - fi]) - - m4_if([$2], [ext], [], [dnl - if test x$ac_success = xno; then - dnl HP's aCC needs +std=c++11 according to: - dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf - dnl Cray's crayCC needs "-h std=c++11" - for switch in -std=c++$1 -std=c++0x +std=c++$1 "-h std=c++$1"; do - cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) - AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch, - $cachevar, - [ac_save_CXX="$CXX" - CXX="$CXX $switch" - AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], - [eval $cachevar=yes], - [eval $cachevar=no]) - CXX="$ac_save_CXX"]) - if eval test x\$$cachevar = xyes; then - CXX="$CXX $switch" - if test -n "$CXXCPP" ; then - CXXCPP="$CXXCPP $switch" - fi - ac_success=yes - break - fi - done - fi]) - AC_LANG_POP([C++]) - if test x$ax_cxx_compile_cxx$1_required = xtrue; then - if test x$ac_success = xno; then - AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.]) - fi - fi - if test x$ac_success = xno; then - HAVE_CXX$1=0 - AC_MSG_NOTICE([No compiler with C++$1 support was found]) - else - HAVE_CXX$1=1 - AC_DEFINE(HAVE_CXX$1,1, - [define if the compiler supports basic C++$1 syntax]) - fi - AC_SUBST(HAVE_CXX$1) -]) - - -dnl Test body for checking C++11 support - -m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11], - _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 -) - - -dnl Test body for checking C++14 support - -m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14], - _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 - _AX_CXX_COMPILE_STDCXX_testbody_new_in_14 -) - - -dnl Tests for new features in C++11 - -m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[ - -// If the compiler admits that it is not ready for C++11, why torture it? -// Hopefully, this will speed up the test. - -#ifndef __cplusplus - -#error "This is not a C++ compiler" - -#elif __cplusplus < 201103L - -#error "This is not a C++11 compiler" - -#else - -namespace cxx11 -{ - - namespace test_static_assert - { - - template - struct check - { - static_assert(sizeof(int) <= sizeof(T), "not big enough"); - }; - - } - - namespace test_final_override - { - - struct Base - { - virtual void f() {} - }; - - struct Derived : public Base - { - virtual void f() override {} - }; - - } - - namespace test_double_right_angle_brackets - { - - template < typename T > - struct check {}; - - typedef check single_type; - typedef check> double_type; - typedef check>> triple_type; - typedef check>>> quadruple_type; - - } - - namespace test_decltype - { - - int - f() - { - int a = 1; - decltype(a) b = 2; - return a + b; - } - - } - - namespace test_type_deduction - { - - template < typename T1, typename T2 > - struct is_same - { - static const bool value = false; - }; - - template < typename T > - struct is_same - { - static const bool value = true; - }; - - template < typename T1, typename T2 > - auto - add(T1 a1, T2 a2) -> decltype(a1 + a2) - { - return a1 + a2; - } - - int - test(const int c, volatile int v) - { - static_assert(is_same::value == true, ""); - static_assert(is_same::value == false, ""); - static_assert(is_same::value == false, ""); - auto ac = c; - auto av = v; - auto sumi = ac + av + 'x'; - auto sumf = ac + av + 1.0; - static_assert(is_same::value == true, ""); - static_assert(is_same::value == true, ""); - static_assert(is_same::value == true, ""); - static_assert(is_same::value == false, ""); - static_assert(is_same::value == true, ""); - return (sumf > 0.0) ? sumi : add(c, v); - } - - } - - namespace test_noexcept - { - - int f() { return 0; } - int g() noexcept { return 0; } - - static_assert(noexcept(f()) == false, ""); - static_assert(noexcept(g()) == true, ""); - - } - - namespace test_constexpr - { - - template < typename CharT > - unsigned long constexpr - strlen_c_r(const CharT *const s, const unsigned long acc) noexcept - { - return *s ? strlen_c_r(s + 1, acc + 1) : acc; - } - - template < typename CharT > - unsigned long constexpr - strlen_c(const CharT *const s) noexcept - { - return strlen_c_r(s, 0UL); - } - - static_assert(strlen_c("") == 0UL, ""); - static_assert(strlen_c("1") == 1UL, ""); - static_assert(strlen_c("example") == 7UL, ""); - static_assert(strlen_c("another\0example") == 7UL, ""); - - } - - namespace test_rvalue_references - { - - template < int N > - struct answer - { - static constexpr int value = N; - }; - - answer<1> f(int&) { return answer<1>(); } - answer<2> f(const int&) { return answer<2>(); } - answer<3> f(int&&) { return answer<3>(); } - - void - test() - { - int i = 0; - const int c = 0; - static_assert(decltype(f(i))::value == 1, ""); - static_assert(decltype(f(c))::value == 2, ""); - static_assert(decltype(f(0))::value == 3, ""); - } - - } - - namespace test_uniform_initialization - { - - struct test - { - static const int zero {}; - static const int one {1}; - }; - - static_assert(test::zero == 0, ""); - static_assert(test::one == 1, ""); - - } - - namespace test_lambdas - { - - void - test1() - { - auto lambda1 = [](){}; - auto lambda2 = lambda1; - lambda1(); - lambda2(); - } - - int - test2() - { - auto a = [](int i, int j){ return i + j; }(1, 2); - auto b = []() -> int { return '0'; }(); - auto c = [=](){ return a + b; }(); - auto d = [&](){ return c; }(); - auto e = [a, &b](int x) mutable { - const auto identity = [](int y){ return y; }; - for (auto i = 0; i < a; ++i) - a += b--; - return x + identity(a + b); - }(0); - return a + b + c + d + e; - } - - int - test3() - { - const auto nullary = [](){ return 0; }; - const auto unary = [](int x){ return x; }; - using nullary_t = decltype(nullary); - using unary_t = decltype(unary); - const auto higher1st = [](nullary_t f){ return f(); }; - const auto higher2nd = [unary](nullary_t f1){ - return [unary, f1](unary_t f2){ return f2(unary(f1())); }; - }; - return higher1st(nullary) + higher2nd(nullary)(unary); - } - - } - - namespace test_variadic_templates - { - - template - struct sum; - - template - struct sum - { - static constexpr auto value = N0 + sum::value; - }; - - template <> - struct sum<> - { - static constexpr auto value = 0; - }; - - static_assert(sum<>::value == 0, ""); - static_assert(sum<1>::value == 1, ""); - static_assert(sum<23>::value == 23, ""); - static_assert(sum<1, 2>::value == 3, ""); - static_assert(sum<5, 5, 11>::value == 21, ""); - static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); - - } - - // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae - // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function - // because of this. - namespace test_template_alias_sfinae - { - - struct foo {}; - - template - using member = typename T::member_type; - - template - void func(...) {} - - template - void func(member*) {} - - void test(); - - void test() { func(0); } - - } - -} // namespace cxx11 - -#endif // __cplusplus >= 201103L - -]]) - - -dnl Tests for new features in C++14 - -m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[ - -// If the compiler admits that it is not ready for C++14, why torture it? -// Hopefully, this will speed up the test. - -#ifndef __cplusplus - -#error "This is not a C++ compiler" - -#elif __cplusplus < 201402L - -#error "This is not a C++14 compiler" - -#else - -namespace cxx14 -{ - - namespace test_polymorphic_lambdas - { - - int - test() - { - const auto lambda = [](auto&&... args){ - const auto istiny = [](auto x){ - return (sizeof(x) == 1UL) ? 1 : 0; - }; - const int aretiny[] = { istiny(args)... }; - return aretiny[0]; - }; - return lambda(1, 1L, 1.0f, '1'); - } - - } - - namespace test_binary_literals - { - - constexpr auto ivii = 0b0000000000101010; - static_assert(ivii == 42, "wrong value"); - - } - - namespace test_generalized_constexpr - { - - template < typename CharT > - constexpr unsigned long - strlen_c(const CharT *const s) noexcept - { - auto length = 0UL; - for (auto p = s; *p; ++p) - ++length; - return length; - } - - static_assert(strlen_c("") == 0UL, ""); - static_assert(strlen_c("x") == 1UL, ""); - static_assert(strlen_c("test") == 4UL, ""); - static_assert(strlen_c("another\0test") == 7UL, ""); - - } - - namespace test_lambda_init_capture - { - - int - test() - { - auto x = 0; - const auto lambda1 = [a = x](int b){ return a + b; }; - const auto lambda2 = [a = lambda1(x)](){ return a; }; - return lambda2(); - } - - } - - namespace test_digit_seperators - { - - constexpr auto ten_million = 100'000'000; - static_assert(ten_million == 100000000, ""); - - } - - namespace test_return_type_deduction - { - - auto f(int& x) { return x; } - decltype(auto) g(int& x) { return x; } - - template < typename T1, typename T2 > - struct is_same - { - static constexpr auto value = false; - }; - - template < typename T > - struct is_same - { - static constexpr auto value = true; - }; - - int - test() - { - auto x = 0; - static_assert(is_same::value, ""); - static_assert(is_same::value, ""); - return x; - } - - } - -} // namespace cxx14 - -#endif // __cplusplus >= 201402L - -]]) diff --git a/m4/ax_cxx_compile_stdcxx_11.m4 b/m4/ax_cxx_compile_stdcxx_11.m4 deleted file mode 100644 index 0aadeafe78eb..000000000000 --- a/m4/ax_cxx_compile_stdcxx_11.m4 +++ /dev/null @@ -1,39 +0,0 @@ -# ============================================================================ -# http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html -# ============================================================================ -# -# SYNOPSIS -# -# AX_CXX_COMPILE_STDCXX_11([ext|noext], [mandatory|optional]) -# -# DESCRIPTION -# -# Check for baseline language coverage in the compiler for the C++11 -# standard; if necessary, add switches to CXX and CXXCPP to enable -# support. -# -# This macro is a convenience alias for calling the AX_CXX_COMPILE_STDCXX -# macro with the version set to C++11. The two optional arguments are -# forwarded literally as the second and third argument respectively. -# Please see the documentation for the AX_CXX_COMPILE_STDCXX macro for -# more information. If you want to use this macro, you also need to -# download the ax_cxx_compile_stdcxx.m4 file. -# -# LICENSE -# -# Copyright (c) 2008 Benjamin Kosnik -# Copyright (c) 2012 Zack Weinberg -# Copyright (c) 2013 Roy Stogner -# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov -# Copyright (c) 2015 Paul Norman -# Copyright (c) 2015 Moritz Klammler -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 17 - -AX_REQUIRE_DEFINED([AX_CXX_COMPILE_STDCXX]) -AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [AX_CXX_COMPILE_STDCXX([11], [$1], [$2])]) diff --git a/m4/ax_lib_expat.m4 b/m4/ax_lib_expat.m4 deleted file mode 100644 index e9f5117d73e7..000000000000 --- a/m4/ax_lib_expat.m4 +++ /dev/null @@ -1,246 +0,0 @@ -dnl $Id$ -dnl -dnl @synopsis AX_LIB_EXPAT([MINIMUM-VERSION]) -dnl -dnl This macro provides tests of availability of Expat XML Parser -dnl of particular version or newer. -dnl This macro checks for Expat XML Parser headers and libraries -dnl and defines compilation flags -dnl -dnl Macro supports following options and their values: -dnl 1) Single-option usage: -dnl --with-expat - yes, no or path to Expat XML Parser installation prefix -dnl 2) Three-options usage (all options are required): -dnl --with-expat=yes -dnl --with-expat-inc - path to base directory with Expat headers -dnl --with-expat-lib - linker flags for Expat -dnl -dnl This macro calls: -dnl -dnl AC_SUBST(EXPAT_CFLAGS) -dnl AC_SUBST(EXPAT_LDFLAGS) -dnl AC_SUBST(EXPAT_VERSION) - only if version requirement is used -dnl -dnl And sets: -dnl -dnl HAVE_EXPAT -dnl -dnl @category InstalledPackages -dnl @category Cxx -dnl @author Mateusz Loskot -dnl @version $Date$ -dnl @license AllPermissive -dnl Copying and distribution of this file, with or without modification, -dnl are permitted in any medium without royalty provided the copyright notice and -dnl this notice are preserved. -dnl -AC_DEFUN([AX_LIB_EXPAT], -[ - AC_ARG_WITH([expat], - AS_HELP_STRING([--with-expat=@<:@ARG@:>@], - [use Expat XML Parser from given prefix (ARG=path); check standard prefixes (ARG=yes); disable (ARG=no)] - ), - [ - if test "$withval" = "yes"; then - if test -f /usr/local/include/expat.h ; then - expat_prefix=/usr/local - elif test -f /usr/include/expat.h ; then - expat_prefix=/usr - else - expat_prefix="" - fi - expat_requested="yes" - elif test -d "$withval"; then - expat_prefix="$withval" - expat_requested="yes" - else - expat_prefix="" - expat_requested="no" - fi - ], - [ - dnl Default behavior is implicit yes - if test -f /usr/local/include/expat.h ; then - expat_prefix=/usr/local - elif test -f /usr/include/expat.h ; then - expat_prefix=/usr - else - expat_prefix="" - fi - - ] - ) - - AC_ARG_WITH([expat-inc], - AS_HELP_STRING([--with-expat-inc=@<:@DIR@:>@], - [path to Expat XML Parser headers] - ), - [expat_include_dir="$withval"], - [expat_include_dir=""] - ) - AC_ARG_WITH([expat-lib], - AS_HELP_STRING([--with-expat-lib=@<:@ARG@:>@], - [link options for Expat XML Parser libraries] - ), - [expat_lib_flags="$withval"], - [expat_lib_flags=""] - ) - - EXPAT_CFLAGS="" - EXPAT_LDFLAGS="" - EXPAT_VERSION="" - - dnl - dnl Collect include/lib paths and flags - dnl - run_expat_test="no" - - if test -n "$expat_prefix"; then - expat_include_dir="$expat_prefix/include" - run_expat_test="yes" - elif test "$expat_requested" = "yes"; then - if test -n "$expat_include_dir" -a -n "$expat_lib_flags"; then - run_expat_test="yes" - fi - else - run_expat_test="no" - fi - - if test "$run_expat_test" = "yes"; then - unset ac_cv_lib_expat_XML_ParserCreate - saved_LIBS="$LIBS" - LIBS="" - if test -n "$expat_lib_flags"; then - AC_CHECK_LIB(expat,XML_ParserCreate,run_expat_test="yes",run_expat_test="no",$expat_lib_flags) - else - if test "$expat_prefix" = "/usr"; then - AC_CHECK_LIB(expat,XML_ParserCreate,run_expat_test="yes",run_expat_test="no",) - if test "$run_expat_test" = "yes"; then - expat_lib_flags="-lexpat" - fi - else - AC_CHECK_LIB(expat,XML_ParserCreate,run_expat_test="yes",run_expat_test="no",-L$expat_prefix/lib) - if test "$run_expat_test" = "yes"; then - expat_lib_flags="-L$expat_prefix/lib -lexpat" - fi - fi - fi - LIBS="$saved_LIBS" - fi - - dnl - dnl Check Expat XML Parser files - dnl - if test "$run_expat_test" = "yes"; then - - EXPAT_LDFLAGS="$expat_lib_flags" - - saved_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$expat_include_dir" - - dnl - dnl Check Expat headers - dnl - AC_MSG_CHECKING([for Expat XML Parser headers in $expat_include_dir]) - - AC_LANG_PUSH([C++]) - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM( - [[ -@%:@include - ]], - [[]] - )], - [ - EXPAT_CFLAGS="-I$expat_include_dir" - expat_header_found="yes" - AC_MSG_RESULT([found]) - ], - [ - expat_header_found="no" - AC_MSG_RESULT([not found]) - ] - ) - AC_LANG_POP([C++]) - - CPPFLAGS="$saved_CPPFLAGS" - fi - - AC_MSG_CHECKING([for Expat XML Parser]) - - if test "$run_expat_test" = "yes"; then - if test "$expat_header_found" = "yes"; then - - AC_SUBST([EXPAT_CFLAGS]) - AC_SUBST([EXPAT_LDFLAGS]) - - HAVE_EXPAT="yes" - else - HAVE_EXPAT="no" - fi - - AC_MSG_RESULT([$HAVE_EXPAT]) - - dnl - dnl Check Expat version - dnl - if test "$HAVE_EXPAT" = "yes"; then - - expat_version_req=ifelse([$1], [], [], [$1]) - - if test -n "$expat_version_req"; then - - AC_MSG_CHECKING([if Expat XML Parser version is >= $expat_version_req]) - - if test -f "$expat_include_dir/expat.h"; then - - expat_major=$(sed -n '/^#define XML_MAJOR_VERSION.*$/{s/\([^0-9]*\)\([0-9]*\).*/\2/;P;}' \ - $expat_include_dir/expat.h) - expat_minor=$(sed -n '/^#define XML_MINOR_VERSION.*$/{s/\([^0-9]*\)\([0-9]*\).*/\2/;P;}' \ - $expat_include_dir/expat.h) - expat_revision=$(sed -n '/^#define XML_MICRO_VERSION.*$/{s/\([^0-9]*\)\([0-9]*\).*/\2/;P;}' \ - $expat_include_dir/expat.h) - - EXPAT_VERSION="$expat_major.$expat_minor.$expat_revision" - AC_SUBST([EXPAT_VERSION]) - - dnl Decompose required version string and calculate numerical representation - expat_version_req_major=`expr $expat_version_req : '\([[0-9]]*\)'` - expat_version_req_minor=`expr $expat_version_req : '[[0-9]]*\.\([[0-9]]*\)'` - expat_version_req_revision=`expr $expat_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'` - if test "x$expat_version_req_revision" = "x"; then - expat_version_req_revision="0" - fi - - expat_version_req_number=`expr $expat_version_req_major \* 10000 \ - \+ $expat_version_req_minor \* 100 \ - \+ $expat_version_req_revision` - - dnl Calculate numerical representation of detected version - expat_version_number=`expr $expat_major \* 10000 \ - \+ $expat_minor \* 100 \ - \+ $expat_revision` - - expat_version_check=`expr $expat_version_number \>\= $expat_version_req_number` - if test "$expat_version_check" = "1"; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - AC_MSG_WARN([Found Expat XML Parser $EXPAT_VERSION, which is older than required. Possible compilation failure.]) - fi - else - AC_MSG_RESULT([no]) - AC_MSG_WARN([Missing expat.h header. Unable to determine Expat version.]) - fi - fi - fi - - else - HAVE_EXPAT="no" - AC_MSG_RESULT([$HAVE_EXPAT]) - - if test "$expat_requested" = "yes"; then - AC_MSG_WARN([Expat XML Parser support requested but headers or library not found. Specify valid prefix of Expat using --with-expat=@<:@DIR@:>@ or provide include directory and linker flags using --with-expat-inc and --with-expat-lib]) - fi - fi -]) diff --git a/m4/ax_lib_libkml.m4 b/m4/ax_lib_libkml.m4 deleted file mode 100644 index d468102ecf3b..000000000000 --- a/m4/ax_lib_libkml.m4 +++ /dev/null @@ -1,337 +0,0 @@ -dnl $Id$ -dnl -dnl @synopsis AX_LIB_LIBKML([MINIMUM-VERSION]) -dnl -dnl This macro provides tests of availability of Google libkml library -dnl of particular version or newer. -dnl -dnl libkml - https://github.com/google/libkml -dnl -dnl A fork of libkml is also available: -dnl -dnl https://github.com/libkml/libkml -dnl -dnl This macros checks for Google libkml headers and libraries -dnl and defines compilation flags. -dnl -dnl The libkml fork supports pkg-config, which is tried first. -dnl If a suitable libkml version is not found with pkg-config, the manual -dnl checks for the libkml library & include paths are performed. -dnl -dnl Macro supports following options and their values: -dnl 1) Single-option usage: -dnl --with-libkml - yes, no or path to Google libkml installation prefix -dnl 2) Three-options usage (all options are required): -dnl --with-libkml=yes -dnl --with-libkml-inc - path to base directory with headers -dnl --with-libkml-lib - linker flags for -dnl -dnl This macro calls: -dnl -dnl AC_SUBST(LIBKML_CFLAGS) -dnl AC_SUBST(LIBKML_LDFLAGS) -dnl AC_SUBST(LIBKML_VERSION) - only if version requirement is used -dnl -dnl And sets: -dnl -dnl HAVE_LIBKML -dnl -dnl @category InstalledPackages -dnl @category Cxx -dnl @author Mateusz Loskot -dnl @version $Date$ -dnl @license AllPermissive -dnl Copying and distribution of this file, with or without modification, -dnl are permitted in any medium without royalty provided the copyright notice and -dnl this notice are preserved. -dnl -AC_DEFUN([AX_LIB_LIBKML], -[ - AC_ARG_WITH([libkml], - AS_HELP_STRING([--with-libkml=@<:@ARG@:>@], - [use Google libkml from given prefix (ARG=path); check standard prefixes (ARG=yes); disable (ARG=no)] - ), - [ - if test "$withval" = "yes"; then - if test -d /usr/local/include/kml ; then - libkml_prefix=/usr/local - elif test -d /usr/include/kml ; then - libkml_prefix=/usr - else - libkml_prefix="" - fi - libkml_requested="yes" - elif test -d "$withval"; then - libkml_prefix="$withval" - libkml_requested="yes" - else - libkml_prefix="" - libkml_requested="no" - fi - ], - [ - dnl Default behavior is implicit yes - if test -d /usr/local/include/kml ; then - libkml_prefix=/usr/local - elif test -d /usr/include/kml ; then - libkml_prefix=/usr - else - libkml_prefix="" - fi - ] - ) - - AC_ARG_WITH([libkml-inc], - AS_HELP_STRING([--with-libkml-inc=@<:@DIR@:>@], - [path to Google libkml headers] - ), - [libkml_include_dir="$withval"], - [libkml_include_dir=""] - ) - AC_ARG_WITH([libkml-lib], - AS_HELP_STRING([--with-libkml-lib=@<:@ARG@:>@], - [link options for Google libkml libraries] - ), - [libkml_lib_flags="$withval"], - [libkml_lib_flags=""] - ) - - dnl - dnl Try pkg-config first - dnl - PKG_PROG_PKG_CONFIG([0.25]) # check and set $PKG_CONFIG - - PKG_CHECK_MODULES([LIBKML], [libkml >= $1], - [LIBKML_VERSION=`$PKG_CONFIG --modversion libkml`], - [LIBKML_VERSION=;]) - - if test -n "$LIBKML_VERSION" -a -n "$libkml_prefix"; then - # Test that the package found is for the right architecture - saved_CPPFLAGS="$CPPFLAGS" - saved_LIBS="$LIBS" - CPPFLAGS="$CPPFLAGS $LIBKML_CFLAGS" - LIBS="$LIBKML_LIBS" - - AC_MSG_CHECKING([if libkml can be linked]) - AC_LANG_PUSH([C++]) - AC_LINK_IFELSE([ - AC_LANG_PROGRAM( - [[ -@%:@include - ]], - [[ -kmldom::KmlFactory* factory = kmldom::KmlFactory::GetFactory(); - ]] - )], - [ - HAVE_LIBKML=yes - AC_MSG_RESULT([yes]) - ], - [ - HAVE_LIBKML=no - AC_MSG_RESULT([no]) - ] - ) - AC_LANG_POP([C++]) - - CPPFLAGS="$saved_CPPFLAGS" - LIBS="$saved_LIBS" - fi - - if test "$HAVE_LIBKML" = "yes"; then - HAVE_LIBKML="yes" - - LIBKML_LDFLAGS="$LIBKML_LIBS" - - AC_MSG_CHECKING([for LIBKML CFLAGS]) - AC_MSG_RESULT([$LIBKML_CFLAGS]) - - AC_MSG_CHECKING([for LIBKML LDFLAGS]) - AC_MSG_RESULT([$LIBKML_LDFLAGS]) - - AC_MSG_CHECKING([for LIBKML VERSION]) - AC_MSG_RESULT([$LIBKML_VERSION]) - - AC_SUBST([LIBKML_CFLAGS]) - AC_SUBST([LIBKML_LDLAGS]) - AC_SUBST([LIBKML_VERSION]) - else - LIBKML_CFLAGS="" - LIBKML_LDFLAGS="" - LIBKML_VERSION="" - - dnl - dnl Collect include/lib paths and flags - dnl - run_libkml_test="no" - - if test -n "$libkml_prefix"; then - libkml_include_dir="$libkml_prefix/include" - libkml_include_dir2="$libkml_prefix/include/kml" - libkml_include_dir3="$libkml_prefix/include/kml/third_party/boost_1_34_1" - if test "$libkml_prefix" = "/usr"; then - libkml_lib_flags="-lkmldom -lkmlbase -lkmlengine -lkmlconvenience -lminizip -luriparser" - else - libkml_lib_flags="-L$libkml_prefix/lib -lkmldom -lkmlbase -lkmlengine -lkmlconvenience -lminizip -luriparser" - fi - run_libkml_test="yes" - elif test "$libkml_requested" = "yes"; then - if test -n "$libkml_include_dir" -a -n "$libkml_lib_flags"; then - libkml_include_dir2="$libkml_include_dir/kml" - libkml_include_dir3="$libkml_include_dir/kml/third_party/boost_1_34_1" - run_libkml_test="yes" - fi - else - run_libkml_test="no" - fi - - dnl - dnl Check libkml headers/libraries - dnl - if test "$run_libkml_test" = "yes"; then - - saved_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$libkml_include_dir -I$libkml_include_dir2 -I$libkml_include_dir3" - - saved_LIBS="$LIBS" - LIBS="$LIBS $libkml_lib_flags" - - dnl - dnl Check headers - dnl - AC_MSG_CHECKING([for Google libkml headers in $libkml_include_dir, $libkml_include_dir2, and $libkml_include_dir3]) - - AC_LANG_PUSH([C++]) - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM( - [[ -@%:@include - ]], - [[]] - )], - [ - LIBKML_CFLAGS="-I$libkml_include_dir -I$libkml_include_dir2 -I$libkml_include_dir3" - libkml_header_found="yes" - AC_MSG_RESULT([found]) - ], - [ - libkml_header_found="no" - AC_MSG_RESULT([not found]) - ] - ) - AC_LANG_POP([C++]) - - dnl - dnl Check libraries - dnl - if test "$libkml_header_found" = "yes"; then - - AC_MSG_CHECKING([for Google libkml libraries]) - - AC_LANG_PUSH([C++]) - AC_LINK_IFELSE([ - AC_LANG_PROGRAM( - [[ -@%:@include - ]], - [[ -kmldom::KmlFactory* factory = kmldom::KmlFactory::GetFactory(); - ]] - )], - [ - LIBKML_LDFLAGS="$libkml_lib_flags" - libkml_lib_found="yes" - AC_MSG_RESULT([found]) - ], - [ - libkml_lib_found="no" - AC_MSG_RESULT([not found]) - ] - ) - AC_LANG_POP([C++]) - fi - - CPPFLAGS="$saved_CPPFLAGS" - LIBS="$saved_LIBS" - fi - - AC_MSG_CHECKING([for Google libkml]) - - if test "$run_libkml_test" = "yes"; then - if test "$libkml_header_found" = "yes" -a "$libkml_lib_found" = "yes"; then - - AC_SUBST([LIBKML_CFLAGS]) - AC_SUBST([LIBKML_LDFLAGS]) - - HAVE_LIBKML="yes" - else - HAVE_LIBKML="no" - fi - - AC_MSG_RESULT([$HAVE_LIBKML]) - - dnl - dnl Check version - dnl - if test "$HAVE_LIBKML" = "yes"; then - - libkml_version_req=ifelse([$1], [], [], [$1]) - - if test -n "$libkml_version_req"; then - - AC_MSG_CHECKING([if Google libkml version is >= $libkml_version_req]) - - if test -f "$libkml_include_dir2/base/version.h"; then - - libkml_major=$(sed -n '/^#define LIBKML_MAJOR_VERSION.*$/{s/\([^0-9]*\)\([0-9]*\).*/\2/;P;}' \ - $libkml_include_dir2/base/version.h) - libkml_minor=$(sed -n '/^#define LIBKML_MINOR_VERSION.*$/{s/\([^0-9]*\)\([0-9]*\).*/\2/;P;}' \ - $libkml_include_dir2/base/version.h) - libkml_revision=$(sed -n '/^#define LIBKML_MICRO_VERSION.*$/{s/\([^0-9]*\)\([0-9]*\).*/\2/;P;}' \ - $libkml_include_dir2/base/version.h) - - LIBKML_VERSION="$libkml_major.$libkml_minor.$libkml_revision" - AC_SUBST([LIBKML_VERSION]) - - dnl Decompose required version string and calculate numerical representation - libkml_version_req_major=`expr $libkml_version_req : '\([[0-9]]*\)'` - libkml_version_req_minor=`expr $libkml_version_req : '[[0-9]]*\.\([[0-9]]*\)'` - libkml_version_req_revision=`expr $libkml_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'` - if test "x$libkml_version_req_revision" = "x"; then - libkml_version_req_revision="0" - fi - - libkml_version_req_number=`expr $libkml_version_req_major \* 10000 \ - \+ $libkml_version_req_minor \* 100 \ - \+ $libkml_version_req_revision` - - dnl Calculate numerical representation of detected version - libkml_version_number=`expr $libkml_major \* 10000 \ - \+ $libkml_minor \* 100 \ - \+ $libkml_revision` - - libkml_version_check=`expr $libkml_version_number \>\= $libkml_version_req_number` - if test "$libkml_version_check" = "1"; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - AC_MSG_WARN([Found Google libkml ${LIBKML_VERSION}, which is older than required (${libkml_version_req}). KML support disabled.]) - HAVE_LIBKML="no" - fi - else - AC_MSG_RESULT([no]) - AC_MSG_WARN([Missing header $libkml_include_dir2/base/bersion.hpp. Unable to determine Google libkml version.]) - fi - fi - fi - - else - HAVE_LIBKML="no" - AC_MSG_RESULT([$HAVE_LIBKML]) - - if test "$libkml_requested" = "yes"; then - AC_MSG_WARN([Google libkml support requested but headers or library not found. Specify valid prefix of libkml using --with-libkml=@<:@DIR@:>@ or provide include directory and linker flags using --with-libkml-inc and --with-libkml-lib]) - fi - fi - fi -]) diff --git a/m4/ax_lib_sqlite3.m4 b/m4/ax_lib_sqlite3.m4 deleted file mode 100644 index 1623166f717c..000000000000 --- a/m4/ax_lib_sqlite3.m4 +++ /dev/null @@ -1,188 +0,0 @@ -dnl $Id$ -dnl -dnl @synopsis AX_LIB_SQLITE3([MINIMUM-VERSION]) -dnl -dnl Test for the SQLite 3 library of a particular version (or newer) -dnl -dnl This macro takes only one optional argument, required version -dnl of SQLite 3 library. If required version is not passed, -dnl 3.0.0 is used in the test of existence of SQLite 3. -dnl -dnl If no installation prefix to the installed SQLite library is given -dnl the macro searches under /usr, /usr/local, and /opt. -dnl -dnl This macro calls: -dnl -dnl AC_SUBST(SQLITE3_CFLAGS) -dnl AC_SUBST(SQLITE3_LDFLAGS) -dnl AC_SUBST(SQLITE3_VERSION) -dnl -dnl And sets: -dnl -dnl HAVE_SQLITE3 -dnl -dnl @category InstalledPackages -dnl @category Cxx -dnl @author Mateusz Loskot -dnl @version $Date$ -dnl @license AllPermissive -dnl -dnl $Id$ -dnl -AC_DEFUN([AX_LIB_SQLITE3], -[ - AC_ARG_WITH([sqlite3], - AS_HELP_STRING( - [--with-sqlite3=@<:@ARG@:>@], - [use SQLite 3 library @<:@default=yes@:>@, optionally specify the prefix for sqlite3 library] - ), - [ - if test "$withval" = "no"; then - WANT_SQLITE3="no" - elif test "$withval" = "yes"; then - WANT_SQLITE3="yes" - ac_sqlite3_path="" - else - WANT_SQLITE3="yes" - ac_sqlite3_path="$withval" - fi - ], - [WANT_SQLITE3="yes"] - ) - - SQLITE3_CFLAGS="" - SQLITE3_LDFLAGS="" - SQLITE3_VERSION="" - HAVE_SQLITE3="no" - - sqlite3_version_req=ifelse([$1], [], [3.0.0], [$1]) - sqlite3_version_req_shorten=`expr $sqlite3_version_req : '\([[0-9]]*\.[[0-9]]*\)'` - sqlite3_version_req_major=`expr $sqlite3_version_req : '\([[0-9]]*\)'` - sqlite3_version_req_minor=`expr $sqlite3_version_req : '[[0-9]]*\.\([[0-9]]*\)'` - sqlite3_version_req_micro=`expr $sqlite3_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'` - if test "x$sqlite3_version_req_micro" = "x" ; then - sqlite3_version_req_micro="0" - fi - - sqlite3_version_req_number=`expr $sqlite3_version_req_major \* 1000000 \ - \+ $sqlite3_version_req_minor \* 1000 \ - \+ $sqlite3_version_req_micro` - - if test "x$WANT_SQLITE3" = "xyes"; then - ac_sqlite3_header="sqlite3.h" - LIB_SQLITE3_FOUND=no - - if test "$ac_sqlite3_path" != ""; then - - unset ac_cv_lib_sqlite3_sqlite3_open - saved_LIBS="$LIBS" - LIBS="" - AC_CHECK_LIB(sqlite3,sqlite3_open,LIB_SQLITE3_FOUND=yes,LIB_SQLITE3_FOUND=no,-L$ac_sqlite3_path/lib) - LIBS="$saved_LIBS" - if test "$LIB_SQLITE3_FOUND" = "yes"; then - ac_sqlite3_ldflags="-L$ac_sqlite3_path/lib" - fi - - ac_sqlite3_cppflags="-I$ac_sqlite3_path/include" - else - for ac_sqlite3_path_tmp in /usr /usr/local /opt ; do - if test -f "$ac_sqlite3_path_tmp/include/$ac_sqlite3_header" \ - && test -r "$ac_sqlite3_path_tmp/include/$ac_sqlite3_header"; then - ac_sqlite3_path=$ac_sqlite3_path_tmp - - unset ac_cv_lib_sqlite3_sqlite3_open - saved_LIBS="$LIBS" - LIBS="" - AC_CHECK_LIB(sqlite3,sqlite3_open,LIB_SQLITE3_FOUND=yes,LIB_SQLITE3_FOUND=no,) - LIBS="$saved_LIBS" - if test "$LIB_SQLITE3_FOUND" = "yes"; then - ac_sqlite3_ldflags="" - else - unset ac_cv_lib_sqlite3_sqlite3_open - saved_LIBS="$LIBS" - LIBS="" - AC_CHECK_LIB(sqlite3,sqlite3_open,LIB_SQLITE3_FOUND=yes,LIB_SQLITE3_FOUND=no,-L$ac_sqlite3_path_tmp/lib) - LIBS="$saved_LIBS" - if test "$LIB_SQLITE3_FOUND" = "yes"; then - ac_sqlite3_ldflags="-L$ac_sqlite3_path_tmp/lib" - fi - fi - - ac_sqlite3_cppflags="-I$ac_sqlite3_path_tmp/include" - break; - fi - done - fi - - if test "$LIB_SQLITE3_FOUND" = "no"; then - WANT_SQLITE3="no" - fi - fi - - AC_MSG_CHECKING([for SQLite3 library >= $sqlite3_version_req]) - - if test "x$WANT_SQLITE3" = "xyes"; then - - ac_sqlite3_ldflags="$ac_sqlite3_ldflags -lsqlite3" - - saved_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $ac_sqlite3_cppflags" - - AC_LANG_PUSH([C++]) - AC_COMPILE_IFELSE( - [ - AC_LANG_PROGRAM([[@%:@include ]], - [[ -#if (SQLITE_VERSION_NUMBER >= $sqlite3_version_req_number) -// Everything is okay -#else -# error SQLite version is too old -#endif - ]] - ) - ], - [ - AC_MSG_RESULT([yes]) - HAVE_SQLITE3="yes" - success="yes" - ], - [ - AC_MSG_RESULT([not found]) - HAVE_SQLITE3="no" - success="no" - ] - ) - AC_LANG_POP([C++]) - - CPPFLAGS="$saved_CPPFLAGS" - - if test "$success" = "yes"; then - - SQLITE3_CFLAGS="$ac_sqlite3_cppflags" - SQLITE3_LDFLAGS="$ac_sqlite3_ldflags" - - ac_sqlite3_header_path="$ac_sqlite3_path/include/$ac_sqlite3_header" - - dnl Retrieve SQLite release version - if test "x$ac_sqlite3_header_path" != "x"; then - ac_sqlite3_version=`cat $ac_sqlite3_header_path \ - | grep '#define.*SQLITE_VERSION.*\"' | sed -e 's/.* "//' \ - | sed -e 's/"//'` - if test "$ac_sqlite3_version" != ""; then - SQLITE3_VERSION=$ac_sqlite3_version - else - AC_MSG_WARN([Can not find SQLITE_VERSION macro in sqlite3.h header to retrieve SQLite version!]) - fi - fi - - AC_SUBST([SQLITE3_VERSION]) - fi - - AC_SUBST([SQLITE3_CFLAGS]) - AC_SUBST([SQLITE3_LDFLAGS]) - - else - AC_MSG_RESULT([disabled]) - fi -]) - diff --git a/m4/ax_lib_xerces.m4 b/m4/ax_lib_xerces.m4 deleted file mode 100644 index 5c49758a5c1d..000000000000 --- a/m4/ax_lib_xerces.m4 +++ /dev/null @@ -1,273 +0,0 @@ -dnl $Id$ -dnl -dnl @synopsis AX_LIB_XERCES([MINIMUM-VERSION]) -dnl -dnl This macro provides tests of availability of Apache Xerces C++ Parser -dnl of particular version or newer. -dnl This macros checks for Apache Xerces C++ Parser headers and libraries -dnl and defines compilation flags -dnl -dnl Macro supports following options and their values: -dnl 1) Single-option usage: -dnl --with-xerces - yes, no or path to Xerces C++ Parser installation prefix -dnl 2) Three-options usage (all options are required): -dnl --with-xerces=yes -dnl --with-xerces-inc - path to base directory with Xerces headers -dnl --with-xerces-lib - linker flags for Xerces -dnl -dnl This macro calls: -dnl -dnl AC_SUBST(XERCES_CFLAGS) -dnl AC_SUBST(XERCES_LDFLAGS) -dnl AC_SUBST(XERCES_VERSION) - only if version requirement is used -dnl -dnl And sets: -dnl -dnl HAVE_XERCES -dnl -dnl @category InstalledPackages -dnl @category Cxx -dnl @author Mateusz Loskot -dnl @version $Date$ -dnl @license AllPermissive -dnl Copying and distribution of this file, with or without modification, -dnl are permitted in any medium without royalty provided the copyright notice and -dnl this notice are preserved. -dnl -AC_DEFUN([AX_LIB_XERCES], -[ - AC_ARG_WITH([xerces], - AS_HELP_STRING([--with-xerces=@<:@ARG@:>@], - [use Xerces C++ Parser from given prefix (ARG=path); check standard prefixes (ARG=yes); disable (ARG=no)] - ), - [ - if test "$withval" = "yes"; then - if test -d /usr/local/include/xercesc ; then - xerces_prefix=/usr/local - elif test -d /usr/include/xercesc ; then - xerces_prefix=/usr - else - xerces_prefix="" - fi - xerces_requested="yes" - elif test -d "$withval"; then - xerces_prefix="$withval" - xerces_requested="yes" - else - xerces_prefix="" - xerces_requested="no" - fi - ], - [ - dnl Default behavior is implicit yes - if test -d /usr/local/include/xercesc ; then - xerces_prefix=/usr/local - elif test -d /usr/include/xercesc ; then - xerces_prefix=/usr - else - xerces_prefix="" - fi - ] - ) - - AC_ARG_WITH([xerces-inc], - AS_HELP_STRING([--with-xerces-inc=@<:@DIR@:>@], - [path to Xerces C++ Parser headers] - ), - [xerces_include_dir="$withval"], - [xerces_include_dir=""] - ) - AC_ARG_WITH([xerces-lib], - AS_HELP_STRING([--with-xerces-lib=@<:@ARG@:>@], - [link options for Xerces C++ Parser libraries] - ), - [xerces_lib_flags="$withval"], - [xerces_lib_flags=""] - ) - - XERCES_CFLAGS="" - XERCES_LDFLAGS="" - XERCES_VERSION="" - - dnl - dnl Collect include/lib paths and flags - dnl - run_xerces_test="no" - - if test -n "$xerces_prefix" -a -z "$xerces_include_dir" -a -z "$xerces_lib_flags"; then - xerces_include_dir="$xerces_prefix/include" - xerces_include_dir2="$xerces_prefix/include/xercesc" - if test "$xerces_prefix" = "/usr"; then - xerces_lib_flags="-lxerces-c -lpthread" - else - xerces_lib_flags="-L$xerces_prefix/lib -lxerces-c -lpthread" - fi - run_xerces_test="yes" - elif test "$xerces_requested" = "yes"; then - if test -n "$xerces_include_dir" -a -n "$xerces_lib_flags"; then - xerces_include_dir2="$xerces_include_dir/xercesc" - run_xerces_test="yes" - fi - else - run_xerces_test="no" - fi - - dnl - dnl Check Xerces C++ Parser files - dnl - if test "$run_xerces_test" = "yes"; then - - saved_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$xerces_include_dir -I$xerces_include_dir2" - - saved_LIBS="$LIBS" - LIBS="$xerces_lib_flags $LIBS" - - dnl - dnl Check Xerces headers - dnl - AC_MSG_CHECKING([for Xerces C++ Parser headers in $xerces_include_dir and $xerces_include_dir2]) - - AC_LANG_PUSH([C++]) - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM( - [[ -@%:@include -@%:@include - ]], - [[]] - )], - [ - XERCES_CFLAGS="-I$xerces_include_dir -I$xerces_include_dir2" - xerces_header_found="yes" - AC_MSG_RESULT([found]) - ], - [ - xerces_header_found="no" - AC_MSG_RESULT([not found]) - ] - ) - AC_LANG_POP([C++]) - - dnl - dnl Check Xerces libraries - dnl - if test "$xerces_header_found" = "yes"; then - - AC_MSG_CHECKING([for Xerces C++ Parser libraries]) - - AC_LANG_PUSH([C++]) - AC_LINK_IFELSE([ - AC_LANG_PROGRAM( - [[ -@%:@include -@%:@include -using namespace XERCES_CPP_NAMESPACE; - ]], - [[ -XMLPlatformUtils::Initialize(); - ]] - )], - [ - XERCES_LDFLAGS="$xerces_lib_flags" - xerces_lib_found="yes" - AC_MSG_RESULT([found]) - ], - [ - xerces_lib_found="no" - AC_MSG_RESULT([not found]) - ] - ) - AC_LANG_POP([C++]) - fi - - CPPFLAGS="$saved_CPPFLAGS" - LIBS="$saved_LIBS" - fi - - AC_MSG_CHECKING([for Xerces C++ Parser]) - - if test "$run_xerces_test" = "yes"; then - if test "$xerces_header_found" = "yes" -a "$xerces_lib_found" = "yes"; then - HAVE_XERCES="yes" - else - XERCES_CFLAGS="" - XERCES_LDFLAGS="" - HAVE_XERCES="no" - fi - - AC_MSG_RESULT([$HAVE_XERCES]) - - dnl - dnl Check Xerces version - dnl - if test "$HAVE_XERCES" = "yes"; then - - xerces_version_req=ifelse([$1], [], [], [$1]) - - if test -n "$xerces_version_req"; then - - AC_MSG_CHECKING([if Xerces C++ Parser version is >= $xerces_version_req]) - - if test -f "$xerces_include_dir2/util/XercesVersion.hpp"; then - - xerces_major=$(sed -n '/^#define XERCES_VERSION_MAJOR.*$/{s/\([^0-9]*\)\([0-9]*\).*/\2/;P;}' \ - $xerces_include_dir2/util/XercesVersion.hpp) - xerces_minor=$(sed -n '/^#define XERCES_VERSION_MINOR.*$/{s/\([^0-9]*\)\([0-9]*\).*/\2/;P;}' \ - $xerces_include_dir2/util/XercesVersion.hpp) - xerces_revision=$(sed -n '/^#define XERCES_VERSION_REVISION.*$/{s/\([^0-9]*\)\([0-9]*\).*/\2/;P;}' \ - $xerces_include_dir2/util/XercesVersion.hpp) - - XERCES_VERSION="$xerces_major.$xerces_minor.$xerces_revision" - AC_SUBST([XERCES_VERSION]) - - dnl Decompose required version string and calculate numerical representation - xerces_version_req_major=`expr $xerces_version_req : '\([[0-9]]*\)'` - xerces_version_req_minor=`expr $xerces_version_req : '[[0-9]]*\.\([[0-9]]*\)'` - xerces_version_req_revision=`expr $xerces_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'` - if test "x$xerces_version_req_revision" = "x"; then - xerces_version_req_revision="0" - fi - - xerces_version_req_number=`expr $xerces_version_req_major \* 10000 \ - \+ $xerces_version_req_minor \* 100 \ - \+ $xerces_version_req_revision` - - dnl Calculate numerical representation of detected version - xerces_version_number=`expr $xerces_major \* 10000 \ - \+ $xerces_minor \* 100 \ - \+ $xerces_revision` - - xerces_version_check=`expr $xerces_version_number \>\= $xerces_version_req_number` - if test "$xerces_version_check" = "1"; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - if test "$xerces_requested" = "yes"; then - AC_MSG_ERROR([Found Xerces C++ Parser $XERCES_VERSION, which is older than required.]) - else - AC_MSG_WARN([Found Xerces C++ Parser $XERCES_VERSION, which is older than required. Disabling it]) - XERCES_CFLAGS="" - XERCES_LDFLAGS="" - HAVE_XERCES="no" - fi - fi - else - AC_MSG_RESULT([no]) - AC_MSG_WARN([Missing header XercesVersion.hpp. Unable to determine Xerces version.]) - fi - fi - fi - - AC_SUBST([XERCES_CFLAGS]) - AC_SUBST([XERCES_LDFLAGS]) - - else - HAVE_XERCES="no" - AC_MSG_RESULT([$HAVE_XERCES]) - - if test "$xerces_requested" = "yes"; then - AC_MSG_WARN([Xerces C++ Parser support requested but headers or library not found. Specify valid prefix of Xerces C++ using --with-xerces=@<:@DIR@:>@ or provide include directory and linker flags using --with-xerces-inc and --with-xerces-lib]) - fi - fi -]) diff --git a/m4/ax_oracle_oci.m4 b/m4/ax_oracle_oci.m4 deleted file mode 100644 index f3c18de3db97..000000000000 --- a/m4/ax_oracle_oci.m4 +++ /dev/null @@ -1,309 +0,0 @@ -dnl @synopsis AX_LIB_ORACLE_OCI([MINIMUM-VERSION]) -dnl -dnl @summary Find Oracle OCI API. -dnl -dnl This macro provides tests of availability of Oracle OCI API of -dnl particular version or newer. This macros checks for Oracle OCI -dnl headers and libraries and defines compilation flags. -dnl -dnl Macro supports following options and their values: -dnl -dnl 1) Single-option usage: -dnl -dnl --with-oci -- path to ORACLE_HOME directory -dnl -dnl 2) Two-options usage (both options are required): -dnl -dnl --with-oci-include -- path to directory with OCI headers -dnl --with-oci-lib -- path to directory with OCI libraries -dnl -dnl NOTE: These options described above do not take yes|no values. If -dnl 'yes' value is passed, then WARNING message will be displayed, 'no' -dnl value, as well as the --without-oci-* variations will cause the -dnl macro to not check enything. -dnl -dnl This macro calls: -dnl -dnl AC_SUBST(ORACLE_OCI_CFLAGS) -dnl AC_SUBST(ORACLE_OCI_LDFLAGS) -dnl AC_SUBST(ORACLE_OCI_VERSION) -dnl -dnl And sets: -dnl -dnl HAVE_ORACLE_OCI -dnl -dnl @category InstalledPackages -dnl @category Cxx -dnl @author Mateusz Loskot -dnl @version 2007-11-30 -dnl @license AllPermissive - -AC_DEFUN([AX_LIB_ORACLE_OCI], -[ - AC_ARG_WITH([oci], - AS_HELP_STRING([--with-oci=@<:@ARG@:>@], - [use Oracle OCI API from given Oracle home (ARG=path); use existing ORACLE_HOME (ARG=yes); disable Oracle OCI support (ARG=no)] - ), - [ - if test "$withval" = "yes"; then - if test -n "$ORACLE_HOME"; then - oracle_home_dir="$ORACLE_HOME" - else - oracle_home_dir="" - fi - elif test -d "$withval"; then - oracle_home_dir="$withval" - else - oracle_home_dir="" - fi - ], - [ - if test -n "$ORACLE_HOME"; then - oracle_home_dir="$ORACLE_HOME" - else - oracle_home_dir="" - fi - ] - ) - - AC_ARG_WITH([oci-include], - AS_HELP_STRING([--with-oci-include=@<:@DIR@:>@], - [use Oracle OCI API headers from given path] - ), - [oracle_home_include_dir="$withval"], - [oracle_home_include_dir=""] - ) - AC_ARG_WITH([oci-lib], - AS_HELP_STRING([--with-oci-lib=@<:@DIR@:>@], - [use Oracle OCI API libraries from given path] - ), - [oracle_home_lib_dir="$withval"], - [oracle_home_lib_dir=""] - ) - - ORACLE_OCI_CFLAGS="" - ORACLE_OCI_LDFLAGS="" - ORACLE_OCI_VERSION="" - - dnl - dnl Collect include/lib paths - dnl - want_oracle_but_no_path="no" - - if test -n "$oracle_home_dir"; then - - if test "$oracle_home_dir" != "no" -a "$oracle_home_dir" != "yes"; then - dnl ORACLE_HOME path provided - - dnl Primary path to OCI headers, available in Oracle>=10 - if test -d "$oracle_home_dir/rdbms/public"; then - oracle_include_dir="$oracle_home_dir/rdbms/public" - fi - - dnl Secondary path to OCI headers used by older versions - if test -d "$oracle_home_dir/rdbms/demo"; then - oracle_include_dir="$oracle_home_dir/rdbms/demo" - fi - - dnl Another path to OCI headers used by instant client - if test -d "$oracle_home_dir/sdk/include"; then - oracle_include_dir="$oracle_home_dir/sdk/include" - fi - - dnl Library path - oracle_lib_dir="$oracle_home_dir/lib" - - dnl Library path for instant client - oracle_lib_dir2="$oracle_home_dir" - - elif test "$oracle_home_dir" = "yes"; then - want_oracle_but_no_path="yes" - fi - - elif test -n "$oracle_home_include_dir" -o -n "$oracle_home_lib_dir"; then - - if test "$oracle_home_include_dir" != "no" -a "$oracle_home_include_dir" != "yes"; then - oracle_include_dir="$oracle_home_include_dir" - elif test "$oracle_home_include_dir" = "yes"; then - want_oracle_but_no_path="yes" - fi - - if test "$oracle_home_lib_dir" != "no" -a "$oracle_home_lib_dir" != "yes"; then - oracle_lib_dir="$oracle_home_lib_dir" - elif test "$oracle_home_lib_dir" = "yes"; then - want_oracle_but_no_path="yes" - fi - fi - - if test "$want_oracle_but_no_path" = "yes"; then - AC_MSG_WARN([Oracle support is requested but no Oracle paths have been provided. \ -Please, locate Oracle directories using --with-oci or \ ---with-oci-include and --with-oci-lib options.]) - fi - - dnl - dnl Check OCI files - dnl - if test -n "$oracle_include_dir" -a -n "$oracle_lib_dir" -o -n "$oracle_lib_dir2"; then - - saved_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$oracle_include_dir" - - dnl Depending on later Oracle version detection, - dnl -lnnz10 flag might be removed for older Oracle < 10.x - if test -n "$oracle_include_dir" ; then - oci_ldflags="-L$oracle_lib_dir -lclntsh" - else - oci_ldflags="-L$oracle_lib_dir -L$oracle_lib_dir2 -lclntsh" - fi - - saved_LIBS="$LIBS" - LIBS="$LIBS $oci_ldflags" - - dnl - dnl Check OCI headers - dnl - if test -f "$oracle_include_dir/oci.h"; then - ACTIVE_INCLUDE_DIR="$oracle_include_dir" - fi - AC_MSG_CHECKING([for Oracle OCI headers in $ACTIVE_INCLUDE_DIR]) - - AC_LANG_PUSH(C++) - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([[@%:@include ]], - [[ -#if defined(OCI_MAJOR_VERSION) -#if OCI_MAJOR_VERSION == 10 && OCI_MINOR_VERSION == 2 -// Oracle 10.2 detected -#endif -#elif defined(OCI_V7_SYNTAX) -// OK, older Oracle detected -// TODO - mloskot: find better macro to check for older versions; -#else -# error Oracle oci.h header not found -#endif - ]] - )], - [ - ORACLE_OCI_CFLAGS="-I$oracle_include_dir" - - oci_header_found="yes" - AC_MSG_RESULT([yes]) - ], - [ - oci_header_found="no" - AC_MSG_RESULT([ header not found]) - ] - ) - AC_LANG_POP([C++]) - - dnl - dnl Check OCI libraries - dnl - if test "$oci_header_found" = "yes"; then - - AC_MSG_CHECKING([for Oracle OCI libraries in $oracle_lib_dir]) - - AC_LANG_PUSH(C++) - AC_LINK_IFELSE([ - AC_LANG_PROGRAM([[@%:@include ]], - [[ -OCIEnv* envh = 0; -OCIEnvCreate(&envh, OCI_DEFAULT, 0, 0, 0, 0, 0, 0); -if (envh) OCIHandleFree(envh, OCI_HTYPE_ENV); - ]] - )], - [ - ORACLE_OCI_LDFLAGS="$oci_ldflags" - oci_lib_found="yes" - AC_MSG_RESULT([yes]) - ], - [ - oci_lib_found="no" - AC_MSG_RESULT([library not found]) - ] - ) - AC_LANG_POP([C++]) - fi - - CPPFLAGS="$saved_CPPFLAGS" - LIBS="$saved_LIBS" - fi - - dnl - dnl Check required version of Oracle is available - dnl - oracle_version_req=ifelse([$1], [], [], [$1]) - - if test "$oci_header_found" = "yes" -a "$oci_lib_found" = "yes" -a \ - -n "$oracle_version_req"; then - - if test -f "$oracle_include_dir/oci.h"; then - ACTIVE_INCLUDE_DIR="$oracle_include_dir" - fi - - oracle_version_major=$(sed -n '/^#define OCI_MAJOR_VERSION.*$/{s/\([^0-9]*\)\([0-9]*\).*/\2/;P;}' \ - $ACTIVE_INCLUDE_DIR/oci.h) - oracle_version_minor=$(sed -n '/^#define OCI_MINOR_VERSION.*$/{s/\([^0-9]*\)\([0-9]*\).*/\2/;P;}' \ - $ACTIVE_INCLUDE_DIR/oci.h) - - AC_MSG_CHECKING([if Oracle OCI version is >= $oracle_version_req ]) - - if test -n "$oracle_version_major" -a -n $"oracle_version_minor"; then - - ORACLE_OCI_VERSION="$oracle_version_major.$oracle_version_minor" - - dnl Decompose required version string of Oracle - dnl and calculate its number representation - oracle_version_req_major=`expr $oracle_version_req : '\([[0-9]]*\)'` - oracle_version_req_minor=`expr $oracle_version_req : '[[0-9]]*\.\([[0-9]]*\)'` - - oracle_version_req_number=`expr $oracle_version_req_major \* 1000000 \ - \+ $oracle_version_req_minor \* 1000` - - dnl Calculate its number representation - oracle_version_number=`expr $oracle_version_major \* 1000000 \ - \+ $oracle_version_minor \* 1000` - - oracle_version_check=`expr $oracle_version_number \>\= $oracle_version_req_number` - if test "$oracle_version_check" = "1"; then - - oracle_version_checked="yes" - AC_MSG_RESULT([yes]) - - dnl Add -lnnz10 flag to Oracle >= 10.x - AC_MSG_CHECKING([for Oracle version >= 10.x to use -lnnz10 flag]) - oracle_nnz10_check=`expr $oracle_version_number \>\= 10 \* 1000000` - if test "$oracle_nnz10_check" = "1"; then - ORACLE_OCI_LDFLAGS="$ORACLE_OCI_LDFLAGS -lnnz$oracle_version_major" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - else - oracle_version_checked="no" - AC_MSG_RESULT([no]) - AC_MSG_ERROR([Oracle $ORACLE_OCI_VERSION found, but required version is $oracle_version_req]) - fi - else - ORACLE_OCI_VERSION="UNKNOWN" - AC_MSG_RESULT([no]) - AC_MSG_WARN([Oracle version unknown, probably OCI older than 10.2 is available]) - fi - fi - - AC_MSG_CHECKING([if Oracle support is enabled]) - - if test "$oci_header_found" = "yes" -a "$oci_lib_found" = "yes"; then - - AC_SUBST([ORACLE_OCI_VERSION]) - AC_SUBST([ORACLE_OCI_CFLAGS]) - AC_SUBST([ORACLE_OCI_LDFLAGS]) - - HAVE_ORACLE_OCI="yes" - else - HAVE_ORACLE_OCI="no" - fi - - AC_MSG_RESULT([$HAVE_ORACLE_OCI]) -]) diff --git a/m4/ax_prepend_flag.m4 b/m4/ax_prepend_flag.m4 deleted file mode 100644 index adac8c5acbbd..000000000000 --- a/m4/ax_prepend_flag.m4 +++ /dev/null @@ -1,51 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_prepend_flag.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_PREPEND_FLAG(FLAG, [FLAGS-VARIABLE]) -# -# DESCRIPTION -# -# FLAG is added to the front of the FLAGS-VARIABLE shell variable, with a -# space added in between. -# -# If FLAGS-VARIABLE is not specified, the current language's flags (e.g. -# CFLAGS) is used. FLAGS-VARIABLE is not changed if it already contains -# FLAG. If FLAGS-VARIABLE is unset in the shell, it is set to exactly -# FLAG. -# -# NOTE: Implementation based on AX_APPEND_FLAG. -# -# LICENSE -# -# Copyright (c) 2008 Guido U. Draheim -# Copyright (c) 2011 Maarten Bosmans -# Copyright (c) 2018 John Zaitseff -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 2 - -AC_DEFUN([AX_PREPEND_FLAG], -[dnl -AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_SET_IF -AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])]) -AS_VAR_SET_IF(FLAGS,[ - AS_CASE([" AS_VAR_GET(FLAGS) "], - [*" $1 "*], [AC_RUN_LOG([: FLAGS already contains $1])], - [ - FLAGS="$1 $FLAGS" - AC_RUN_LOG([: FLAGS="$FLAGS"]) - ]) - ], - [ - AS_VAR_SET(FLAGS,[$1]) - AC_RUN_LOG([: FLAGS="$FLAGS"]) - ]) -AS_VAR_POPDEF([FLAGS])dnl -])dnl AX_PREPEND_FLAG diff --git a/m4/ax_require_defined.m4 b/m4/ax_require_defined.m4 deleted file mode 100644 index 17c3eab7dafd..000000000000 --- a/m4/ax_require_defined.m4 +++ /dev/null @@ -1,37 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_require_defined.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_REQUIRE_DEFINED(MACRO) -# -# DESCRIPTION -# -# AX_REQUIRE_DEFINED is a simple helper for making sure other macros have -# been defined and thus are available for use. This avoids random issues -# where a macro isn't expanded. Instead the configure script emits a -# non-fatal: -# -# ./configure: line 1673: AX_CFLAGS_WARN_ALL: command not found -# -# It's like AC_REQUIRE except it doesn't expand the required macro. -# -# Here's an example: -# -# AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG]) -# -# LICENSE -# -# Copyright (c) 2014 Mike Frysinger -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 2 - -AC_DEFUN([AX_REQUIRE_DEFINED], [dnl - m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined; is a m4 file missing?])]) -])dnl AX_REQUIRE_DEFINED diff --git a/m4/geos.m4 b/m4/geos.m4 deleted file mode 100644 index 4c73fe27dbe3..000000000000 --- a/m4/geos.m4 +++ /dev/null @@ -1,167 +0,0 @@ -dnl *************************************************************************** -dnl $Id$ -dnl -dnl Project: GDAL -dnl Purpose: Test for GEOS library presence -dnl Author: Andrey Kiselev, dron@ak4719.spb.edu -dnl Ideas borrowed from the old GDAL test and from the macro -dnl supplied with GEOS package. -dnl -dnl *************************************************************************** -dnl Copyright (c) 2006, Andrey Kiselev -dnl -dnl Permission is hereby granted, free of charge, to any person obtaining a -dnl copy of this software and associated documentation files (the "Software"), -dnl to deal in the Software without restriction, including without limitation -dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, -dnl and/or sell copies of the Software, and to permit persons to whom the -dnl Software is furnished to do so, subject to the following conditions: -dnl -dnl The above copyright notice and this permission notice shall be included -dnl in all copies or substantial portions of the Software. -dnl -dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -dnl DEALINGS IN THE SOFTWARE. -dnl *************************************************************************** - -dnl -dnl GEOS_INIT (MINIMUM_VERSION) -dnl -dnl Test for GEOS: define HAVE_GEOS, GEOS_LIBS, GEOS_CFLAGS, GEOS_VERSION -dnl -dnl Call as GEOS_INIT or GEOS_INIT(minimum version) in configure.ac. Test -dnl HAVE_GEOS (yes|no) afterwards. If yes, all other vars above can be -dnl used in program. -dnl - -AC_DEFUN([GEOS_INIT],[ - AC_SUBST(GEOS_LIBS) - AC_SUBST(GEOS_CFLAGS) - AC_SUBST(HAVE_GEOS) - AC_SUBST(GEOS_VERSION) - - AC_ARG_WITH(geos, - AS_HELP_STRING([--with-geos[=ARG]], - [Include GEOS support (ARG=yes, no or geos-config path)]),,) - - ac_geos_config_auto=no - - if test x"$with_geos" = x"no" ; then - - AC_MSG_RESULT([GEOS support disabled]) - GEOS_CONFIG=no - HAVE_GEOS=no - - elif test x"$with_geos" = x"yes" -o x"$with_geos" = x"" ; then - - AC_PATH_PROG(GEOS_CONFIG, geos-config, no) - if test x"$with_geos" = x"" ; then - ac_geos_config_auto=yes - fi - - else - - ac_geos_config=`basename "$with_geos"` - ac_geos_config_dir=`AS_DIRNAME(["$with_geos"])` - - AC_CHECK_PROG( - GEOS_CONFIG, - "$ac_geos_config", - $with_geos, - [no], - ["$ac_geos_config_dir"], - [] - ) - - fi - - if test x"$GEOS_CONFIG" != x"no" ; then - - min_geos_version=ifelse([$1], ,1.0.0,$1) - - AC_MSG_CHECKING(for GEOS version >= $min_geos_version) - - geos_major_version=`$GEOS_CONFIG --version | \ - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` - geos_minor_version=`$GEOS_CONFIG --version | \ - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'` - geos_micro_version=`$GEOS_CONFIG --version | \ - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'` - - req_major=`echo $min_geos_version | \ - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` - req_minor=`echo $min_geos_version | \ - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'` - req_micro=`echo $min_geos_version | \ - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'` - - version_ok="no" - ac_req_version=`expr $req_major \* 100000 \+ $req_minor \* 100 \+ $req_micro` - ac_geos_version=`expr $geos_major_version \* 100000 \+ $geos_minor_version \* 100 \+ $geos_micro_version` - - if test $ac_req_version -le $ac_geos_version; then - version_ok="yes" - AC_MSG_RESULT([yes]) - fi - - if test $version_ok = "no"; then - - HAVE_GEOS="no" - AC_MSG_RESULT(no) - - if test $ac_geos_config_auto = "yes" ; then - AC_MSG_WARN([GEOS was found on your system, but geos-config reports version ${geos_major_version}.${geos_minor_version}.${geos_micro_version}, need at least $min_geos_version. GEOS support disabled.]) - else - AC_MSG_ERROR([geos-config reports version ${geos_major_version}.${geos_minor_version}.${geos_micro_version}, need at least $min_geos_version or configure --without-geos]) - fi - - else - - HAVE_GEOS="no" - - GEOS_LIBS="`${GEOS_CONFIG} --ldflags` -lgeos_c" - GEOS_CFLAGS="`${GEOS_CONFIG} --cflags`" - GEOS_VERSION="`${GEOS_CONFIG} --version`" - - ax_save_LIBS="${LIBS}" - LIBS=${GEOS_LIBS} - ax_save_CFLAGS="${CFLAGS}" - CFLAGS="${GEOS_CFLAGS} ${CFLAGS}" - - AC_CHECK_LIB([geos_c], - [GEOSversion], - [HAVE_GEOS="yes"], - [HAVE_GEOS="no"], - [] - ) - - if test x"$HAVE_GEOS" = "xno"; then - if test $ac_geos_config_auto = "yes" ; then - AC_MSG_WARN([GEOS was found on your system, but the library could not be linked. GEOS support disabled.]) - else - AC_MSG_ERROR([GEOS library could not be linked]) - fi - - GEOS_CFLAGS="" - - fi - - CFLAGS="${ax_save_CFLAGS}" - LIBS="${ax_save_LIBS}" - - fi - - else - - if test x"$with_geos" != x"no" -a x"$with_geos" != x ; then - AC_MSG_ERROR([GEOS support explicitly enabled, but geos-config could not be found]) - fi - - fi -]) - diff --git a/m4/iconv.m4 b/m4/iconv.m4 deleted file mode 100644 index d9c00ac2dc90..000000000000 --- a/m4/iconv.m4 +++ /dev/null @@ -1,273 +0,0 @@ -dnl *************************************************************************** -dnl $Id$ -dnl -dnl *************************************************************************** - -# iconv.m4 serial 17 (gettext-0.18.2) -dnl Copyright (C) 2000-2002, 2007-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], -[ - dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. - AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) - AC_REQUIRE([AC_LIB_RPATH]) - - dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV - dnl accordingly. - AC_LIB_LINKFLAGS_BODY([iconv]) -]) - -AC_DEFUN([AM_ICONV_LINK], -[ - dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and - dnl those with the standalone portable GNU libiconv installed). - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - - dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV - dnl accordingly. - AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) - - dnl Add $INCICONV to CPPFLAGS before performing the following checks, - dnl because if the user has installed libiconv and not disabled its use - dnl via --without-libiconv-prefix, he wants to use it. The first - dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed. - am_save_CPPFLAGS="$CPPFLAGS" - AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) - - AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [ - am_cv_func_iconv="no, consider installing GNU libiconv" - am_cv_lib_iconv=no - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[ -#include -#include - ]], - [[iconv_t cd = iconv_open("",""); - iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd);]])], - [am_cv_func_iconv=yes]) - if test "$am_cv_func_iconv" != yes; then - am_save_LIBS="$LIBS" - LIBS="$LIBS $LIBICONV" - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[ -#include -#include - ]], - [[iconv_t cd = iconv_open("",""); - iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd);]])], - [am_cv_lib_iconv=yes] - [am_cv_func_iconv=yes]) - LIBS="$am_save_LIBS" - fi - ]) - if test "$am_cv_func_iconv" = yes; then - AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ - dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11, - dnl Solaris 10. - am_save_LIBS="$LIBS" - if test $am_cv_lib_iconv = yes; then - LIBS="$LIBS $LIBICONV" - fi - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -int main () -{ - int result = 0; - /* Test against AIX 5.1 bug: Failures are not distinguishable from successful - returns. */ - { - iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); - if (cd_utf8_to_88591 != (iconv_t)(-1)) - { - static const char input[] = "\342\202\254"; /* EURO SIGN */ - char buf[10]; - const char *inptr = input; - size_t inbytesleft = strlen (input); - char *outptr = buf; - size_t outbytesleft = sizeof (buf); - size_t res = iconv (cd_utf8_to_88591, - (char **) &inptr, &inbytesleft, - &outptr, &outbytesleft); - if (res == 0) - result |= 1; - iconv_close (cd_utf8_to_88591); - } - } - /* Test against Solaris 10 bug: Failures are not distinguishable from - successful returns. */ - { - iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); - if (cd_ascii_to_88591 != (iconv_t)(-1)) - { - static const char input[] = "\263"; - char buf[10]; - const char *inptr = input; - size_t inbytesleft = strlen (input); - char *outptr = buf; - size_t outbytesleft = sizeof (buf); - size_t res = iconv (cd_ascii_to_88591, - (char **) &inptr, &inbytesleft, - &outptr, &outbytesleft); - if (res == 0) - result |= 2; - iconv_close (cd_ascii_to_88591); - } - } - /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ - { - iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); - if (cd_88591_to_utf8 != (iconv_t)(-1)) - { - static const char input[] = "\304"; - static char buf[2] = { (char)0xDE, (char)0xAD }; - const char *inptr = input; - size_t inbytesleft = 1; - char *outptr = buf; - size_t outbytesleft = 1; - size_t res = iconv (cd_88591_to_utf8, - (char **) &inptr, &inbytesleft, - &outptr, &outbytesleft); - if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) - result |= 4; - iconv_close (cd_88591_to_utf8); - } - } -#if 0 /* This bug could be worked around by the caller. */ - /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ - { - iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); - if (cd_88591_to_utf8 != (iconv_t)(-1)) - { - static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; - char buf[50]; - const char *inptr = input; - size_t inbytesleft = strlen (input); - char *outptr = buf; - size_t outbytesleft = sizeof (buf); - size_t res = iconv (cd_88591_to_utf8, - (char **) &inptr, &inbytesleft, - &outptr, &outbytesleft); - if ((int)res > 0) - result |= 8; - iconv_close (cd_88591_to_utf8); - } - } -#endif - /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is - provided. */ - if (/* Try standardized names. */ - iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) - /* Try IRIX, OSF/1 names. */ - && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) - /* Try AIX names. */ - && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) - /* Try HP-UX names. */ - && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) - result |= 16; - return result; -}]])], - [am_cv_func_iconv_works=yes], - [am_cv_func_iconv_works=no], - [ -changequote(,)dnl - case "$host_os" in - aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; - *) am_cv_func_iconv_works="guessing yes" ;; - esac -changequote([,])dnl - ]) - LIBS="$am_save_LIBS" - ]) - case "$am_cv_func_iconv_works" in - *no) am_func_iconv=no am_cv_lib_iconv=no ;; - *) am_func_iconv=yes ;; - esac - else - am_func_iconv=no am_cv_lib_iconv=no - fi - if test "$am_func_iconv" = yes; then - AC_DEFINE([HAVE_ICONV], [1], - [Define if you have the iconv() function and it works.]) - fi - if test "$am_cv_lib_iconv" = yes; then - AC_MSG_CHECKING([how to link with libiconv]) - AC_MSG_RESULT([$LIBICONV]) - else - dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV - dnl either. - CPPFLAGS="$am_save_CPPFLAGS" - LIBICONV= - LTLIBICONV= - fi - AC_SUBST([LIBICONV]) - AC_SUBST([LTLIBICONV]) -]) - -dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to -dnl avoid warnings like -dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". -dnl This is tricky because of the way 'aclocal' is implemented: -dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. -dnl Otherwise aclocal's initial scan pass would miss the macro definition. -dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. -dnl Otherwise aclocal would emit many "Use of uninitialized value $1" -dnl warnings. -m4_define([gl_iconv_AC_DEFUN], - m4_version_prereq([2.64], - [[AC_DEFUN_ONCE( - [$1], [$2])]], - [m4_ifdef([gl_00GNULIB], - [[AC_DEFUN_ONCE( - [$1], [$2])]], - [[AC_DEFUN( - [$1], [$2])]])])) -gl_iconv_AC_DEFUN([AM_ICONV], -[ - AM_ICONV_LINK - if test "$am_cv_func_iconv" = yes; then - AC_MSG_CHECKING([for iconv declaration]) - AC_CACHE_VAL([am_cv_proto_iconv], [ - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[ -#include -#include -extern -#ifdef __cplusplus -"C" -#endif -#if defined(__STDC__) || defined(__cplusplus) -size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); -#else -size_t iconv(); -#endif - ]], - [[]])], - [am_cv_proto_iconv_arg1=""], - [am_cv_proto_iconv_arg1="const"]) - am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) - am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` - AC_MSG_RESULT([ - $am_cv_proto_iconv]) - AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], - [Define as const if the declaration of iconv() needs const.]) - dnl Also substitute ICONV_CONST in the gnulib generated . - m4_ifdef([gl_ICONV_H_DEFAULTS], - [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) - if test -n "$am_cv_proto_iconv_arg1"; then - ICONV_CONST="const" - fi - ]) - fi -]) diff --git a/m4/lib-ld.m4 b/m4/lib-ld.m4 deleted file mode 100644 index 96c4e2c3396c..000000000000 --- a/m4/lib-ld.m4 +++ /dev/null @@ -1,110 +0,0 @@ -# lib-ld.m4 serial 3 (gettext-0.13) -dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl Subroutines of libtool.m4, -dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision -dnl with libtool.m4. - -dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. -AC_DEFUN([AC_LIB_PROG_LD_GNU], -[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, -[# I'd rather use --version here, but apparently some GNU ld's only accept -v. -case `$LD -v 2>&1 conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by GCC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]* | [A-Za-z]:[\\/]*)] - [re_direlt='/[^/][^/]*/\.\./'] - # Canonicalize the path of ld - ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(acl_cv_path_LD, -[if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - acl_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in - *GNU* | *'with BFD'*) - test "$with_gnu_ld" != no && break ;; - *) - test "$with_gnu_ld" != yes && break ;; - esac - fi - done - IFS="$ac_save_ifs" -else - acl_cv_path_LD="$LD" # Let the user override the test with a path. -fi]) -LD="$acl_cv_path_LD" -if test -n "$LD"; then - AC_MSG_RESULT($LD) -else - AC_MSG_RESULT(no) -fi -test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) -AC_LIB_PROG_LD_GNU -]) diff --git a/m4/lib-link.m4 b/m4/lib-link.m4 deleted file mode 100644 index 9bdaffa9f2cb..000000000000 --- a/m4/lib-link.m4 +++ /dev/null @@ -1,709 +0,0 @@ -# lib-link.m4 serial 13 (gettext-0.17) -dnl Copyright (C) 2001-2007 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -AC_PREREQ(2.54) - -dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and -dnl the libraries corresponding to explicit and implicit dependencies. -dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and -dnl augments the CPPFLAGS variable. -dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname -dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. -AC_DEFUN([AC_LIB_LINKFLAGS], -[ - AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) - AC_REQUIRE([AC_LIB_RPATH]) - define([Name],[translit([$1],[./-], [___])]) - define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) - AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ - AC_LIB_LINKFLAGS_BODY([$1], [$2]) - ac_cv_lib[]Name[]_libs="$LIB[]NAME" - ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" - ac_cv_lib[]Name[]_cppflags="$INC[]NAME" - ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" - ]) - LIB[]NAME="$ac_cv_lib[]Name[]_libs" - LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" - INC[]NAME="$ac_cv_lib[]Name[]_cppflags" - LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" - AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) - AC_SUBST([LIB]NAME) - AC_SUBST([LTLIB]NAME) - AC_SUBST([LIB]NAME[_PREFIX]) - dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the - dnl results of this search when this library appears as a dependency. - HAVE_LIB[]NAME=yes - undefine([Name]) - undefine([NAME]) -]) - -dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) -dnl searches for libname and the libraries corresponding to explicit and -dnl implicit dependencies, together with the specified include files and -dnl the ability to compile and link the specified testcode. If found, it -dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and -dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and -dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs -dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. -dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname -dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. -AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], -[ - AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) - AC_REQUIRE([AC_LIB_RPATH]) - define([Name],[translit([$1],[./-], [___])]) - define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) - - dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME - dnl accordingly. - AC_LIB_LINKFLAGS_BODY([$1], [$2]) - - dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, - dnl because if the user has installed lib[]Name and not disabled its use - dnl via --without-lib[]Name-prefix, he wants to use it. - ac_save_CPPFLAGS="$CPPFLAGS" - AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) - - AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ - ac_save_LIBS="$LIBS" - LIBS="$LIBS $LIB[]NAME" - AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) - LIBS="$ac_save_LIBS" - ]) - if test "$ac_cv_lib[]Name" = yes; then - HAVE_LIB[]NAME=yes - AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) - AC_MSG_CHECKING([how to link with lib[]$1]) - AC_MSG_RESULT([$LIB[]NAME]) - else - HAVE_LIB[]NAME=no - dnl If $LIB[]NAME didn't lead to a usable library, we don't need - dnl $INC[]NAME either. - CPPFLAGS="$ac_save_CPPFLAGS" - LIB[]NAME= - LTLIB[]NAME= - LIB[]NAME[]_PREFIX= - fi - AC_SUBST([HAVE_LIB]NAME) - AC_SUBST([LIB]NAME) - AC_SUBST([LTLIB]NAME) - AC_SUBST([LIB]NAME[_PREFIX]) - undefine([Name]) - undefine([NAME]) -]) - -dnl Determine the platform dependent parameters needed to use rpath: -dnl acl_libext, -dnl acl_shlibext, -dnl acl_hardcode_libdir_flag_spec, -dnl acl_hardcode_libdir_separator, -dnl acl_hardcode_direct, -dnl acl_hardcode_minus_L. -AC_DEFUN([AC_LIB_RPATH], -[ - dnl Tell automake >= 1.10 to complain if config.rpath is missing. - m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) - AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS - AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld - AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host - AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir - AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ - CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ - ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh - . ./conftest.sh - rm -f ./conftest.sh - acl_cv_rpath=done - ]) - wl="$acl_cv_wl" - acl_libext="$acl_cv_libext" - acl_shlibext="$acl_cv_shlibext" - acl_libname_spec="$acl_cv_libname_spec" - acl_library_names_spec="$acl_cv_library_names_spec" - acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" - acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" - acl_hardcode_direct="$acl_cv_hardcode_direct" - acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" - dnl Determine whether the user wants rpath handling at all. - AC_ARG_ENABLE(rpath, - [ --disable-rpath do not hardcode runtime library paths], - :, enable_rpath=yes) -]) - -dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and -dnl the libraries corresponding to explicit and implicit dependencies. -dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. -dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found -dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. -AC_DEFUN([AC_LIB_LINKFLAGS_BODY], -[ - AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) - define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) - dnl Autoconf >= 2.61 supports dots in --with options. - define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])]) - dnl By default, look in $includedir and $libdir. - use_additional=yes - AC_LIB_WITH_FINAL_PREFIX([ - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - ]) - AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix], -[ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib - --without-lib]N_A_M_E[-prefix don't search for lib$1 in includedir and libdir], -[ - if test "X$withval" = "Xno"; then - use_additional=no - else - if test "X$withval" = "X"; then - AC_LIB_WITH_FINAL_PREFIX([ - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - ]) - else - additional_includedir="$withval/include" - additional_libdir="$withval/$acl_libdirstem" - fi - fi -]) - dnl Search the library and its dependencies in $additional_libdir and - dnl $LDFLAGS. Using breadth-first-search. - LIB[]NAME= - LTLIB[]NAME= - INC[]NAME= - LIB[]NAME[]_PREFIX= - rpathdirs= - ltrpathdirs= - names_already_handled= - names_next_round='$1 $2' - while test -n "$names_next_round"; do - names_this_round="$names_next_round" - names_next_round= - for name in $names_this_round; do - already_handled= - for n in $names_already_handled; do - if test "$n" = "$name"; then - already_handled=yes - break - fi - done - if test -z "$already_handled"; then - names_already_handled="$names_already_handled $name" - dnl See if it was already located by an earlier AC_LIB_LINKFLAGS - dnl or AC_LIB_HAVE_LINKFLAGS call. - uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` - eval value=\"\$HAVE_LIB$uppername\" - if test -n "$value"; then - if test "$value" = yes; then - eval value=\"\$LIB$uppername\" - test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" - eval value=\"\$LTLIB$uppername\" - test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" - else - dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined - dnl that this library doesn't exist. So just drop it. - : - fi - else - dnl Search the library lib$name in $additional_libdir and $LDFLAGS - dnl and the already constructed $LIBNAME/$LTLIBNAME. - found_dir= - found_la= - found_so= - found_a= - eval libname=\"$acl_libname_spec\" # typically: libname=lib$name - if test -n "$acl_shlibext"; then - shrext=".$acl_shlibext" # typically: shrext=.so - else - shrext= - fi - if test $use_additional = yes; then - dir="$additional_libdir" - dnl The same code as in the loop below: - dnl First look for a shared library. - if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then - found_dir="$dir" - found_so="$dir/$libname$shrext" - else - if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then - ver=`(cd "$dir" && \ - for f in "$libname$shrext".*; do echo "$f"; done \ - | sed -e "s,^$libname$shrext\\\\.,," \ - | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ - | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then - found_dir="$dir" - found_so="$dir/$libname$shrext.$ver" - fi - else - eval library_names=\"$acl_library_names_spec\" - for f in $library_names; do - if test -f "$dir/$f"; then - found_dir="$dir" - found_so="$dir/$f" - break - fi - done - fi - fi - fi - dnl Then look for a static library. - if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then - found_dir="$dir" - found_a="$dir/$libname.$acl_libext" - fi - fi - if test "X$found_dir" != "X"; then - if test -f "$dir/$libname.la"; then - found_la="$dir/$libname.la" - fi - fi - fi - if test "X$found_dir" = "X"; then - for x in $LDFLAGS $LTLIB[]NAME; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - case "$x" in - -L*) - dir=`echo "X$x" | sed -e 's/^X-L//'` - dnl First look for a shared library. - if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then - found_dir="$dir" - found_so="$dir/$libname$shrext" - else - if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then - ver=`(cd "$dir" && \ - for f in "$libname$shrext".*; do echo "$f"; done \ - | sed -e "s,^$libname$shrext\\\\.,," \ - | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ - | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then - found_dir="$dir" - found_so="$dir/$libname$shrext.$ver" - fi - else - eval library_names=\"$acl_library_names_spec\" - for f in $library_names; do - if test -f "$dir/$f"; then - found_dir="$dir" - found_so="$dir/$f" - break - fi - done - fi - fi - fi - dnl Then look for a static library. - if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then - found_dir="$dir" - found_a="$dir/$libname.$acl_libext" - fi - fi - if test "X$found_dir" != "X"; then - if test -f "$dir/$libname.la"; then - found_la="$dir/$libname.la" - fi - fi - ;; - esac - if test "X$found_dir" != "X"; then - break - fi - done - fi - if test "X$found_dir" != "X"; then - dnl Found the library. - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" - if test "X$found_so" != "X"; then - dnl Linking with a shared library. We attempt to hardcode its - dnl directory into the executable's runpath, unless it's the - dnl standard /usr/lib. - if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then - dnl No hardcoding is needed. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" - else - dnl Use an explicit option to hardcode DIR into the resulting - dnl binary. - dnl Potentially add DIR to ltrpathdirs. - dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. - haveit= - for x in $ltrpathdirs; do - if test "X$x" = "X$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - ltrpathdirs="$ltrpathdirs $found_dir" - fi - dnl The hardcoding into $LIBNAME is system dependent. - if test "$acl_hardcode_direct" = yes; then - dnl Using DIR/libNAME.so during linking hardcodes DIR into the - dnl resulting binary. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" - else - if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then - dnl Use an explicit option to hardcode DIR into the resulting - dnl binary. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" - dnl Potentially add DIR to rpathdirs. - dnl The rpathdirs will be appended to $LIBNAME at the end. - haveit= - for x in $rpathdirs; do - if test "X$x" = "X$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - rpathdirs="$rpathdirs $found_dir" - fi - else - dnl Rely on "-L$found_dir". - dnl But don't add it if it's already contained in the LDFLAGS - dnl or the already constructed $LIBNAME - haveit= - for x in $LDFLAGS $LIB[]NAME; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-L$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" - fi - if test "$acl_hardcode_minus_L" != no; then - dnl FIXME: Not sure whether we should use - dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" - dnl here. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" - else - dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH - dnl here, because this doesn't fit in flags passed to the - dnl compiler. So give up. No hardcoding. This affects only - dnl very old systems. - dnl FIXME: Not sure whether we should use - dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" - dnl here. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" - fi - fi - fi - fi - else - if test "X$found_a" != "X"; then - dnl Linking with a static library. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" - else - dnl We shouldn't come here, but anyway it's good to have a - dnl fallback. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" - fi - fi - dnl Assume the include files are nearby. - additional_includedir= - case "$found_dir" in - */$acl_libdirstem | */$acl_libdirstem/) - basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` - LIB[]NAME[]_PREFIX="$basedir" - additional_includedir="$basedir/include" - ;; - esac - if test "X$additional_includedir" != "X"; then - dnl Potentially add $additional_includedir to $INCNAME. - dnl But don't add it - dnl 1. if it's the standard /usr/include, - dnl 2. if it's /usr/local/include and we are using GCC on Linux, - dnl 3. if it's already present in $CPPFLAGS or the already - dnl constructed $INCNAME, - dnl 4. if it doesn't exist as a directory. - if test "X$additional_includedir" != "X/usr/include"; then - haveit= - if test "X$additional_includedir" = "X/usr/local/include"; then - if test -n "$GCC"; then - case $host_os in - linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - for x in $CPPFLAGS $INC[]NAME; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-I$additional_includedir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_includedir"; then - dnl Really add $additional_includedir to $INCNAME. - INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" - fi - fi - fi - fi - fi - dnl Look for dependencies. - if test -n "$found_la"; then - dnl Read the .la file. It defines the variables - dnl dlname, library_names, old_library, dependency_libs, current, - dnl age, revision, installed, dlopen, dlpreopen, libdir. - save_libdir="$libdir" - case "$found_la" in - */* | *\\*) . "$found_la" ;; - *) . "./$found_la" ;; - esac - libdir="$save_libdir" - dnl We use only dependency_libs. - for dep in $dependency_libs; do - case "$dep" in - -L*) - additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` - dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. - dnl But don't add it - dnl 1. if it's the standard /usr/lib, - dnl 2. if it's /usr/local/lib and we are using GCC on Linux, - dnl 3. if it's already present in $LDFLAGS or the already - dnl constructed $LIBNAME, - dnl 4. if it doesn't exist as a directory. - if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then - haveit= - if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then - if test -n "$GCC"; then - case $host_os in - linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - haveit= - for x in $LDFLAGS $LIB[]NAME; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - dnl Really add $additional_libdir to $LIBNAME. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" - fi - fi - haveit= - for x in $LDFLAGS $LTLIB[]NAME; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - dnl Really add $additional_libdir to $LTLIBNAME. - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" - fi - fi - fi - fi - ;; - -R*) - dir=`echo "X$dep" | sed -e 's/^X-R//'` - if test "$enable_rpath" != no; then - dnl Potentially add DIR to rpathdirs. - dnl The rpathdirs will be appended to $LIBNAME at the end. - haveit= - for x in $rpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - rpathdirs="$rpathdirs $dir" - fi - dnl Potentially add DIR to ltrpathdirs. - dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. - haveit= - for x in $ltrpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - ltrpathdirs="$ltrpathdirs $dir" - fi - fi - ;; - -l*) - dnl Handle this in the next round. - names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` - ;; - *.la) - dnl Handle this in the next round. Throw away the .la's - dnl directory; it is already contained in a preceding -L - dnl option. - names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` - ;; - *) - dnl Most likely an immediate library name. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" - ;; - esac - done - fi - else - dnl Didn't find the library; assume it is in the system directories - dnl known to the linker and runtime loader. (All the system - dnl directories known to the linker should also be known to the - dnl runtime loader, otherwise the system is severely misconfigured.) - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" - fi - fi - fi - done - done - if test "X$rpathdirs" != "X"; then - if test -n "$acl_hardcode_libdir_separator"; then - dnl Weird platform: only the last -rpath option counts, the user must - dnl pass all path elements in one option. We can arrange that for a - dnl single library, but not when more than one $LIBNAMEs are used. - alldirs= - for found_dir in $rpathdirs; do - alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" - done - dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. - acl_save_libdir="$libdir" - libdir="$alldirs" - eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" - else - dnl The -rpath options are cumulative. - for found_dir in $rpathdirs; do - acl_save_libdir="$libdir" - libdir="$found_dir" - eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" - done - fi - fi - if test "X$ltrpathdirs" != "X"; then - dnl When using libtool, the option that works for both libraries and - dnl executables is -R. The -R options are cumulative. - for found_dir in $ltrpathdirs; do - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" - done - fi -]) - -dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, -dnl unless already present in VAR. -dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes -dnl contains two or three consecutive elements that belong together. -AC_DEFUN([AC_LIB_APPENDTOVAR], -[ - for element in [$2]; do - haveit= - for x in $[$1]; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X$element"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - [$1]="${[$1]}${[$1]:+ }$element" - fi - done -]) - -dnl For those cases where a variable contains several -L and -l options -dnl referring to unknown libraries and directories, this macro determines the -dnl necessary additional linker options for the runtime path. -dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) -dnl sets LDADDVAR to linker options needed together with LIBSVALUE. -dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, -dnl otherwise linking without libtool is assumed. -AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], -[ - AC_REQUIRE([AC_LIB_RPATH]) - AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) - $1= - if test "$enable_rpath" != no; then - if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then - dnl Use an explicit option to hardcode directories into the resulting - dnl binary. - rpathdirs= - next= - for opt in $2; do - if test -n "$next"; then - dir="$next" - dnl No need to hardcode the standard /usr/lib. - if test "X$dir" != "X/usr/$acl_libdirstem"; then - rpathdirs="$rpathdirs $dir" - fi - next= - else - case $opt in - -L) next=yes ;; - -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` - dnl No need to hardcode the standard /usr/lib. - if test "X$dir" != "X/usr/$acl_libdirstem"; then - rpathdirs="$rpathdirs $dir" - fi - next= ;; - *) next= ;; - esac - fi - done - if test "X$rpathdirs" != "X"; then - if test -n ""$3""; then - dnl libtool is used for linking. Use -R options. - for dir in $rpathdirs; do - $1="${$1}${$1:+ }-R$dir" - done - else - dnl The linker is used for linking directly. - if test -n "$acl_hardcode_libdir_separator"; then - dnl Weird platform: only the last -rpath option counts, the user - dnl must pass all path elements in one option. - alldirs= - for dir in $rpathdirs; do - alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" - done - acl_save_libdir="$libdir" - libdir="$alldirs" - eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - $1="$flag" - else - dnl The -rpath options are cumulative. - for dir in $rpathdirs; do - acl_save_libdir="$libdir" - libdir="$dir" - eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - $1="${$1}${$1:+ }$flag" - done - fi - fi - fi - fi - fi - AC_SUBST([$1]) -]) diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4 deleted file mode 100644 index 3124857f627f..000000000000 --- a/m4/lib-prefix.m4 +++ /dev/null @@ -1,185 +0,0 @@ -# lib-prefix.m4 serial 5 (gettext-0.15) -dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and -dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't -dnl require excessive bracketing. -ifdef([AS_HELP_STRING], -[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], -[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) - -dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed -dnl to access previously installed libraries. The basic assumption is that -dnl a user will want packages to use other packages he previously installed -dnl with the same --prefix option. -dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate -dnl libraries, but is otherwise very convenient. -AC_DEFUN([AC_LIB_PREFIX], -[ - AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) - AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) - dnl By default, look in $includedir and $libdir. - use_additional=yes - AC_LIB_WITH_FINAL_PREFIX([ - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - ]) - AC_LIB_ARG_WITH([lib-prefix], -[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib - --without-lib-prefix don't search for libraries in includedir and libdir], -[ - if test "X$withval" = "Xno"; then - use_additional=no - else - if test "X$withval" = "X"; then - AC_LIB_WITH_FINAL_PREFIX([ - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - ]) - else - additional_includedir="$withval/include" - additional_libdir="$withval/$acl_libdirstem" - fi - fi -]) - if test $use_additional = yes; then - dnl Potentially add $additional_includedir to $CPPFLAGS. - dnl But don't add it - dnl 1. if it's the standard /usr/include, - dnl 2. if it's already present in $CPPFLAGS, - dnl 3. if it's /usr/local/include and we are using GCC on Linux, - dnl 4. if it doesn't exist as a directory. - if test "X$additional_includedir" != "X/usr/include"; then - haveit= - for x in $CPPFLAGS; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-I$additional_includedir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test "X$additional_includedir" = "X/usr/local/include"; then - if test -n "$GCC"; then - case $host_os in - linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - if test -d "$additional_includedir"; then - dnl Really add $additional_includedir to $CPPFLAGS. - CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" - fi - fi - fi - fi - dnl Potentially add $additional_libdir to $LDFLAGS. - dnl But don't add it - dnl 1. if it's the standard /usr/lib, - dnl 2. if it's already present in $LDFLAGS, - dnl 3. if it's /usr/local/lib and we are using GCC on Linux, - dnl 4. if it doesn't exist as a directory. - if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then - haveit= - for x in $LDFLAGS; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then - if test -n "$GCC"; then - case $host_os in - linux*) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - dnl Really add $additional_libdir to $LDFLAGS. - LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" - fi - fi - fi - fi - fi -]) - -dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, -dnl acl_final_exec_prefix, containing the values to which $prefix and -dnl $exec_prefix will expand at the end of the configure script. -AC_DEFUN([AC_LIB_PREPARE_PREFIX], -[ - dnl Unfortunately, prefix and exec_prefix get only finally determined - dnl at the end of configure. - if test "X$prefix" = "XNONE"; then - acl_final_prefix="$ac_default_prefix" - else - acl_final_prefix="$prefix" - fi - if test "X$exec_prefix" = "XNONE"; then - acl_final_exec_prefix='${prefix}' - else - acl_final_exec_prefix="$exec_prefix" - fi - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" - prefix="$acl_save_prefix" -]) - -dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the -dnl variables prefix and exec_prefix bound to the values they will have -dnl at the end of the configure script. -AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], -[ - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - $1 - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" -]) - -dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing -dnl the basename of the libdir, either "lib" or "lib64". -AC_DEFUN([AC_LIB_PREPARE_MULTILIB], -[ - dnl There is no formal standard regarding lib and lib64. The current - dnl practice is that on a system supporting 32-bit and 64-bit instruction - dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit - dnl libraries go under $prefix/lib. We determine the compiler's default - dnl mode by looking at the compiler's library search path. If at least - dnl of its elements ends in /lib64 or points to a directory whose absolute - dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the - dnl default, namely "lib". - acl_libdirstem=lib - searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` - if test -n "$searchpath"; then - acl_save_IFS="${IFS= }"; IFS=":" - for searchdir in $searchpath; do - if test -d "$searchdir"; then - case "$searchdir" in - */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; - *) searchdir=`cd "$searchdir" && pwd` - case "$searchdir" in - */lib64 ) acl_libdirstem=lib64 ;; - esac ;; - esac - fi - done - IFS="$acl_save_IFS" - fi -]) diff --git a/m4/libtool.m4 b/m4/libtool.m4 deleted file mode 100644 index 03b57625d750..000000000000 --- a/m4/libtool.m4 +++ /dev/null @@ -1,8388 +0,0 @@ -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# -# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -m4_define([_LT_COPYING], [dnl -# Copyright (C) 2014 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of of the License, or -# (at your option) any later version. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program or library that is built -# using GNU Libtool, you may include this file under the same -# distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -]) - -# serial 58 LT_INIT - - -# LT_PREREQ(VERSION) -# ------------------ -# Complain and exit if this libtool version is less that VERSION. -m4_defun([LT_PREREQ], -[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, - [m4_default([$3], - [m4_fatal([Libtool version $1 or higher is required], - 63)])], - [$2])]) - - -# _LT_CHECK_BUILDDIR -# ------------------ -# Complain if the absolute build directory name contains unusual characters -m4_defun([_LT_CHECK_BUILDDIR], -[case `pwd` in - *\ * | *\ *) - AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; -esac -]) - - -# LT_INIT([OPTIONS]) -# ------------------ -AC_DEFUN([LT_INIT], -[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK -AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -AC_BEFORE([$0], [LT_LANG])dnl -AC_BEFORE([$0], [LT_OUTPUT])dnl -AC_BEFORE([$0], [LTDL_INIT])dnl -m4_require([_LT_CHECK_BUILDDIR])dnl - -dnl Autoconf doesn't catch unexpanded LT_ macros by default: -m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl -m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl -dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 -dnl unless we require an AC_DEFUNed macro: -AC_REQUIRE([LTOPTIONS_VERSION])dnl -AC_REQUIRE([LTSUGAR_VERSION])dnl -AC_REQUIRE([LTVERSION_VERSION])dnl -AC_REQUIRE([LTOBSOLETE_VERSION])dnl -m4_require([_LT_PROG_LTMAIN])dnl - -_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) - -dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS=$ltmain - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -_LT_SETUP - -# Only expand once: -m4_define([LT_INIT]) -])# LT_INIT - -# Old names: -AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) -AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PROG_LIBTOOL], []) -dnl AC_DEFUN([AM_PROG_LIBTOOL], []) - - -# _LT_PREPARE_CC_BASENAME -# ----------------------- -m4_defun([_LT_PREPARE_CC_BASENAME], [ -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -func_cc_basename () -{ - for cc_temp in @S|@*""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac - done - func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -} -])# _LT_PREPARE_CC_BASENAME - - -# _LT_CC_BASENAME(CC) -# ------------------- -# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, -# but that macro is also expanded into generated libtool script, which -# arranges for $SED and $ECHO to be set by different means. -m4_defun([_LT_CC_BASENAME], -[m4_require([_LT_PREPARE_CC_BASENAME])dnl -AC_REQUIRE([_LT_DECL_SED])dnl -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl -func_cc_basename $1 -cc_basename=$func_cc_basename_result -]) - - -# _LT_FILEUTILS_DEFAULTS -# ---------------------- -# It is okay to use these file commands and assume they have been set -# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. -m4_defun([_LT_FILEUTILS_DEFAULTS], -[: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} -])# _LT_FILEUTILS_DEFAULTS - - -# _LT_SETUP -# --------- -m4_defun([_LT_SETUP], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl - -_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl -dnl -_LT_DECL([], [host_alias], [0], [The host system])dnl -_LT_DECL([], [host], [0])dnl -_LT_DECL([], [host_os], [0])dnl -dnl -_LT_DECL([], [build_alias], [0], [The build system])dnl -_LT_DECL([], [build], [0])dnl -_LT_DECL([], [build_os], [0])dnl -dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -test -z "$LN_S" && LN_S="ln -s" -_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl -dnl -AC_REQUIRE([LT_CMD_MAX_LEN])dnl -_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl -_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl -dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl -m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_CHECK_MAGIC_METHOD])dnl -m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl -m4_require([_LT_CMD_OLD_ARCHIVE])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_WITH_SYSROOT])dnl -m4_require([_LT_CMD_TRUNCATE])dnl - -_LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options that allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST -fi -]) -if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST -fi - -_LT_CHECK_OBJDIR - -m4_require([_LT_TAG_COMPILER])dnl - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a '.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld=$lt_cv_prog_gnu_ld - -old_CC=$CC -old_CFLAGS=$CFLAGS - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - _LT_PATH_MAGIC - fi - ;; -esac - -# Use C for the default configuration in the libtool script -LT_SUPPORTED_TAG([CC]) -_LT_LANG_C_CONFIG -_LT_LANG_DEFAULT_CONFIG -_LT_CONFIG_COMMANDS -])# _LT_SETUP - - -# _LT_PREPARE_SED_QUOTE_VARS -# -------------------------- -# Define a few sed substitution that help us do robust quoting. -m4_defun([_LT_PREPARE_SED_QUOTE_VARS], -[# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([["`\\]]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' -]) - -# _LT_PROG_LTMAIN -# --------------- -# Note that this code is called both from 'configure', and 'config.status' -# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# 'config.status' has no value for ac_aux_dir unless we are using Automake, -# so we pass a copy along to make sure it has a sensible value anyway. -m4_defun([_LT_PROG_LTMAIN], -[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl -_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain=$ac_aux_dir/ltmain.sh -])# _LT_PROG_LTMAIN - - -## ------------------------------------- ## -## Accumulate code for creating libtool. ## -## ------------------------------------- ## - -# So that we can recreate a full libtool script including additional -# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the 'libtool' -# label. - - -# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) -# ---------------------------------------- -# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL_INIT], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_INIT], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_INIT]) - - -# _LT_CONFIG_LIBTOOL([COMMANDS]) -# ------------------------------ -# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) - - -# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) -# ----------------------------------------------------- -m4_defun([_LT_CONFIG_SAVE_COMMANDS], -[_LT_CONFIG_LIBTOOL([$1]) -_LT_CONFIG_LIBTOOL_INIT([$2]) -]) - - -# _LT_FORMAT_COMMENT([COMMENT]) -# ----------------------------- -# Add leading comment marks to the start of each line, and a trailing -# full-stop to the whole comment if one is not present already. -m4_define([_LT_FORMAT_COMMENT], -[m4_ifval([$1], [ -m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], - [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) -)]) - - - -## ------------------------ ## -## FIXME: Eliminate VARNAME ## -## ------------------------ ## - - -# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) -# ------------------------------------------------------------------- -# CONFIGNAME is the name given to the value in the libtool script. -# VARNAME is the (base) name used in the configure script. -# VALUE may be 0, 1 or 2 for a computed quote escaped value based on -# VARNAME. Any other value will be used directly. -m4_define([_LT_DECL], -[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], - [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], - [m4_ifval([$1], [$1], [$2])]) - lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) - m4_ifval([$4], - [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) - lt_dict_add_subkey([lt_decl_dict], [$2], - [tagged?], [m4_ifval([$5], [yes], [no])])]) -]) - - -# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) -# -------------------------------------------------------- -m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) - - -# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_tag_varnames], -[_lt_decl_filter([tagged?], [yes], $@)]) - - -# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) -# --------------------------------------------------------- -m4_define([_lt_decl_filter], -[m4_case([$#], - [0], [m4_fatal([$0: too few arguments: $#])], - [1], [m4_fatal([$0: too few arguments: $#: $1])], - [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], - [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], - [lt_dict_filter([lt_decl_dict], $@)])[]dnl -]) - - -# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) -# -------------------------------------------------- -m4_define([lt_decl_quote_varnames], -[_lt_decl_filter([value], [1], $@)]) - - -# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_dquote_varnames], -[_lt_decl_filter([value], [2], $@)]) - - -# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_varnames_tagged], -[m4_assert([$# <= 2])dnl -_$0(m4_quote(m4_default([$1], [[, ]])), - m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), - m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) -m4_define([_lt_decl_varnames_tagged], -[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) - - -# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_all_varnames], -[_$0(m4_quote(m4_default([$1], [[, ]])), - m4_if([$2], [], - m4_quote(lt_decl_varnames), - m4_quote(m4_shift($@))))[]dnl -]) -m4_define([_lt_decl_all_varnames], -[lt_join($@, lt_decl_varnames_tagged([$1], - lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl -]) - - -# _LT_CONFIG_STATUS_DECLARE([VARNAME]) -# ------------------------------------ -# Quote a variable value, and forward it to 'config.status' so that its -# declaration there will have the same value as in 'configure'. VARNAME -# must have a single quote delimited value for this to work. -m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) - - -# _LT_CONFIG_STATUS_DECLARATIONS -# ------------------------------ -# We delimit libtool config variables with single quotes, so when -# we write them to config.status, we have to be sure to quote all -# embedded single quotes properly. In configure, this macro expands -# each variable declared with _LT_DECL (and _LT_TAGDECL) into: -# -# ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' -m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], -[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), - [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAGS -# ---------------- -# Output comment and list of tags supported by the script -m4_defun([_LT_LIBTOOL_TAGS], -[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags='_LT_TAGS'dnl -]) - - -# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) -# ----------------------------------- -# Extract the dictionary values for VARNAME (optionally with TAG) and -# expand to a commented shell variable setting: -# -# # Some comment about what VAR is for. -# visible_name=$lt_internal_name -m4_define([_LT_LIBTOOL_DECLARE], -[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], - [description])))[]dnl -m4_pushdef([_libtool_name], - m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl -m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), - [0], [_libtool_name=[$]$1], - [1], [_libtool_name=$lt_[]$1], - [2], [_libtool_name=$lt_[]$1], - [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl -m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl -]) - - -# _LT_LIBTOOL_CONFIG_VARS -# ----------------------- -# Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' -# script. Tagged libtool config variables (even for the LIBTOOL CONFIG -# section) are produced by _LT_LIBTOOL_TAG_VARS. -m4_defun([_LT_LIBTOOL_CONFIG_VARS], -[m4_foreach([_lt_var], - m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAG_VARS(TAG) -# ------------------------- -m4_define([_LT_LIBTOOL_TAG_VARS], -[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) - - -# _LT_TAGVAR(VARNAME, [TAGNAME]) -# ------------------------------ -m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) - - -# _LT_CONFIG_COMMANDS -# ------------------- -# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of -# variables for single and double quote escaping we saved from calls -# to _LT_DECL, we can put quote escaped variables declarations -# into 'config.status', and then the shell code to quote escape them in -# for loops in 'config.status'. Finally, any additional code accumulated -# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. -m4_defun([_LT_CONFIG_COMMANDS], -[AC_PROVIDE_IFELSE([LT_OUTPUT], - dnl If the libtool generation code has been placed in $CONFIG_LT, - dnl instead of duplicating it all over again into config.status, - dnl then we will have config.status run $CONFIG_LT later, so it - dnl needs to know what name is stored there: - [AC_CONFIG_COMMANDS([libtool], - [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], - dnl If the libtool generation code is destined for config.status, - dnl expand the accumulated commands and init code now: - [AC_CONFIG_COMMANDS([libtool], - [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) -])#_LT_CONFIG_COMMANDS - - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], -[ - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -_LT_CONFIG_STATUS_DECLARATIONS -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$[]1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -_LT_OUTPUT_LIBTOOL_INIT -]) - -# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) -# ------------------------------------ -# Generate a child script FILE with all initialization necessary to -# reuse the environment learned by the parent script, and make the -# file executable. If COMMENT is supplied, it is inserted after the -# '#!' sequence but before initialization text begins. After this -# macro, additional text can be appended to FILE to form the body of -# the child script. The macro ends with non-zero status if the -# file could not be fully written (such as if the disk is full). -m4_ifdef([AS_INIT_GENERATED], -[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], -[m4_defun([_LT_GENERATED_FILE_INIT], -[m4_require([AS_PREPARE])]dnl -[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl -[lt_write_fail=0 -cat >$1 <<_ASEOF || lt_write_fail=1 -#! $SHELL -# Generated by $as_me. -$2 -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$1 <<\_ASEOF || lt_write_fail=1 -AS_SHELL_SANITIZE -_AS_PREPARE -exec AS_MESSAGE_FD>&1 -_ASEOF -test 0 = "$lt_write_fail" && chmod +x $1[]dnl -m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT - -# LT_OUTPUT -# --------- -# This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), incase it is used in configure for compilation -# tests. -AC_DEFUN([LT_OUTPUT], -[: ${CONFIG_LT=./config.lt} -AC_MSG_NOTICE([creating $CONFIG_LT]) -_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], -[# Run this file to recreate a libtool stub with the current configuration.]) - -cat >>"$CONFIG_LT" <<\_LTEOF -lt_cl_silent=false -exec AS_MESSAGE_LOG_FD>>config.log -{ - echo - AS_BOX([Running $as_me.]) -} >&AS_MESSAGE_LOG_FD - -lt_cl_help="\ -'$as_me' creates a local libtool stub from the current configuration, -for use in further configure time tests before the real libtool is -generated. - -Usage: $[0] [[OPTIONS]] - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - -Report bugs to ." - -lt_cl_version="\ -m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl -m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) -configured by $[0], generated by m4_PACKAGE_STRING. - -Copyright (C) 2011 Free Software Foundation, Inc. -This config.lt script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -while test 0 != $[#] -do - case $[1] in - --version | --v* | -V ) - echo "$lt_cl_version"; exit 0 ;; - --help | --h* | -h ) - echo "$lt_cl_help"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --quiet | --q* | --silent | --s* | -q ) - lt_cl_silent=: ;; - - -*) AC_MSG_ERROR([unrecognized option: $[1] -Try '$[0] --help' for more information.]) ;; - - *) AC_MSG_ERROR([unrecognized argument: $[1] -Try '$[0] --help' for more information.]) ;; - esac - shift -done - -if $lt_cl_silent; then - exec AS_MESSAGE_FD>/dev/null -fi -_LTEOF - -cat >>"$CONFIG_LT" <<_LTEOF -_LT_OUTPUT_LIBTOOL_COMMANDS_INIT -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AC_MSG_NOTICE([creating $ofile]) -_LT_OUTPUT_LIBTOOL_COMMANDS -AS_EXIT(0) -_LTEOF -chmod +x "$CONFIG_LT" - -# configure is writing to config.log, but config.lt does its own redirection, -# appending to config.log, which fails on DOS, as config.log is still kept -# open by configure. Here we exec the FD to /dev/null, effectively closing -# config.log, so it can be properly (re)opened and appended to by config.lt. -lt_cl_success=: -test yes = "$silent" && - lt_config_lt_args="$lt_config_lt_args --quiet" -exec AS_MESSAGE_LOG_FD>/dev/null -$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false -exec AS_MESSAGE_LOG_FD>>config.log -$lt_cl_success || AS_EXIT(1) -])# LT_OUTPUT - - -# _LT_CONFIG(TAG) -# --------------- -# If TAG is the built-in tag, create an initial libtool script with a -# default configuration from the untagged config vars. Otherwise add code -# to config.status for appending the configuration named by TAG from the -# matching tagged config vars. -m4_defun([_LT_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_CONFIG_SAVE_COMMANDS([ - m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl - m4_if(_LT_TAG, [C], [ - # See if we are running on zsh, and set the options that allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST - fi - - cfgfile=${ofile}T - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL -# Generated automatically by $as_me ($PACKAGE) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. - -# Provide generalized library-building support services. -# Written by Gordon Matzigkeit, 1996 - -_LT_COPYING -_LT_LIBTOOL_TAGS - -# Configured defaults for sys_lib_dlsearch_path munging. -: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} - -# ### BEGIN LIBTOOL CONFIG -_LT_LIBTOOL_CONFIG_VARS -_LT_LIBTOOL_TAG_VARS -# ### END LIBTOOL CONFIG - -_LT_EOF - - cat <<'_LT_EOF' >> "$cfgfile" - -# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE - -_LT_PREPARE_MUNGE_PATH_LIST -_LT_PREPARE_CC_BASENAME - -# ### END FUNCTIONS SHARED WITH CONFIGURE - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - _LT_PROG_LTMAIN - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -], -[cat <<_LT_EOF >> "$ofile" - -dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded -dnl in a comment (ie after a #). -# ### BEGIN LIBTOOL TAG CONFIG: $1 -_LT_LIBTOOL_TAG_VARS(_LT_TAG) -# ### END LIBTOOL TAG CONFIG: $1 -_LT_EOF -])dnl /m4_if -], -[m4_if([$1], [], [ - PACKAGE='$PACKAGE' - VERSION='$VERSION' - RM='$RM' - ofile='$ofile'], []) -])dnl /_LT_CONFIG_SAVE_COMMANDS -])# _LT_CONFIG - - -# LT_SUPPORTED_TAG(TAG) -# --------------------- -# Trace this macro to discover what tags are supported by the libtool -# --tag option, using: -# autoconf --trace 'LT_SUPPORTED_TAG:$1' -AC_DEFUN([LT_SUPPORTED_TAG], []) - - -# C support is built-in for now -m4_define([_LT_LANG_C_enabled], []) -m4_define([_LT_TAGS], []) - - -# LT_LANG(LANG) -# ------------- -# Enable libtool support for the given language if not already enabled. -AC_DEFUN([LT_LANG], -[AC_BEFORE([$0], [LT_OUTPUT])dnl -m4_case([$1], - [C], [_LT_LANG(C)], - [C++], [_LT_LANG(CXX)], - [Go], [_LT_LANG(GO)], - [Java], [_LT_LANG(GCJ)], - [Fortran 77], [_LT_LANG(F77)], - [Fortran], [_LT_LANG(FC)], - [Windows Resource], [_LT_LANG(RC)], - [m4_ifdef([_LT_LANG_]$1[_CONFIG], - [_LT_LANG($1)], - [m4_fatal([$0: unsupported language: "$1"])])])dnl -])# LT_LANG - - -# _LT_LANG(LANGNAME) -# ------------------ -m4_defun([_LT_LANG], -[m4_ifdef([_LT_LANG_]$1[_enabled], [], - [LT_SUPPORTED_TAG([$1])dnl - m4_append([_LT_TAGS], [$1 ])dnl - m4_define([_LT_LANG_]$1[_enabled], [])dnl - _LT_LANG_$1_CONFIG($1)])dnl -])# _LT_LANG - - -m4_ifndef([AC_PROG_GO], [ -############################################################ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_GO. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -############################################################ -m4_defun([AC_PROG_GO], -[AC_LANG_PUSH(Go)dnl -AC_ARG_VAR([GOC], [Go compiler command])dnl -AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl -_AC_ARG_VAR_LDFLAGS()dnl -AC_CHECK_TOOL(GOC, gccgo) -if test -z "$GOC"; then - if test -n "$ac_tool_prefix"; then - AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) - fi -fi -if test -z "$GOC"; then - AC_CHECK_PROG(GOC, gccgo, gccgo, false) -fi -])#m4_defun -])#m4_ifndef - - -# _LT_LANG_DEFAULT_CONFIG -# ----------------------- -m4_defun([_LT_LANG_DEFAULT_CONFIG], -[AC_PROVIDE_IFELSE([AC_PROG_CXX], - [LT_LANG(CXX)], - [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) - -AC_PROVIDE_IFELSE([AC_PROG_F77], - [LT_LANG(F77)], - [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) - -AC_PROVIDE_IFELSE([AC_PROG_FC], - [LT_LANG(FC)], - [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) - -dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal -dnl pulling things in needlessly. -AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([LT_PROG_GCJ], - [LT_LANG(GCJ)], - [m4_ifdef([AC_PROG_GCJ], - [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([A][M_PROG_GCJ], - [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([LT_PROG_GCJ], - [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) - -AC_PROVIDE_IFELSE([AC_PROG_GO], - [LT_LANG(GO)], - [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) - -AC_PROVIDE_IFELSE([LT_PROG_RC], - [LT_LANG(RC)], - [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) -])# _LT_LANG_DEFAULT_CONFIG - -# Obsolete macros: -AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) -AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) -AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) -AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) -AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_CXX], []) -dnl AC_DEFUN([AC_LIBTOOL_F77], []) -dnl AC_DEFUN([AC_LIBTOOL_FC], []) -dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) -dnl AC_DEFUN([AC_LIBTOOL_RC], []) - - -# _LT_TAG_COMPILER -# ---------------- -m4_defun([_LT_TAG_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl -_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl -_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl -_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_TAG_COMPILER - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -m4_defun([_LT_COMPILER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -m4_defun([_LT_LINKER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* -])# _LT_LINKER_BOILERPLATE - -# _LT_REQUIRED_DARWIN_CHECKS -# ------------------------- -m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ - case $host_os in - rhapsody* | darwin*) - AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) - AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) - AC_CHECK_TOOL([LIPO], [lipo], [:]) - AC_CHECK_TOOL([OTOOL], [otool], [:]) - AC_CHECK_TOOL([OTOOL64], [otool64], [:]) - _LT_DECL([], [DSYMUTIL], [1], - [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) - _LT_DECL([], [NMEDIT], [1], - [Tool to change global to local symbols on Mac OS X]) - _LT_DECL([], [LIPO], [1], - [Tool to manipulate fat objects and archives on Mac OS X]) - _LT_DECL([], [OTOOL], [1], - [ldd/readelf like tool for Mach-O binaries on Mac OS X]) - _LT_DECL([], [OTOOL64], [1], - [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) - - AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], - [lt_cv_apple_cc_single_mod=no - if test -z "$LT_MULTI_MODULE"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - # If there is a non-empty error log, and "single_module" - # appears in it, assume the flag caused a linker warning - if test -s conftest.err && $GREP single_module conftest.err; then - cat conftest.err >&AS_MESSAGE_LOG_FD - # Otherwise, if the output was created with a 0 exit code from - # the compiler, it worked. - elif test -f libconftest.dylib && test 0 = "$_lt_result"; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi]) - - AC_CACHE_CHECK([for -exported_symbols_list linker flag], - [lt_cv_ld_exported_symbols_list], - [lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [lt_cv_ld_exported_symbols_list=yes], - [lt_cv_ld_exported_symbols_list=no]) - LDFLAGS=$save_LDFLAGS - ]) - - AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], - [lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD - echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD - $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _lt_result=$? - if test -s conftest.err && $GREP force_load conftest.err; then - cat conftest.err >&AS_MESSAGE_LOG_FD - elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - ]) - case $host_os in - rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - 10.[[012]][[,.]]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test yes = "$lt_cv_apple_cc_single_mod"; then - _lt_dar_single_mod='$single_module' - fi - if test yes = "$lt_cv_ld_exported_symbols_list"; then - _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' - fi - if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac -]) - - -# _LT_DARWIN_LINKER_FEATURES([TAG]) -# --------------------------------- -# Checks for linker and compiler features on darwin -m4_defun([_LT_DARWIN_LINKER_FEATURES], -[ - m4_require([_LT_REQUIRED_DARWIN_CHECKS]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_automatic, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - if test yes = "$lt_cv_ld_force_load"; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], - [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='' - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined - case $cc_basename in - ifort*|nagfor*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test yes = "$_lt_dar_can_shared"; then - output_verbose_link_cmd=func_echo_all - _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" - _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" - m4_if([$1], [CXX], -[ if test yes != "$lt_cv_apple_cc_single_mod"; then - _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" - fi -],[]) - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -]) - -# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) -# ---------------------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -# Store the results from the different compilers for each TAGNAME. -# Allow to override them for all tags through lt_cv_aix_libpath. -m4_defun([_LT_SYS_MODULE_PATH_AIX], -[m4_require([_LT_DECL_SED])dnl -if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], - [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ - lt_aix_libpath_sed='[ - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }]' - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi],[]) - if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib - fi - ]) - aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) -fi -])# _LT_SYS_MODULE_PATH_AIX - - -# _LT_SHELL_INIT(ARG) -# ------------------- -m4_define([_LT_SHELL_INIT], -[m4_divert_text([M4SH-INIT], [$1 -])])# _LT_SHELL_INIT - - - -# _LT_PROG_ECHO_BACKSLASH -# ----------------------- -# Find how we can fake an echo command that does not interpret backslash. -# In particular, with Autoconf 2.60 or later we add some code to the start -# of the generated configure script that will find a shell with a builtin -# printf (that we can use as an echo command). -m4_defun([_LT_PROG_ECHO_BACKSLASH], -[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -AC_MSG_CHECKING([how to print strings]) -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$[]1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "$*" -} - -case $ECHO in - printf*) AC_MSG_RESULT([printf]) ;; - print*) AC_MSG_RESULT([print -r]) ;; - *) AC_MSG_RESULT([cat]) ;; -esac - -m4_ifdef([_AS_DETECT_SUGGESTED], -[_AS_DETECT_SUGGESTED([ - test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO - ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test "X`printf %s $ECHO`" = "X$ECHO" \ - || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) - -_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) -_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) -])# _LT_PROG_ECHO_BACKSLASH - - -# _LT_WITH_SYSROOT -# ---------------- -AC_DEFUN([_LT_WITH_SYSROOT], -[AC_MSG_CHECKING([for sysroot]) -AC_ARG_WITH([sysroot], -[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], - [Search for dependent libraries within DIR (or the compiler's sysroot - if not specified).])], -[], [with_sysroot=no]) - -dnl lt_sysroot will always be passed unquoted. We quote it here -dnl in case the user passed a directory name. -lt_sysroot= -case $with_sysroot in #( - yes) - if test yes = "$GCC"; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( - /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` - ;; #( - no|'') - ;; #( - *) - AC_MSG_RESULT([$with_sysroot]) - AC_MSG_ERROR([The sysroot must be an absolute path.]) - ;; -esac - - AC_MSG_RESULT([${lt_sysroot:-no}]) -_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl -[dependent libraries, and where our libraries should be installed.])]) - -# _LT_ENABLE_LOCK -# --------------- -m4_defun([_LT_ENABLE_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AS_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test no = "$enable_libtool_lock" || enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out what ABI is being produced by ac_compile, and set mode - # options accordingly. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE=32 - ;; - *ELF-64*) - HPUX_IA64_MODE=64 - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - if test yes = "$lt_cv_prog_gnu_ld"; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -mips64*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - emul=elf - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - emul="${emul}32" - ;; - *64-bit*) - emul="${emul}64" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *MSB*) - emul="${emul}btsmip" - ;; - *LSB*) - emul="${emul}ltsmip" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *N32*) - emul="${emul}n32" - ;; - esac - LD="${LD-ld} -m $emul" - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. Note that the listed cases only cover the - # situations where additional linker options are needed (such as when - # doing 32-bit compilation for a host where ld defaults to 64-bit, or - # vice versa); the common cases where no linker options are needed do - # not appear in the list. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - case `/usr/bin/file conftest.o` in - *x86-64*) - LD="${LD-ld} -m elf32_x86_64" - ;; - *) - LD="${LD-ld} -m elf_i386" - ;; - esac - ;; - powerpc64le-*linux*) - LD="${LD-ld} -m elf32lppclinux" - ;; - powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - powerpcle-*linux*) - LD="${LD-ld} -m elf64lppc" - ;; - powerpc-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - if test yes != "$lt_cv_cc_needs_belf"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS=$SAVE_CFLAGS - fi - ;; -*-*solaris*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) - case $host in - i?86-*-solaris*|x86_64-*-solaris*) - LD="${LD-ld} -m elf_x86_64" - ;; - sparc*-*-solaris*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - # GNU ld 2.21 introduced _sol2 emulations. Use them if available. - if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD=${LD-ld}_sol2 - fi - ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks=$enable_libtool_lock -])# _LT_ENABLE_LOCK - - -# _LT_PROG_AR -# ----------- -m4_defun([_LT_PROG_AR], -[AC_CHECK_TOOLS(AR, [ar], false) -: ${AR=ar} -: ${AR_FLAGS=cru} -_LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) - -AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], - [lt_cv_ar_at_file=no - AC_COMPILE_IFELSE([AC_LANG_PROGRAM], - [echo conftest.$ac_objext > conftest.lst - lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' - AC_TRY_EVAL([lt_ar_try]) - if test 0 -eq "$ac_status"; then - # Ensure the archiver fails upon bogus file names. - rm -f conftest.$ac_objext libconftest.a - AC_TRY_EVAL([lt_ar_try]) - if test 0 -ne "$ac_status"; then - lt_cv_ar_at_file=@ - fi - fi - rm -f conftest.* libconftest.a - ]) - ]) - -if test no = "$lt_cv_ar_at_file"; then - archiver_list_spec= -else - archiver_list_spec=$lt_cv_ar_at_file -fi -_LT_DECL([], [archiver_list_spec], [1], - [How to feed a file listing to the archiver]) -])# _LT_PROG_AR - - -# _LT_CMD_OLD_ARCHIVE -# ------------------- -m4_defun([_LT_CMD_OLD_ARCHIVE], -[_LT_PROG_AR - -AC_CHECK_TOOL(STRIP, strip, :) -test -z "$STRIP" && STRIP=: -_LT_DECL([], [STRIP], [1], [A symbol stripping program]) - -AC_CHECK_TOOL(RANLIB, ranlib, :) -test -z "$RANLIB" && RANLIB=: -_LT_DECL([], [RANLIB], [1], - [Commands used to install an old-style archive]) - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - bitrig* | openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac -_LT_DECL([], [old_postinstall_cmds], [2]) -_LT_DECL([], [old_postuninstall_cmds], [2]) -_LT_TAGDECL([], [old_archive_cmds], [2], - [Commands used to build an old-style archive]) -_LT_DECL([], [lock_old_archive_extraction], [0], - [Whether to use a lock for old archive extraction]) -])# _LT_CMD_OLD_ARCHIVE - - -# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([_LT_COMPILER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $RM conftest* -]) - -if test yes = "[$]$2"; then - m4_if([$5], , :, [$5]) -else - m4_if([$6], , :, [$6]) -fi -])# _LT_COMPILER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) - - -# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------- -# Check whether the given linker option works -AC_DEFUN([_LT_LINKER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS -]) - -if test yes = "[$]$2"; then - m4_if([$4], , :, [$4]) -else - m4_if([$5], , :, [$5]) -fi -])# _LT_LINKER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) - - -# LT_CMD_MAX_LEN -#--------------- -AC_DEFUN([LT_CMD_MAX_LEN], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring=ABCD - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - os2*) - # The test takes a long time on OS/2. - lt_cv_sys_max_cmd_len=8192 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len" && \ - test undefined != "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test X`env echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test 17 != "$i" # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac -]) -if test -n "$lt_cv_sys_max_cmd_len"; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -max_cmd_len=$lt_cv_sys_max_cmd_len -_LT_DECL([], [max_cmd_len], [0], - [What is the maximum length of a command?]) -])# LT_CMD_MAX_LEN - -# Old name: -AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) - - -# _LT_HEADER_DLFCN -# ---------------- -m4_defun([_LT_HEADER_DLFCN], -[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl -])# _LT_HEADER_DLFCN - - -# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# ---------------------------------------------------------------- -m4_defun([_LT_TRY_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test yes = "$cross_compiling"; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -[#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisibility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -}] -_LT_EOF - if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_TRY_DLOPEN_SELF - - -# LT_SYS_DLOPEN_SELF -# ------------------ -AC_DEFUN([LT_SYS_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test yes != "$enable_dlopen"; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen=load_add_on - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen=LoadLibrary - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ - lt_cv_dlopen=dyld - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - tpf*) - # Don't try to run any link tests for TPF. We know it's impossible - # because TPF is a cross-compiler, and we know how we open DSOs. - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - lt_cv_dlopen_self=no - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen=shl_load], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen=dlopen], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test no = "$lt_cv_dlopen"; then - enable_dlopen=no - else - enable_dlopen=yes - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS=$CPPFLAGS - test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS=$LDFLAGS - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS=$LIBS - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test yes = "$lt_cv_dlopen_self"; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS=$save_CPPFLAGS - LDFLAGS=$save_LDFLAGS - LIBS=$save_LIBS - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -_LT_DECL([dlopen_support], [enable_dlopen], [0], - [Whether dlopen is supported]) -_LT_DECL([dlopen_self], [enable_dlopen_self], [0], - [Whether dlopen of programs is supported]) -_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], - [Whether dlopen of statically linked programs is supported]) -])# LT_SYS_DLOPEN_SELF - -# Old name: -AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) - - -# _LT_COMPILER_C_O([TAGNAME]) -# --------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler. -# This macro does not hard code the compiler like AC_PROG_CC_C_O. -m4_defun([_LT_COMPILER_C_O], -[m4_require([_LT_DECL_SED])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* -]) -_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], - [Does compiler simultaneously support -c and -o options?]) -])# _LT_COMPILER_C_O - - -# _LT_COMPILER_FILE_LOCKS([TAGNAME]) -# ---------------------------------- -# Check to see if we can do hard links to lock some files if needed -m4_defun([_LT_COMPILER_FILE_LOCKS], -[m4_require([_LT_ENABLE_LOCK])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_COMPILER_C_O([$1]) - -hard_links=nottested -if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) - if test no = "$hard_links"; then - AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) -])# _LT_COMPILER_FILE_LOCKS - - -# _LT_CHECK_OBJDIR -# ---------------- -m4_defun([_LT_CHECK_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -_LT_DECL([], [objdir], [0], - [The name of the directory that contains temporary libtool files])dnl -m4_pattern_allow([LT_OBJDIR])dnl -AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", - [Define to the sub-directory where libtool stores uninstalled libraries.]) -])# _LT_CHECK_OBJDIR - - -# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) -# -------------------------------------- -# Check hardcoding attributes. -m4_defun([_LT_LINKER_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || - test -n "$_LT_TAGVAR(runpath_var, $1)" || - test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then - - # We can hardcode non-existent directories. - if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && - test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then - # Linking always hardcodes the temporary library directory. - _LT_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) - -if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || - test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then - # Fast installation is not supported - enable_fast_install=no -elif test yes = "$shlibpath_overrides_runpath" || - test no = "$enable_shared"; then - # Fast installation is not necessary - enable_fast_install=needless -fi -_LT_TAGDECL([], [hardcode_action], [0], - [How to hardcode a shared library path into an executable]) -])# _LT_LINKER_HARDCODE_LIBPATH - - -# _LT_CMD_STRIPLIB -# ---------------- -m4_defun([_LT_CMD_STRIPLIB], -[m4_require([_LT_DECL_EGREP]) -striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP"; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) -_LT_DECL([], [striplib], [1]) -])# _LT_CMD_STRIPLIB - - -# _LT_PREPARE_MUNGE_PATH_LIST -# --------------------------- -# Make sure func_munge_path_list() is defined correctly. -m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], -[[# func_munge_path_list VARIABLE PATH -# ----------------------------------- -# VARIABLE is name of variable containing _space_ separated list of -# directories to be munged by the contents of PATH, which is string -# having a format: -# "DIR[:DIR]:" -# string "DIR[ DIR]" will be prepended to VARIABLE -# ":DIR[:DIR]" -# string "DIR[ DIR]" will be appended to VARIABLE -# "DIRP[:DIRP]::[DIRA:]DIRA" -# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -# "DIRA[ DIRA]" will be appended to VARIABLE -# "DIR[:DIR]" -# VARIABLE will be replaced by "DIR[ DIR]" -func_munge_path_list () -{ - case x@S|@2 in - x) - ;; - *:) - eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" - ;; - x:*) - eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" - ;; - *::*) - eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" - eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" - ;; - *) - eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" - ;; - esac -} -]])# _LT_PREPARE_PATH_LIST - - -# _LT_SYS_DYNAMIC_LINKER([TAG]) -# ----------------------------- -# PORTME Fill in your ld.so characteristics -m4_defun([_LT_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_OBJDUMP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -m4_if([$1], - [], [ -if test yes = "$GCC"; then - case $host_os in - darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; - *) lt_awk_arg='/^libraries:/' ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; - *) lt_sed_strip_eq='s|=/|/|g' ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary... - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - # ...but if some path component already ends with the multilib dir we assume - # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). - case "$lt_multi_os_dir; $lt_search_path_spec " in - "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) - lt_multi_os_dir= - ;; - esac - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" - elif test -n "$lt_multi_os_dir"; then - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS = " "; FS = "/|\n";} { - lt_foo = ""; - lt_count = 0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo = "/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[[lt_foo]]++; } - if (lt_freq[[lt_foo]] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=.so -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -AC_ARG_VAR([LT_SYS_LIBRARY_PATH], -[User-defined run-time library search path.]) - -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='$libname$release$shared_ext$major' - ;; - -aix[[4-9]]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test ia64 = "$host_cpu"; then - # AIX 5 supports IA64 - library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line '#! .'. This would cause the generated library to - # depend on '.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # Using Import Files as archive members, it is possible to support - # filename-based versioning of shared library archives on AIX. While - # this would work for both with and without runtime linking, it will - # prevent static linking of such archives. So we do filename-based - # shared library versioning with .so extension only, which is used - # when both runtime linking and shared linking is enabled. - # Unfortunately, runtime linking may impact performance, so we do - # not want this to be the default eventually. Also, we use the - # versioned .so libs for executables only if there is the -brtl - # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. - # To allow for filename-based versioning support, we need to create - # libNAME.so.V as an archive file, containing: - # *) an Import File, referring to the versioned filename of the - # archive as well as the shared archive member, telling the - # bitwidth (32 or 64) of that shared object, and providing the - # list of exported symbols of that shared object, eventually - # decorated with the 'weak' keyword - # *) the shared object with the F_LOADONLY flag set, to really avoid - # it being seen by the linker. - # At run time we better use the real file rather than another symlink, - # but for link time we create the symlink libNAME.so -> libNAME.so.V - - case $with_aix_soname,$aix_use_runtimelinking in - # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - aix,yes) # traditional libtool - dynamic_linker='AIX unversionable lib.so' - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - aix,no) # traditional AIX only - dynamic_linker='AIX lib.a[(]lib.so.V[)]' - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - ;; - svr4,*) # full svr4 only - dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,yes) # both, prefer svr4 - dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # unpreferred sharedlib libNAME.a needs extra handling - postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' - postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,no) # both, prefer aix - dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling - postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' - postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' - ;; - esac - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='$libname$shared_ext' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[[45]]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' - library_names_spec='$libname.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec=$LIB - if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' - soname_spec='$libname$release$major$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[23]].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[[01]]* | freebsdelf3.[[01]]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=no - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - if test 32 = "$HPUX_IA64_MODE"; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - sys_lib_dlsearch_path_spec=/usr/lib/hpux32 - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - sys_lib_dlsearch_path_spec=/usr/lib/hpux64 - fi - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[[3-9]]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test yes = "$lt_cv_prog_gnu_ld"; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" - sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -linux*android*) - version_type=none # Android doesn't support versioned libraries. - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext' - soname_spec='$libname$release$shared_ext' - finish_cmds= - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - dynamic_linker='Android linker' - # Don't embed -rpath directories since the linker doesn't support them. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], - [lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ - LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], - [lt_cv_shlibpath_overrides_runpath=yes])]) - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - ]) - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Ideally, we could use ldconfig to report *all* directores which are - # searched for libraries, however this is still not possible. Aside from not - # being certain /sbin/ldconfig is available, command - # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, - # even though it is searched at run-time. Try to do the best guess by - # appending ld.so.conf contents (and includes) to the search path. - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd* | bitrig*) - version_type=sunos - sys_lib_dlsearch_path_spec=/usr/lib - need_lib_prefix=no - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - need_version=no - else - need_version=yes - fi - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -os2*) - libname_spec='$name' - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - # OS/2 can only load a DLL with a base name of 8 characters or less. - soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; - v=$($ECHO $release$versuffix | tr -d .-); - n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); - $ECHO $n$v`$shared_ext' - library_names_spec='${libname}_dll.$libext' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=BEGINLIBPATH - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test yes = "$with_gnu_ld"; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec; then - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' - soname_spec='$libname$shared_ext.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=sco - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test yes = "$with_gnu_ld"; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -AC_MSG_RESULT([$dynamic_linker]) -test no = "$dynamic_linker" && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test yes = "$GCC"; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then - sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec -fi - -if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then - sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec -fi - -# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... -configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec - -# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code -func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" - -# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool -configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - -_LT_DECL([], [variables_saved_for_relink], [1], - [Variables whose values should be saved in libtool wrapper scripts and - restored at link time]) -_LT_DECL([], [need_lib_prefix], [0], - [Do we need the "lib" prefix for modules?]) -_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) -_LT_DECL([], [version_type], [0], [Library versioning type]) -_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) -_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) -_LT_DECL([], [shlibpath_overrides_runpath], [0], - [Is shlibpath searched before the hard-coded library search path?]) -_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) -_LT_DECL([], [library_names_spec], [1], - [[List of archive names. First name is the real one, the rest are links. - The last name is the one that the linker finds with -lNAME]]) -_LT_DECL([], [soname_spec], [1], - [[The coded name of the library, if different from the real name]]) -_LT_DECL([], [install_override_mode], [1], - [Permission mode override for installation of shared libraries]) -_LT_DECL([], [postinstall_cmds], [2], - [Command to use after installation of a shared archive]) -_LT_DECL([], [postuninstall_cmds], [2], - [Command to use after uninstallation of a shared archive]) -_LT_DECL([], [finish_cmds], [2], - [Commands used to finish a libtool library installation in a directory]) -_LT_DECL([], [finish_eval], [1], - [[As "finish_cmds", except a single script fragment to be evaled but - not shown]]) -_LT_DECL([], [hardcode_into_libs], [0], - [Whether we should hardcode library paths into libraries]) -_LT_DECL([], [sys_lib_search_path_spec], [2], - [Compile-time system search path for libraries]) -_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], - [Detected run-time system search path for libraries]) -_LT_DECL([], [configure_time_lt_sys_library_path], [2], - [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) -])# _LT_SYS_DYNAMIC_LINKER - - -# _LT_PATH_TOOL_PREFIX(TOOL) -# -------------------------- -# find a file program that can recognize shared library -AC_DEFUN([_LT_PATH_TOOL_PREFIX], -[m4_require([_LT_DECL_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD=$MAGIC_CMD - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="m4_if([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$1"; then - lt_cv_path_MAGIC_CMD=$ac_dir/"$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD=$lt_cv_path_MAGIC_CMD - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS=$lt_save_ifs - MAGIC_CMD=$lt_save_MAGIC_CMD - ;; -esac]) -MAGIC_CMD=$lt_cv_path_MAGIC_CMD -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -_LT_DECL([], [MAGIC_CMD], [0], - [Used to examine libraries when file_magic_cmd begins with "file"])dnl -])# _LT_PATH_TOOL_PREFIX - -# Old name: -AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) - - -# _LT_PATH_MAGIC -# -------------- -# find a file program that can recognize a shared library -m4_defun([_LT_PATH_MAGIC], -[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# _LT_PATH_MAGIC - - -# LT_PATH_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([LT_PATH_LD], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_PROG_ECHO_BACKSLASH])dnl - -AC_ARG_WITH([gnu-ld], - [AS_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test no = "$withval" || with_gnu_ld=yes], - [with_gnu_ld=no])dnl - -ac_prog=ld -if test yes = "$GCC"; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return, which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD=$ac_prog - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test yes = "$with_gnu_ld"; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD=$ac_dir/$ac_prog - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &1 conftest.i -cat conftest.i conftest.i >conftest2.i -: ${lt_DD:=$DD} -AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], -[if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: -fi]) -rm -f conftest.i conftest2.i conftest.out]) -])# _LT_PATH_DD - - -# _LT_CMD_TRUNCATE -# ---------------- -# find command to truncate a binary pipe -m4_defun([_LT_CMD_TRUNCATE], -[m4_require([_LT_PATH_DD]) -AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], -[printf 0123456789abcdef0123456789abcdef >conftest.i -cat conftest.i conftest.i >conftest2.i -lt_cv_truncate_bin= -if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" -fi -rm -f conftest.i conftest2.i conftest.out -test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) -_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], - [Command to truncate a binary pipe]) -])# _LT_CMD_TRUNCATE - - -# _LT_CHECK_MAGIC_METHOD -# ---------------------- -# how to check for library dependencies -# -- PORTME fill in with the dynamic library characteristics -m4_defun([_LT_CHECK_MAGIC_METHOD], -[m4_require([_LT_DECL_EGREP]) -m4_require([_LT_DECL_OBJDUMP]) -AC_CACHE_CHECK([how to recognize dependent libraries], -lt_cv_deplibs_check_method, -[lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# 'unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# that responds to the $file_magic_cmd with a given extended regex. -# If you have 'file' or equivalent on your system and you're not sure -# whether 'pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[[4-9]]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[[45]]*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[[3-9]]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd* | bitrig*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -os2*) - lt_cv_deplibs_check_method=pass_all - ;; -esac -]) - -file_magic_glob= -want_nocaseglob=no -if test "$build" = "$host"; then - case $host_os in - mingw* | pw32*) - if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then - want_nocaseglob=yes - else - file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` - fi - ;; - esac -fi - -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - -_LT_DECL([], [deplibs_check_method], [1], - [Method to check whether dependent libraries are shared objects]) -_LT_DECL([], [file_magic_cmd], [1], - [Command to use when deplibs_check_method = "file_magic"]) -_LT_DECL([], [file_magic_glob], [1], - [How to find potential files when deplibs_check_method = "file_magic"]) -_LT_DECL([], [want_nocaseglob], [1], - [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) -])# _LT_CHECK_MAGIC_METHOD - - -# LT_PATH_NM -# ---------- -# find the pathname to a BSD- or MS-compatible name lister -AC_DEFUN([LT_PATH_NM], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM=$NM -else - lt_nm_to_check=${ac_tool_prefix}nm - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - tmp_nm=$ac_dir/$lt_tmp_nm - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the 'sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty - case $build_os in - mingw*) lt_bad_file=conftest.nm/nofile ;; - *) lt_bad_file=/dev/null ;; - esac - case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in - *$lt_bad_file* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break 2 - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break 2 - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS=$lt_save_ifs - done - : ${lt_cv_path_NM=no} -fi]) -if test no != "$lt_cv_path_NM"; then - NM=$lt_cv_path_NM -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols -headers" - ;; - *) - DUMPBIN=: - ;; - esac - fi - AC_SUBST([DUMPBIN]) - if test : != "$DUMPBIN"; then - NM=$DUMPBIN - fi -fi -test -z "$NM" && NM=nm -AC_SUBST([NM]) -_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl - -AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], - [lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) - cat conftest.out >&AS_MESSAGE_LOG_FD - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest*]) -])# LT_PATH_NM - -# Old names: -AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) -AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_PROG_NM], []) -dnl AC_DEFUN([AC_PROG_NM], []) - -# _LT_CHECK_SHAREDLIB_FROM_LINKLIB -# -------------------------------- -# how to determine the name of the shared library -# associated with a specific link library. -# -- PORTME fill in with the dynamic library characteristics -m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], -[m4_require([_LT_DECL_EGREP]) -m4_require([_LT_DECL_OBJDUMP]) -m4_require([_LT_DECL_DLLTOOL]) -AC_CACHE_CHECK([how to associate runtime and link libraries], -lt_cv_sharedlib_from_linklib_cmd, -[lt_cv_sharedlib_from_linklib_cmd='unknown' - -case $host_os in -cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh; - # decide which one to use based on capabilities of $DLLTOOL - case `$DLLTOOL --help 2>&1` in - *--identify-strict*) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib - ;; - *) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback - ;; - esac - ;; -*) - # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd=$ECHO - ;; -esac -]) -sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO - -_LT_DECL([], [sharedlib_from_linklib_cmd], [1], - [Command to associate shared and link libraries]) -])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB - - -# _LT_PATH_MANIFEST_TOOL -# ---------------------- -# locate the manifest tool -m4_defun([_LT_PATH_MANIFEST_TOOL], -[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) -test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], - [lt_cv_path_mainfest_tool=no - echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD - $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out - cat conftest.err >&AS_MESSAGE_LOG_FD - if $GREP 'Manifest Tool' conftest.out > /dev/null; then - lt_cv_path_mainfest_tool=yes - fi - rm -f conftest*]) -if test yes != "$lt_cv_path_mainfest_tool"; then - MANIFEST_TOOL=: -fi -_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl -])# _LT_PATH_MANIFEST_TOOL - - -# _LT_DLL_DEF_P([FILE]) -# --------------------- -# True iff FILE is a Windows DLL '.def' file. -# Keep in sync with func_dll_def_p in the libtool script -AC_DEFUN([_LT_DLL_DEF_P], -[dnl - test DEF = "`$SED -n dnl - -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace - -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments - -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl - -e q dnl Only consider the first "real" line - $1`" dnl -])# _LT_DLL_DEF_P - - -# LT_LIB_M -# -------- -# check for math library -AC_DEFUN([LT_LIB_M], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM=-lm) - ;; -esac -AC_SUBST([LIBM]) -])# LT_LIB_M - -# Old name: -AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_CHECK_LIBM], []) - - -# _LT_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------- -m4_defun([_LT_COMPILER_NO_RTTI], -[m4_require([_LT_TAG_COMPILER])dnl - -_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test yes = "$GCC"; then - case $cc_basename in - nvcc*) - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; - *) - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; - esac - - _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], - [Compiler flag to turn off builtin functions]) -])# _LT_COMPILER_NO_RTTI - - -# _LT_CMD_GLOBAL_SYMBOLS -# ---------------------- -m4_defun([_LT_CMD_GLOBAL_SYMBOLS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([LT_PATH_NM])dnl -AC_REQUIRE([LT_PATH_LD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_TAG_COMPILER])dnl - -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) - if test ia64 = "$host_cpu"; then - symcode='[[ABCDEGRST]]' - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" - # Adjust the below global symbol transforms to fixup imported variables. - lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" - lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" - lt_c_name_lib_hook="\ - -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ - -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" -else - # Disable hooks by default. - lt_cv_sys_global_symbol_to_import= - lt_cdecl_hook= - lt_c_name_hook= - lt_c_name_lib_hook= -fi - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n"\ -$lt_cdecl_hook\ -" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ -$lt_c_name_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" - -# Transform an extracted symbol line into symbol name with lib prefix and -# symbol address. -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ -$lt_c_name_lib_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function, - # D for any global variable and I for any imported variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK ['"\ -" {last_section=section; section=\$ 3};"\ -" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ -" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ -" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ -" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ -" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx]" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if AC_TRY_EVAL(ac_compile); then - # Now try to grab the symbols. - nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE -/* DATA imports from DLLs on WIN32 can't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT@&t@_DLSYM_CONST -#elif defined __osf__ -/* This system does not cope well with relocations in const data. */ -# define LT@&t@_DLSYM_CONST -#else -# define LT@&t@_DLSYM_CONST const -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -LT@&t@_DLSYM_CONST struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[[]] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_globsym_save_LIBS=$LIBS - lt_globsym_save_CFLAGS=$CFLAGS - LIBS=conftstm.$ac_objext - CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then - pipe_works=yes - fi - LIBS=$lt_globsym_save_LIBS - CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test yes = "$pipe_works"; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -]) -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi - -# Response file support. -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - nm_file_list_spec='@' -elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then - nm_file_list_spec='@' -fi - -_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], - [Take the output of nm and produce a listing of raw symbols and C names]) -_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], - [Transform the output of nm in a proper C declaration]) -_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], - [Transform the output of nm into a list of symbols to manually relocate]) -_LT_DECL([global_symbol_to_c_name_address], - [lt_cv_sys_global_symbol_to_c_name_address], [1], - [Transform the output of nm in a C name address pair]) -_LT_DECL([global_symbol_to_c_name_address_lib_prefix], - [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], - [Transform the output of nm in a C name address pair when lib prefix is needed]) -_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], - [The name lister interface]) -_LT_DECL([], [nm_file_list_spec], [1], - [Specify filename containing input files for $NM]) -]) # _LT_CMD_GLOBAL_SYMBOLS - - -# _LT_COMPILER_PIC([TAGNAME]) -# --------------------------- -m4_defun([_LT_COMPILER_PIC], -[m4_require([_LT_TAG_COMPILER])dnl -_LT_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_TAGVAR(lt_prog_compiler_static, $1)= - -m4_if([$1], [CXX], [ - # C++ specific cases for pic, static, wl, etc. - if test yes = "$GXX"; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the '-m68020' flag to GCC prevents building anything better, - # like '-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - case $host_os in - os2*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' - ;; - esac - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - _LT_TAGVAR(lt_prog_compiler_static, $1)= - ;; - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix[[4-9]]*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' - if test ia64 != "$host_cpu"; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64, which still supported -KPIC. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) - # IBM XL 8.0, 9.0 on PPC and BlueGene - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd* | netbsdelf*-gnu) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test yes = "$GCC"; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the '-m68020' flag to GCC prevents building anything better, - # like '-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - case $host_os in - os2*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' - ;; - esac - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - _LT_TAGVAR(lt_prog_compiler_static, $1)= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' - if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" - fi - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - case $cc_basename in - nagfor*) - # NAG Fortran compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - case $host_os in - os2*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' - ;; - esac - ;; - - hpux9* | hpux10* | hpux11*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - # old Intel for x86_64, which still supported -KPIC. - ecc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' - _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' - ;; - nagfor*) - # NAG Fortran compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='' - ;; - *Sun\ F* | *Sun*Fortran*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - *Sun\ C*) - # Sun C 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - *Intel*\ [[CF]]*Compiler*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - *Portland\ Group*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - esac - ;; - - newsos6) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - rdos*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - solaris*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - unicos*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -case $host_os in - # For platforms that do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" - ;; -esac - -AC_CACHE_CHECK([for $compiler option to produce PIC], - [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) -_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], - [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], - [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], - [Additional compiler flags for building library objects]) - -_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], - [How to pass a linker flag through the compiler]) -# -# Check to make sure the static flag actually works. -# -wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" -_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) -_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], - [Compiler flag to prevent dynamic linking]) -])# _LT_COMPILER_PIC - - -# _LT_LINKER_SHLIBS([TAGNAME]) -# ---------------------------- -# See if the linker supports building shared libraries. -m4_defun([_LT_LINKER_SHLIBS], -[AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -m4_require([_LT_PATH_MANIFEST_TOOL])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -m4_if([$1], [CXX], [ - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - case $host_os in - aix[[4-9]]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to GNU nm, but means don't demangle to AIX nm. - # Without the "-l" option, or with the "-B" option, AIX nm treats - # weak defined symbols like other global defined symbols, whereas - # GNU nm marks them as "W". - # While the 'weak' keyword is ignored in the Export File, we need - # it in the Import File for the 'aix-soname' feature, so we have - # to replace the "-B" option with "-P" for AIX nm. - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds - ;; - cygwin* | mingw* | cegcc*) - case $cc_basename in - cl*) - _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] - ;; - esac - ;; - linux* | k*bsd*-gnu | gnu*) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac -], [ - runpath_var= - _LT_TAGVAR(allow_undefined_flag, $1)= - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(archive_cmds, $1)= - _LT_TAGVAR(archive_expsym_cmds, $1)= - _LT_TAGVAR(compiler_needs_object, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(hardcode_automatic, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_separator, $1)= - _LT_TAGVAR(hardcode_minus_L, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(inherit_rpath, $1)=no - _LT_TAGVAR(link_all_deplibs, $1)=unknown - _LT_TAGVAR(module_cmds, $1)= - _LT_TAGVAR(module_expsym_cmds, $1)= - _LT_TAGVAR(old_archive_from_new_cmds, $1)= - _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_TAGVAR(thread_safe_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ' (' and ')$', so one must not match beginning or - # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', - # as well as any symbol that contains 'd'. - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. -dnl Note also adjust exclude_expsyms for C++ above. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test yes != "$GCC"; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd* | bitrig*) - with_gnu_ld=no - ;; - linux* | k*bsd*-gnu | gnu*) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; - esac - - _LT_TAGVAR(ld_shlibs, $1)=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test yes = "$with_gnu_ld"; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; - *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test yes = "$lt_use_gnu_ld_interface"; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='$wl' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[[3-9]]*) - # On AIX/PPC, the GNU linker is very broken - if test ia64 != "$host_cpu"; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file, use it as - # is; otherwise, prepend EXPORTS... - _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - shrext_cmds=.dll - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test linux-dietlibc = "$host_os"; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test no = "$tmp_diet" - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - _LT_TAGVAR(whole_archive_flag_spec, $1)= - tmp_sharedflag='--shared' ;; - nagfor*) # NAGFOR 5.3 - tmp_sharedflag='-Wl,-shared' ;; - xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - - if test yes = "$supports_anon_versioning"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - tcc*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' - ;; - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test yes = "$supports_anon_versioning"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - sunos4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then - runpath_var= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - - aix[[4-9]]*) - if test ia64 = "$host_cpu"; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag= - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to GNU nm, but means don't demangle to AIX nm. - # Without the "-l" option, or with the "-B" option, AIX nm treats - # weak defined symbols like other global defined symbols, whereas - # GNU nm marks them as "W". - # While the 'weak' keyword is ignored in the Export File, we need - # it in the Import File for the 'aix-soname' feature, so we have - # to replace the "-B" option with "-P" for AIX nm. - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # have runtime linking enabled, and use it for executables. - # For shared libraries, we enable/disable runtime linking - # depending on the kind of the shared library created - - # when "with_aix_soname,aix_use_runtimelinking" is: - # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables - # "aix,yes" lib.so shared, rtl:yes, for executables - # lib.a static archive - # "both,no" lib.so.V(shr.o) shared, rtl:yes - # lib.a(lib.so.V) shared, rtl:no, for executables - # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a(lib.so.V) shared, rtl:no - # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a static archive - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then - aix_use_runtimelinking=yes - break - fi - done - if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then - # With aix-soname=svr4, we create the lib.so.V shared archives only, - # so we don't have lib.a shared libs to link our executables. - # We have to force runtime linking in this case. - aix_use_runtimelinking=yes - LDFLAGS="$LDFLAGS -Wl,-brtl" - fi - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='$wl-f,' - case $with_aix_soname,$aix_use_runtimelinking in - aix,*) ;; # traditional, no import file - svr4,* | *,yes) # use import file - # The Import File defines what to hardcode. - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - ;; - esac - - if test yes = "$GCC"; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`$CC -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test yes = "$aix_use_runtimelinking"; then - shared_flag="$shared_flag "'$wl-G' - fi - # Need to ensure runtime linking is disabled for the traditional - # shared library, or the linker may eventually find shared libraries - # /with/ Import File - we do not want to mix them. - shared_flag_aix='-shared' - shared_flag_svr4='-shared $wl-G' - else - # not using gcc - if test ia64 = "$host_cpu"; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test yes = "$aix_use_runtimelinking"; then - shared_flag='$wl-G' - else - shared_flag='$wl-bM:SRE' - fi - shared_flag_aix='$wl-bM:SRE' - shared_flag_svr4='$wl-G' - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag - else - if test ia64 = "$host_cpu"; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' - if test yes = "$with_gnu_ld"; then - # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' - # -brtl affects multiple linker settings, -berok does not and is overridden later - compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' - if test svr4 != "$with_aix_soname"; then - # This is similar to how AIX traditionally builds its shared libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' - fi - if test aix != "$with_aix_soname"; then - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' - else - # used by -dlpreopen to get the symbols - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' - fi - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - bsdi[[45]]*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl*) - # Native MSVC - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then - cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' - # Don't use ranlib - _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' - _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile=$lt_outputfile.exe - lt_tool_outputfile=$lt_tool_outputfile.exe - ;; - esac~ - if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # Assume MSVC wrapper - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - esac - ;; - - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2.*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test yes = "$GCC"; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - ;; - - hpux10*) - if test yes,no = "$GCC,$with_gnu_ld"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test no = "$with_gnu_ld"; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - fi - ;; - - hpux11*) - if test yes,no = "$GCC,$with_gnu_ld"; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - m4_if($1, [], [ - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - _LT_LINKER_OPTION([if $CC understands -b], - _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], - [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) - ;; - esac - fi - if test no = "$with_gnu_ld"; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test yes = "$GCC"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], - [lt_cv_irix_exported_symbol], - [save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" - AC_LINK_IFELSE( - [AC_LANG_SOURCE( - [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], - [C++], [[int foo (void) { return 0; }]], - [Fortran 77], [[ - subroutine foo - end]], - [Fortran], [[ - subroutine foo - end]])])], - [lt_cv_irix_exported_symbol=yes], - [lt_cv_irix_exported_symbol=no]) - LDFLAGS=$save_LDFLAGS]) - if test yes = "$lt_cv_irix_exported_symbol"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' - fi - _LT_TAGVAR(link_all_deplibs, $1)=no - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - linux*) - case $cc_basename in - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - _LT_TAGVAR(ld_shlibs, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *nto* | *qnx*) - ;; - - openbsd* | bitrig*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - fi - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - shrext_cmds=.dll - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - osf3*) - if test yes = "$GCC"; then - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test yes = "$GCC"; then - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - solaris*) - _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test yes = "$GCC"; then - wlarc='$wl' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='$wl' - _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands '-z linker_flag'. GCC discards it without '$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test yes = "$GCC"; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - sunos4*) - if test sequent = "$host_vendor"; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test yes = "$GCC"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We CANNOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' - runpath_var='LD_RUN_PATH' - - if test yes = "$GCC"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - if test sni = "$host_vendor"; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' - ;; - esac - fi - fi -]) -AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no - -_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld - -_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl -_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl -_LT_DECL([], [extract_expsyms_cmds], [2], - [The commands to extract the exported symbol list from a shared archive]) - -# -# Do we need to explicitly link libc? -# -case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test yes,yes = "$GCC,$enable_shared"; then - case $_LT_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - AC_CACHE_CHECK([whether -lc should be explicitly linked in], - [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), - [$RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) - _LT_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) - then - lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no - else - lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - ]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) - ;; - esac - fi - ;; -esac - -_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], - [Whether or not to add -lc for building shared libraries]) -_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], - [enable_shared_with_static_runtimes], [0], - [Whether or not to disallow shared libs when runtime libs are static]) -_LT_TAGDECL([], [export_dynamic_flag_spec], [1], - [Compiler flag to allow reflexive dlopens]) -_LT_TAGDECL([], [whole_archive_flag_spec], [1], - [Compiler flag to generate shared objects directly from archives]) -_LT_TAGDECL([], [compiler_needs_object], [1], - [Whether the compiler copes with passing no objects directly]) -_LT_TAGDECL([], [old_archive_from_new_cmds], [2], - [Create an old-style archive from a shared archive]) -_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], - [Create a temporary old-style archive to link instead of a shared archive]) -_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) -_LT_TAGDECL([], [archive_expsym_cmds], [2]) -_LT_TAGDECL([], [module_cmds], [2], - [Commands used to build a loadable module if different from building - a shared archive.]) -_LT_TAGDECL([], [module_expsym_cmds], [2]) -_LT_TAGDECL([], [with_gnu_ld], [1], - [Whether we are building with GNU ld or not]) -_LT_TAGDECL([], [allow_undefined_flag], [1], - [Flag that allows shared libraries with undefined symbols to be built]) -_LT_TAGDECL([], [no_undefined_flag], [1], - [Flag that enforces no undefined symbols]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], - [Flag to hardcode $libdir into a binary during linking. - This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_separator], [1], - [Whether we need a single "-rpath" flag with a separated argument]) -_LT_TAGDECL([], [hardcode_direct], [0], - [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes - DIR into the resulting binary]) -_LT_TAGDECL([], [hardcode_direct_absolute], [0], - [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes - DIR into the resulting binary and the resulting library dependency is - "absolute", i.e impossible to change by setting $shlibpath_var if the - library is relocated]) -_LT_TAGDECL([], [hardcode_minus_L], [0], - [Set to "yes" if using the -LDIR flag during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_shlibpath_var], [0], - [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_automatic], [0], - [Set to "yes" if building a shared library automatically hardcodes DIR - into the library and all subsequent libraries and executables linked - against it]) -_LT_TAGDECL([], [inherit_rpath], [0], - [Set to yes if linker adds runtime paths of dependent libraries - to runtime path list]) -_LT_TAGDECL([], [link_all_deplibs], [0], - [Whether libtool must link a program against all its dependency libraries]) -_LT_TAGDECL([], [always_export_symbols], [0], - [Set to "yes" if exported symbols are required]) -_LT_TAGDECL([], [export_symbols_cmds], [2], - [The commands to list exported symbols]) -_LT_TAGDECL([], [exclude_expsyms], [1], - [Symbols that should not be listed in the preloaded symbols]) -_LT_TAGDECL([], [include_expsyms], [1], - [Symbols that must always be exported]) -_LT_TAGDECL([], [prelink_cmds], [2], - [Commands necessary for linking programs (against libraries) with templates]) -_LT_TAGDECL([], [postlink_cmds], [2], - [Commands necessary for finishing linking programs]) -_LT_TAGDECL([], [file_list_spec], [1], - [Specify filename containing input files]) -dnl FIXME: Not yet implemented -dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], -dnl [Compiler flag to generate thread safe objects]) -])# _LT_LINKER_SHLIBS - - -# _LT_LANG_C_CONFIG([TAG]) -# ------------------------ -# Ensure that the configuration variables for a C compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_C_CONFIG], -[m4_require([_LT_DECL_EGREP])dnl -lt_save_CC=$CC -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - -_LT_TAG_COMPILER -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - LT_SYS_DLOPEN_SELF - _LT_CMD_STRIPLIB - - # Report what library types will actually be built - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test no = "$can_build_shared" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test yes = "$enable_shared" && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[[4-9]]*) - if test ia64 != "$host_cpu"; then - case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in - yes,aix,yes) ;; # shared object as lib.so file only - yes,svr4,*) ;; # shared object as lib.so archive member only - yes,*) enable_static=no ;; # shared object in lib.a archive as well - esac - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test yes = "$enable_shared" || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_CONFIG($1) -fi -AC_LANG_POP -CC=$lt_save_CC -])# _LT_LANG_C_CONFIG - - -# _LT_LANG_CXX_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a C++ compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_CXX_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_PATH_MANIFEST_TOOL])dnl -if test -n "$CXX" && ( test no != "$CXX" && - ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || - (test g++ != "$CXX"))); then - AC_PROG_CXXCPP -else - _lt_caught_CXX_error=yes -fi - -AC_LANG_PUSH(C++) -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(compiler_needs_object, $1)=no -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test yes != "$_lt_caught_CXX_error"; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_CFLAGS=$CFLAGS - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - CFLAGS=$CXXFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test yes = "$GXX"; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - else - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - fi - - if test yes = "$GXX"; then - # Set up default GNU C++ configuration - - LT_PATH_LD - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test yes = "$with_gnu_ld"; then - _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='$wl' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) - _LT_TAGVAR(ld_shlibs, $1)=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aix[[4-9]]*) - if test ia64 = "$host_cpu"; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag= - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # have runtime linking enabled, and use it for executables. - # For shared libraries, we enable/disable runtime linking - # depending on the kind of the shared library created - - # when "with_aix_soname,aix_use_runtimelinking" is: - # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables - # "aix,yes" lib.so shared, rtl:yes, for executables - # lib.a static archive - # "both,no" lib.so.V(shr.o) shared, rtl:yes - # lib.a(lib.so.V) shared, rtl:no, for executables - # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a(lib.so.V) shared, rtl:no - # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a static archive - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then - # With aix-soname=svr4, we create the lib.so.V shared archives only, - # so we don't have lib.a shared libs to link our executables. - # We have to force runtime linking in this case. - aix_use_runtimelinking=yes - LDFLAGS="$LDFLAGS -Wl,-brtl" - fi - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='$wl-f,' - case $with_aix_soname,$aix_use_runtimelinking in - aix,*) ;; # no import file - svr4,* | *,yes) # use import file - # The Import File defines what to hardcode. - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - ;; - esac - - if test yes = "$GXX"; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`$CC -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - esac - shared_flag='-shared' - if test yes = "$aix_use_runtimelinking"; then - shared_flag=$shared_flag' $wl-G' - fi - # Need to ensure runtime linking is disabled for the traditional - # shared library, or the linker may eventually find shared libraries - # /with/ Import File - we do not want to mix them. - shared_flag_aix='-shared' - shared_flag_svr4='-shared $wl-G' - else - # not using gcc - if test ia64 = "$host_cpu"; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test yes = "$aix_use_runtimelinking"; then - shared_flag='$wl-G' - else - shared_flag='$wl-bM:SRE' - fi - shared_flag_aix='$wl-bM:SRE' - shared_flag_svr4='$wl-G' - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - # The "-G" linker flag allows undefined symbols. - _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' - # Determine the default libpath from the value encoded in an empty - # executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" - - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag - else - if test ia64 = "$host_cpu"; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' - if test yes = "$with_gnu_ld"; then - # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' - # -brtl affects multiple linker settings, -berok does not and is overridden later - compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' - if test svr4 != "$with_aix_soname"; then - # This is similar to how AIX traditionally builds its shared - # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' - fi - if test aix != "$with_aix_soname"; then - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' - else - # used by -dlpreopen to get the symbols - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' - fi - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - case $GXX,$cc_basename in - ,cl* | no,cl*) - # Native MSVC - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then - cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - # Don't use ranlib - _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' - _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile=$lt_outputfile.exe - lt_tool_outputfile=$lt_tool_outputfile.exe - ;; - esac~ - func_to_tool_file "$lt_outputfile"~ - if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # g++ - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file, use it as - # is; otherwise, prepend EXPORTS... - _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - shrext_cmds=.dll - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - freebsd2.*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - freebsd-elf*) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - hpux9*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test yes = "$GXX"; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test no = "$with_gnu_ld"; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test yes = "$GXX"; then - if test no = "$with_gnu_ld"; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test yes = "$GXX"; then - if test no = "$with_gnu_ld"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' - fi - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) - _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' - _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ - $RANLIB $oldlib' - _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 6 and above use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - ;; - cxx*) - # Compaq C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' - ;; - xl* | mpixl* | bgxl*) - # IBM XL 8.0 on PPC, with GNU ld - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - if test yes = "$supports_anon_versioning"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - openbsd* | bitrig*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - fi - output_verbose_link_cmd=func_echo_all - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - case $host in - osf3*) - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - ;; - *) - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ - $RM $lib.exp' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test yes,no = "$GXX,$with_gnu_ld"; then - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' - case $host in - osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands '-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test yes,no = "$GXX,$with_gnu_ld"; then - _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - else - # g++ 2.7 appears to require '-G' NOT '-shared' on this - # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - fi - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We CANNOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ - '"$_LT_TAGVAR(old_archive_cmds, $1)" - _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ - '"$_LT_TAGVAR(reload_cmds, $1)" - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no - - _LT_TAGVAR(GCC, $1)=$GXX - _LT_TAGVAR(LD, $1)=$LD - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test yes != "$_lt_caught_CXX_error" - -AC_LANG_POP -])# _LT_LANG_CXX_CONFIG - - -# _LT_FUNC_STRIPNAME_CNF -# ---------------------- -# func_stripname_cnf prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# -# This function is identical to the (non-XSI) version of func_stripname, -# except this one can be used by m4 code that may be executed by configure, -# rather than the libtool script. -m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl -AC_REQUIRE([_LT_DECL_SED]) -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) -func_stripname_cnf () -{ - case @S|@2 in - .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; - *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; - esac -} # func_stripname_cnf -])# _LT_FUNC_STRIPNAME_CNF - - -# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) -# --------------------------------- -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -m4_defun([_LT_SYS_HIDDEN_LIBDEPS], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl -# Dependencies to place before and after the object being linked: -_LT_TAGVAR(predep_objects, $1)= -_LT_TAGVAR(postdep_objects, $1)= -_LT_TAGVAR(predeps, $1)= -_LT_TAGVAR(postdeps, $1)= -_LT_TAGVAR(compiler_lib_search_path, $1)= - -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF -int a; -void foo (void) { a = 0; } -_LT_EOF -], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF -], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer*4 a - a=0 - return - end -_LT_EOF -], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer a - a=0 - return - end -_LT_EOF -], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF -public class foo { - private int a; - public void bar (void) { - a = 0; - } -}; -_LT_EOF -], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF -package foo -func foo() { -} -_LT_EOF -]) - -_lt_libdeps_save_CFLAGS=$CFLAGS -case "$CC $CFLAGS " in #( -*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; -*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; -*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; -esac - -dnl Parse the compiler output and extract the necessary -dnl objects, libraries and library flags. -if AC_TRY_EVAL(ac_compile); then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case $prev$p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test x-L = "$p" || - test x-R = "$p"; then - prev=$p - continue - fi - - # Expand the sysroot to ease extracting the directories later. - if test -z "$prev"; then - case $p in - -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; - -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; - -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; - esac - fi - case $p in - =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; - esac - if test no = "$pre_test_object_deps_done"; then - case $prev in - -L | -R) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p - else - _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)=$prev$p - else - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" - fi - fi - prev= - ;; - - *.lto.$objext) ;; # Ignore GCC LTO objects - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test no = "$pre_test_object_deps_done"; then - if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)=$p - else - _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" - fi - else - if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then - _LT_TAGVAR(postdep_objects, $1)=$p - else - _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling $1 test program" -fi - -$RM -f confest.$objext -CFLAGS=$_lt_libdeps_save_CFLAGS - -# PORTME: override above test on systems where it is broken -m4_if([$1], [CXX], -[case $host_os in -interix[[3-9]]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - _LT_TAGVAR(predep_objects,$1)= - _LT_TAGVAR(postdep_objects,$1)= - _LT_TAGVAR(postdeps,$1)= - ;; -esac -]) - -case " $_LT_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac - _LT_TAGVAR(compiler_lib_search_dirs, $1)= -if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then - _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` -fi -_LT_TAGDECL([], [compiler_lib_search_dirs], [1], - [The directories searched by this compiler when creating a shared library]) -_LT_TAGDECL([], [predep_objects], [1], - [Dependencies to place before and after the objects being linked to - create a shared library]) -_LT_TAGDECL([], [postdep_objects], [1]) -_LT_TAGDECL([], [predeps], [1]) -_LT_TAGDECL([], [postdeps], [1]) -_LT_TAGDECL([], [compiler_lib_search_path], [1], - [The library search path used internally by the compiler when linking - a shared library]) -])# _LT_SYS_HIDDEN_LIBDEPS - - -# _LT_LANG_F77_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a Fortran 77 compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_F77_CONFIG], -[AC_LANG_PUSH(Fortran 77) -if test -z "$F77" || test no = "$F77"; then - _lt_disable_F77=yes -fi - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the F77 compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test yes != "$_lt_disable_F77"; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_GCC=$GCC - lt_save_CFLAGS=$CFLAGS - CC=${F77-"f77"} - CFLAGS=$FFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - GCC=$G77 - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test no = "$can_build_shared" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test yes = "$enable_shared" && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test ia64 != "$host_cpu"; then - case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in - yes,aix,yes) ;; # shared object as lib.so file only - yes,svr4,*) ;; # shared object as lib.so archive member only - yes,*) enable_static=no ;; # shared object in lib.a archive as well - esac - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test yes = "$enable_shared" || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)=$G77 - _LT_TAGVAR(LD, $1)=$LD - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS -fi # test yes != "$_lt_disable_F77" - -AC_LANG_POP -])# _LT_LANG_F77_CONFIG - - -# _LT_LANG_FC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for a Fortran compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_FC_CONFIG], -[AC_LANG_PUSH(Fortran) - -if test -z "$FC" || test no = "$FC"; then - _lt_disable_FC=yes -fi - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for fc test sources. -ac_ext=${ac_fc_srcext-f} - -# Object file extension for compiled fc test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the FC compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test yes != "$_lt_disable_FC"; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_GCC=$GCC - lt_save_CFLAGS=$CFLAGS - CC=${FC-"f95"} - CFLAGS=$FCFLAGS - compiler=$CC - GCC=$ac_cv_fc_compiler_gnu - - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test no = "$can_build_shared" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test yes = "$enable_shared" && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test ia64 != "$host_cpu"; then - case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in - yes,aix,yes) ;; # shared object as lib.so file only - yes,svr4,*) ;; # shared object as lib.so archive member only - yes,*) enable_static=no ;; # shared object in lib.a archive as well - esac - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test yes = "$enable_shared" || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu - _LT_TAGVAR(LD, $1)=$LD - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS -fi # test yes != "$_lt_disable_FC" - -AC_LANG_POP -])# _LT_LANG_FC_CONFIG - - -# _LT_LANG_GCJ_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Java Compiler compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_GCJ_CONFIG], -[AC_REQUIRE([LT_PROG_GCJ])dnl -AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_CFLAGS=$CFLAGS -lt_save_GCC=$GCC -GCC=yes -CC=${GCJ-"gcj"} -CFLAGS=$GCJFLAGS -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)=$LD -_LT_CC_BASENAME([$compiler]) - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -_LT_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_GCJ_CONFIG - - -# _LT_LANG_GO_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Go compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_GO_CONFIG], -[AC_REQUIRE([LT_PROG_GO])dnl -AC_LANG_SAVE - -# Source file extension for Go test sources. -ac_ext=go - -# Object file extension for compiled Go test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="package main; func main() { }" - -# Code to be used in simple link tests -lt_simple_link_test_code='package main; func main() { }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_CFLAGS=$CFLAGS -lt_save_GCC=$GCC -GCC=yes -CC=${GOC-"gccgo"} -CFLAGS=$GOFLAGS -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)=$LD -_LT_CC_BASENAME([$compiler]) - -# Go did not exist at the time GCC didn't implicitly link libc in. -_LT_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_GO_CONFIG - - -# _LT_LANG_RC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for the Windows resource compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_RC_CONFIG], -[AC_REQUIRE([LT_PROG_RC])dnl -AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code=$lt_simple_compile_test_code - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_CFLAGS=$CFLAGS -lt_save_GCC=$GCC -GCC= -CC=${RC-"windres"} -CFLAGS= -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -if test -n "$compiler"; then - : - _LT_CONFIG($1) -fi - -GCC=$lt_save_GCC -AC_LANG_RESTORE -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_RC_CONFIG - - -# LT_PROG_GCJ -# ----------- -AC_DEFUN([LT_PROG_GCJ], -[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], - [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], - [AC_CHECK_TOOL(GCJ, gcj,) - test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS)])])[]dnl -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_GCJ], []) - - -# LT_PROG_GO -# ---------- -AC_DEFUN([LT_PROG_GO], -[AC_CHECK_TOOL(GOC, gccgo,) -]) - - -# LT_PROG_RC -# ---------- -AC_DEFUN([LT_PROG_RC], -[AC_CHECK_TOOL(RC, windres,) -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_RC], []) - - -# _LT_DECL_EGREP -# -------------- -# If we don't have a new enough Autoconf to choose the best grep -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_EGREP], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_REQUIRE([AC_PROG_FGREP])dnl -test -z "$GREP" && GREP=grep -_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) -_LT_DECL([], [EGREP], [1], [An ERE matcher]) -_LT_DECL([], [FGREP], [1], [A literal string matcher]) -dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too -AC_SUBST([GREP]) -]) - - -# _LT_DECL_OBJDUMP -# -------------- -# If we don't have a new enough Autoconf to choose the best objdump -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_OBJDUMP], -[AC_CHECK_TOOL(OBJDUMP, objdump, false) -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) -AC_SUBST([OBJDUMP]) -]) - -# _LT_DECL_DLLTOOL -# ---------------- -# Ensure DLLTOOL variable is set. -m4_defun([_LT_DECL_DLLTOOL], -[AC_CHECK_TOOL(DLLTOOL, dlltool, false) -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) -AC_SUBST([DLLTOOL]) -]) - -# _LT_DECL_SED -# ------------ -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -m4_defun([_LT_DECL_SED], -[AC_PROG_SED -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" -_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) -_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], - [Sed that helps us avoid accidentally triggering echo(1) options like -n]) -])# _LT_DECL_SED - -m4_ifndef([AC_PROG_SED], [ -############################################################ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -############################################################ - -m4_defun([AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f "$lt_ac_sed" && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test 10 -lt "$lt_ac_count" && break - lt_ac_count=`expr $lt_ac_count + 1` - if test "$lt_ac_count" -gt "$lt_ac_max"; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done -]) -SED=$lt_cv_path_SED -AC_SUBST([SED]) -AC_MSG_RESULT([$SED]) -])#AC_PROG_SED -])#m4_ifndef - -# Old name: -AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_SED], []) - - -# _LT_CHECK_SHELL_FEATURES -# ------------------------ -# Find out whether the shell is Bourne or XSI compatible, -# or has some other useful features. -m4_defun([_LT_CHECK_SHELL_FEATURES], -[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi -_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac -_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl -_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl -])# _LT_CHECK_SHELL_FEATURES - - -# _LT_PATH_CONVERSION_FUNCTIONS -# ----------------------------- -# Determine what file name conversion functions should be used by -# func_to_host_file (and, implicitly, by func_to_host_path). These are needed -# for certain cross-compile configurations and native mingw. -m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_MSG_CHECKING([how to convert $build file names to $host format]) -AC_CACHE_VAL(lt_cv_to_host_file_cmd, -[case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 - ;; - esac - ;; - *-*-cygwin* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin - ;; - esac - ;; - * ) # unhandled hosts (and "normal" native builds) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; -esac -]) -to_host_file_cmd=$lt_cv_to_host_file_cmd -AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) -_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], - [0], [convert $build file names to $host format])dnl - -AC_MSG_CHECKING([how to convert $build file names to toolchain format]) -AC_CACHE_VAL(lt_cv_to_tool_file_cmd, -[#assume ordinary cross tools, or native build. -lt_cv_to_tool_file_cmd=func_convert_file_noop -case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 - ;; - esac - ;; -esac -]) -to_tool_file_cmd=$lt_cv_to_tool_file_cmd -AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) -_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], - [0], [convert $build files to toolchain format])dnl -])# _LT_PATH_CONVERSION_FUNCTIONS diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4 deleted file mode 100644 index 94b082976667..000000000000 --- a/m4/ltoptions.m4 +++ /dev/null @@ -1,437 +0,0 @@ -# Helper functions for option handling. -*- Autoconf -*- -# -# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software -# Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 8 ltoptions.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) - - -# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) -# ------------------------------------------ -m4_define([_LT_MANGLE_OPTION], -[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) - - -# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) -# --------------------------------------- -# Set option OPTION-NAME for macro MACRO-NAME, and if there is a -# matching handler defined, dispatch to it. Other OPTION-NAMEs are -# saved as a flag. -m4_define([_LT_SET_OPTION], -[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl -m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), - _LT_MANGLE_DEFUN([$1], [$2]), - [m4_warning([Unknown $1 option '$2'])])[]dnl -]) - - -# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) -# ------------------------------------------------------------ -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -m4_define([_LT_IF_OPTION], -[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) - - -# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) -# ------------------------------------------------------- -# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME -# are set. -m4_define([_LT_UNLESS_OPTIONS], -[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), - [m4_define([$0_found])])])[]dnl -m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 -])[]dnl -]) - - -# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) -# ---------------------------------------- -# OPTION-LIST is a space-separated list of Libtool options associated -# with MACRO-NAME. If any OPTION has a matching handler declared with -# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about -# the unknown option and exit. -m4_defun([_LT_SET_OPTIONS], -[# Set options -m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [_LT_SET_OPTION([$1], _LT_Option)]) - -m4_if([$1],[LT_INIT],[ - dnl - dnl Simply set some default values (i.e off) if boolean options were not - dnl specified: - _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no - ]) - _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no - ]) - dnl - dnl If no reference was made to various pairs of opposing options, then - dnl we run the default mode handler for the pair. For example, if neither - dnl 'shared' nor 'disable-shared' was passed, we enable building of shared - dnl archives by default: - _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) - _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], - [_LT_ENABLE_FAST_INSTALL]) - _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], - [_LT_WITH_AIX_SONAME([aix])]) - ]) -])# _LT_SET_OPTIONS - - -## --------------------------------- ## -## Macros to handle LT_INIT options. ## -## --------------------------------- ## - -# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) -# ----------------------------------------- -m4_define([_LT_MANGLE_DEFUN], -[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) - - -# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) -# ----------------------------------------------- -m4_define([LT_OPTION_DEFINE], -[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl -])# LT_OPTION_DEFINE - - -# dlopen -# ------ -LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes -]) - -AU_DEFUN([AC_LIBTOOL_DLOPEN], -[_LT_SET_OPTION([LT_INIT], [dlopen]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the 'dlopen' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) - - -# win32-dll -# --------- -# Declare package support for building win32 dll's. -LT_OPTION_DEFINE([LT_INIT], [win32-dll], -[enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -esac - -test -z "$AS" && AS=as -_LT_DECL([], [AS], [1], [Assembler program])dnl - -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl - -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl -])# win32-dll - -AU_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -_LT_SET_OPTION([LT_INIT], [win32-dll]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the 'win32-dll' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) - - -# _LT_ENABLE_SHARED([DEFAULT]) -# ---------------------------- -# implement the --enable-shared flag, and supports the 'shared' and -# 'disable-shared' LT_INIT options. -# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. -m4_define([_LT_ENABLE_SHARED], -[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([shared], - [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS=$lt_save_ifs - ;; - esac], - [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) - - _LT_DECL([build_libtool_libs], [enable_shared], [0], - [Whether or not to build shared libraries]) -])# _LT_ENABLE_SHARED - -LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) -]) - -AC_DEFUN([AC_DISABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], [disable-shared]) -]) - -AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_SHARED], []) -dnl AC_DEFUN([AM_DISABLE_SHARED], []) - - - -# _LT_ENABLE_STATIC([DEFAULT]) -# ---------------------------- -# implement the --enable-static flag, and support the 'static' and -# 'disable-static' LT_INIT options. -# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. -m4_define([_LT_ENABLE_STATIC], -[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([static], - [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS=$lt_save_ifs - ;; - esac], - [enable_static=]_LT_ENABLE_STATIC_DEFAULT) - - _LT_DECL([build_old_libs], [enable_static], [0], - [Whether or not to build static libraries]) -])# _LT_ENABLE_STATIC - -LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) -]) - -AC_DEFUN([AC_DISABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], [disable-static]) -]) - -AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_STATIC], []) -dnl AC_DEFUN([AM_DISABLE_STATIC], []) - - - -# _LT_ENABLE_FAST_INSTALL([DEFAULT]) -# ---------------------------------- -# implement the --enable-fast-install flag, and support the 'fast-install' -# and 'disable-fast-install' LT_INIT options. -# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. -m4_define([_LT_ENABLE_FAST_INSTALL], -[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([fast-install], - [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS=$lt_save_ifs - ;; - esac], - [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) - -_LT_DECL([fast_install], [enable_fast_install], [0], - [Whether or not to optimize for fast installation])dnl -])# _LT_ENABLE_FAST_INSTALL - -LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) - -# Old names: -AU_DEFUN([AC_ENABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the 'fast-install' option into LT_INIT's first parameter.]) -]) - -AU_DEFUN([AC_DISABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the 'disable-fast-install' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) -dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) - - -# _LT_WITH_AIX_SONAME([DEFAULT]) -# ---------------------------------- -# implement the --with-aix-soname flag, and support the `aix-soname=aix' -# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT -# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. -m4_define([_LT_WITH_AIX_SONAME], -[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl -shared_archive_member_spec= -case $host,$enable_shared in -power*-*-aix[[5-9]]*,yes) - AC_MSG_CHECKING([which variant of shared library versioning to provide]) - AC_ARG_WITH([aix-soname], - [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], - [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], - [case $withval in - aix|svr4|both) - ;; - *) - AC_MSG_ERROR([Unknown argument to --with-aix-soname]) - ;; - esac - lt_cv_with_aix_soname=$with_aix_soname], - [AC_CACHE_VAL([lt_cv_with_aix_soname], - [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) - with_aix_soname=$lt_cv_with_aix_soname]) - AC_MSG_RESULT([$with_aix_soname]) - if test aix != "$with_aix_soname"; then - # For the AIX way of multilib, we name the shared archive member - # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', - # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. - # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, - # the AIX toolchain works better with OBJECT_MODE set (default 32). - if test 64 = "${OBJECT_MODE-32}"; then - shared_archive_member_spec=shr_64 - else - shared_archive_member_spec=shr - fi - fi - ;; -*) - with_aix_soname=aix - ;; -esac - -_LT_DECL([], [shared_archive_member_spec], [0], - [Shared archive member basename, for filename based shared library versioning on AIX])dnl -])# _LT_WITH_AIX_SONAME - -LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) -LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) -LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) - - -# _LT_WITH_PIC([MODE]) -# -------------------- -# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' -# LT_INIT options. -# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. -m4_define([_LT_WITH_PIC], -[AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [lt_p=${PACKAGE-default} - case $withval in - yes|no) pic_mode=$withval ;; - *) - pic_mode=default - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for lt_pkg in $withval; do - IFS=$lt_save_ifs - if test "X$lt_pkg" = "X$lt_p"; then - pic_mode=yes - fi - done - IFS=$lt_save_ifs - ;; - esac], - [pic_mode=m4_default([$1], [default])]) - -_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl -])# _LT_WITH_PIC - -LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) - -# Old name: -AU_DEFUN([AC_LIBTOOL_PICMODE], -[_LT_SET_OPTION([LT_INIT], [pic-only]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the 'pic-only' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) - -## ----------------- ## -## LTDL_INIT Options ## -## ----------------- ## - -m4_define([_LTDL_MODE], []) -LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], - [m4_define([_LTDL_MODE], [nonrecursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [recursive], - [m4_define([_LTDL_MODE], [recursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [subproject], - [m4_define([_LTDL_MODE], [subproject])]) - -m4_define([_LTDL_TYPE], []) -LT_OPTION_DEFINE([LTDL_INIT], [installable], - [m4_define([_LTDL_TYPE], [installable])]) -LT_OPTION_DEFINE([LTDL_INIT], [convenience], - [m4_define([_LTDL_TYPE], [convenience])]) diff --git a/m4/ltsugar.m4 b/m4/ltsugar.m4 deleted file mode 100644 index 48bc9344a4d6..000000000000 --- a/m4/ltsugar.m4 +++ /dev/null @@ -1,124 +0,0 @@ -# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- -# -# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software -# Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 6 ltsugar.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) - - -# lt_join(SEP, ARG1, [ARG2...]) -# ----------------------------- -# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their -# associated separator. -# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier -# versions in m4sugar had bugs. -m4_define([lt_join], -[m4_if([$#], [1], [], - [$#], [2], [[$2]], - [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) -m4_define([_lt_join], -[m4_if([$#$2], [2], [], - [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) - - -# lt_car(LIST) -# lt_cdr(LIST) -# ------------ -# Manipulate m4 lists. -# These macros are necessary as long as will still need to support -# Autoconf-2.59, which quotes differently. -m4_define([lt_car], [[$1]]) -m4_define([lt_cdr], -[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], - [$#], 1, [], - [m4_dquote(m4_shift($@))])]) -m4_define([lt_unquote], $1) - - -# lt_append(MACRO-NAME, STRING, [SEPARATOR]) -# ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. -# Note that neither SEPARATOR nor STRING are expanded; they are appended -# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). -# No SEPARATOR is output if MACRO-NAME was previously undefined (different -# than defined and empty). -# -# This macro is needed until we can rely on Autoconf 2.62, since earlier -# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. -m4_define([lt_append], -[m4_define([$1], - m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) - - - -# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) -# ---------------------------------------------------------- -# Produce a SEP delimited list of all paired combinations of elements of -# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list -# has the form PREFIXmINFIXSUFFIXn. -# Needed until we can rely on m4_combine added in Autoconf 2.62. -m4_define([lt_combine], -[m4_if(m4_eval([$# > 3]), [1], - [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl -[[m4_foreach([_Lt_prefix], [$2], - [m4_foreach([_Lt_suffix], - ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, - [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) - - -# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) -# ----------------------------------------------------------------------- -# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited -# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. -m4_define([lt_if_append_uniq], -[m4_ifdef([$1], - [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], - [lt_append([$1], [$2], [$3])$4], - [$5])], - [lt_append([$1], [$2], [$3])$4])]) - - -# lt_dict_add(DICT, KEY, VALUE) -# ----------------------------- -m4_define([lt_dict_add], -[m4_define([$1($2)], [$3])]) - - -# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) -# -------------------------------------------- -m4_define([lt_dict_add_subkey], -[m4_define([$1($2:$3)], [$4])]) - - -# lt_dict_fetch(DICT, KEY, [SUBKEY]) -# ---------------------------------- -m4_define([lt_dict_fetch], -[m4_ifval([$3], - m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), - m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) - - -# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) -# ----------------------------------------------------------------- -m4_define([lt_if_dict_fetch], -[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], - [$5], - [$6])]) - - -# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) -# -------------------------------------------------------------- -m4_define([lt_dict_filter], -[m4_if([$5], [], [], - [lt_join(m4_quote(m4_default([$4], [[, ]])), - lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), - [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl -]) diff --git a/m4/ltversion.m4 b/m4/ltversion.m4 deleted file mode 100644 index fa04b52a3bf8..000000000000 --- a/m4/ltversion.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# ltversion.m4 -- version numbers -*- Autoconf -*- -# -# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# @configure_input@ - -# serial 4179 ltversion.m4 -# This file is part of GNU Libtool - -m4_define([LT_PACKAGE_VERSION], [2.4.6]) -m4_define([LT_PACKAGE_REVISION], [2.4.6]) - -AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.4.6' -macro_revision='2.4.6' -_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) -_LT_DECL(, macro_revision, 0) -]) diff --git a/m4/lt~obsolete.m4 b/m4/lt~obsolete.m4 deleted file mode 100644 index c6b26f88f6c3..000000000000 --- a/m4/lt~obsolete.m4 +++ /dev/null @@ -1,99 +0,0 @@ -# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- -# -# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software -# Foundation, Inc. -# Written by Scott James Remnant, 2004. -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 5 lt~obsolete.m4 - -# These exist entirely to fool aclocal when bootstrapping libtool. -# -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), -# which have later been changed to m4_define as they aren't part of the -# exported API, or moved to Autoconf or Automake where they belong. -# -# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN -# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us -# using a macro with the same name in our local m4/libtool.m4 it'll -# pull the old libtool.m4 in (it doesn't see our shiny new m4_define -# and doesn't know about Autoconf macros at all.) -# -# So we provide this file, which has a silly filename so it's always -# included after everything else. This provides aclocal with the -# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything -# because those macros already exist, or will be overwritten later. -# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. -# -# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. -# Yes, that means every name once taken will need to remain here until -# we give up compatibility with versions before 1.7, at which point -# we need to keep only those names which we still refer to. - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) - -m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) -m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) -m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) -m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) -m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) -m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) -m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) -m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) -m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) -m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) -m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) -m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) -m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) -m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) -m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) -m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) -m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) -m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) -m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) -m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) -m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) -m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) -m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) -m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) -m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) -m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) -m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) -m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) -m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) -m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) -m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) -m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) -m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) -m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) -m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) -m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) -m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) -m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) -m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) -m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) -m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) -m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) -m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) -m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) -m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) -m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) -m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) -m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) -m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) -m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) diff --git a/m4/pkg.m4 b/m4/pkg.m4 deleted file mode 100644 index 4688002e4876..000000000000 --- a/m4/pkg.m4 +++ /dev/null @@ -1,275 +0,0 @@ -dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -dnl serial 11 (pkg-config-0.29) -dnl -dnl Copyright © 2004 Scott James Remnant . -dnl Copyright © 2012-2015 Dan Nicholson -dnl -dnl This program is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU General Public License as published by -dnl the Free Software Foundation; either version 2 of the License, or -dnl (at your option) any later version. -dnl -dnl This program is distributed in the hope that it will be useful, but -dnl WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl General Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License -dnl along with this program; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -dnl 02111-1307, USA. -dnl -dnl As a special exception to the GNU General Public License, if you -dnl distribute this file as part of a program that contains a -dnl configuration script generated by Autoconf, you may include it under -dnl the same distribution terms that you use for the rest of that -dnl program. - -dnl PKG_PREREQ(MIN-VERSION) -dnl ----------------------- -dnl Since: 0.29 -dnl -dnl Verify that the version of the pkg-config macros are at least -dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's -dnl installed version of pkg-config, this checks the developer's version -dnl of pkg.m4 when generating configure. -dnl -dnl To ensure that this macro is defined, also add: -dnl m4_ifndef([PKG_PREREQ], -dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) -dnl -dnl See the "Since" comment for each macro you use to see what version -dnl of the macros you require. -m4_defun([PKG_PREREQ], -[m4_define([PKG_MACROS_VERSION], [0.29]) -m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, - [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) -])dnl PKG_PREREQ - -dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) -dnl ---------------------------------- -dnl Since: 0.16 -dnl -dnl Search for the pkg-config tool and set the PKG_CONFIG variable to -dnl first found in the path. Checks that the version of pkg-config found -dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is -dnl used since that's the first version where most current features of -dnl pkg-config existed. -AC_DEFUN([PKG_PROG_PKG_CONFIG], -[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) -m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) -m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) -AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) -AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) -AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) - -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=m4_default([$1], [0.9.0]) - AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - PKG_CONFIG="" - fi -fi[]dnl -])dnl PKG_PROG_PKG_CONFIG - -dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -dnl ------------------------------------------------------------------- -dnl Since: 0.18 -dnl -dnl Check to see whether a particular set of modules exists. Similar to -dnl PKG_CHECK_MODULES(), but does not set variables or print errors. -dnl -dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -dnl only at the first occurence in configure.ac, so if the first place -dnl it's called might be skipped (such as if it is within an "if", you -dnl have to call PKG_CHECK_EXISTS manually -AC_DEFUN([PKG_CHECK_EXISTS], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -if test -n "$PKG_CONFIG" && \ - AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then - m4_default([$2], [:]) -m4_ifvaln([$3], [else - $3])dnl -fi]) - -dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) -dnl --------------------------------------------- -dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting -dnl pkg_failed based on the result. -m4_define([_PKG_CONFIG], -[if test -n "$$1"; then - pkg_cv_[]$1="$$1" - elif test -n "$PKG_CONFIG"; then - PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes ], - [pkg_failed=yes]) - else - pkg_failed=untried -fi[]dnl -])dnl _PKG_CONFIG - -dnl _PKG_SHORT_ERRORS_SUPPORTED -dnl --------------------------- -dnl Internal check to see if pkg-config supports short errors. -AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi[]dnl -])dnl _PKG_SHORT_ERRORS_SUPPORTED - - -dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -dnl [ACTION-IF-NOT-FOUND]) -dnl -------------------------------------------------------------- -dnl Since: 0.4.0 -dnl -dnl Note that if there is a possibility the first call to -dnl PKG_CHECK_MODULES might not happen, you should be sure to include an -dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac -AC_DEFUN([PKG_CHECK_MODULES], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl -AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl - -pkg_failed=no -AC_MSG_CHECKING([for $1]) - -_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) -_PKG_CONFIG([$1][_LIBS], [libs], [$2]) - -m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS -and $1[]_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details.]) - -if test $pkg_failed = yes; then - AC_MSG_RESULT([no]) - _PKG_SHORT_ERRORS_SUPPORTED - if test $_pkg_short_errors_supported = yes; then - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` - else - $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD - - m4_default([$4], [AC_MSG_ERROR( -[Package requirements ($2) were not met: - -$$1_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -_PKG_TEXT])[]dnl - ]) -elif test $pkg_failed = untried; then - AC_MSG_RESULT([no]) - m4_default([$4], [AC_MSG_FAILURE( -[The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -_PKG_TEXT - -To get pkg-config, see .])[]dnl - ]) -else - $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS - $1[]_LIBS=$pkg_cv_[]$1[]_LIBS - AC_MSG_RESULT([yes]) - $3 -fi[]dnl -])dnl PKG_CHECK_MODULES - - -dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -dnl [ACTION-IF-NOT-FOUND]) -dnl --------------------------------------------------------------------- -dnl Since: 0.29 -dnl -dnl Checks for existence of MODULES and gathers its build flags with -dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags -dnl and VARIABLE-PREFIX_LIBS from --libs. -dnl -dnl Note that if there is a possibility the first call to -dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to -dnl include an explicit call to PKG_PROG_PKG_CONFIG in your -dnl configure.ac. -AC_DEFUN([PKG_CHECK_MODULES_STATIC], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -_save_PKG_CONFIG=$PKG_CONFIG -PKG_CONFIG="$PKG_CONFIG --static" -PKG_CHECK_MODULES($@) -PKG_CONFIG=$_save_PKG_CONFIG[]dnl -])dnl PKG_CHECK_MODULES_STATIC - - -dnl PKG_INSTALLDIR([DIRECTORY]) -dnl ------------------------- -dnl Since: 0.27 -dnl -dnl Substitutes the variable pkgconfigdir as the location where a module -dnl should install pkg-config .pc files. By default the directory is -dnl $libdir/pkgconfig, but the default can be changed by passing -dnl DIRECTORY. The user can override through the --with-pkgconfigdir -dnl parameter. -AC_DEFUN([PKG_INSTALLDIR], -[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) -m4_pushdef([pkg_description], - [pkg-config installation directory @<:@]pkg_default[@:>@]) -AC_ARG_WITH([pkgconfigdir], - [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, - [with_pkgconfigdir=]pkg_default) -AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) -m4_popdef([pkg_default]) -m4_popdef([pkg_description]) -])dnl PKG_INSTALLDIR - - -dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) -dnl -------------------------------- -dnl Since: 0.27 -dnl -dnl Substitutes the variable noarch_pkgconfigdir as the location where a -dnl module should install arch-independent pkg-config .pc files. By -dnl default the directory is $datadir/pkgconfig, but the default can be -dnl changed by passing DIRECTORY. The user can override through the -dnl --with-noarch-pkgconfigdir parameter. -AC_DEFUN([PKG_NOARCH_INSTALLDIR], -[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) -m4_pushdef([pkg_description], - [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) -AC_ARG_WITH([noarch-pkgconfigdir], - [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, - [with_noarch_pkgconfigdir=]pkg_default) -AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) -m4_popdef([pkg_default]) -m4_popdef([pkg_description]) -])dnl PKG_NOARCH_INSTALLDIR - - -dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, -dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -dnl ------------------------------------------- -dnl Since: 0.28 -dnl -dnl Retrieves the value of the pkg-config variable for the given module. -AC_DEFUN([PKG_CHECK_VAR], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl - -_PKG_CONFIG([$1], [variable="][$3]["], [$2]) -AS_VAR_COPY([$1], [pkg_cv_][$1]) - -AS_VAR_IF([$1], [""], [$5], [$4])dnl -])dnl PKG_CHECK_VAR diff --git a/m4/sfcgal.m4 b/m4/sfcgal.m4 deleted file mode 100644 index 2152cdf9b919..000000000000 --- a/m4/sfcgal.m4 +++ /dev/null @@ -1,165 +0,0 @@ -dnl *************************************************************************** -dnl -dnl Project: GDAL -dnl Purpose: Test for SFCGAL library presence -dnl Author: Avyav Kumar Singh, avyavkumar@gmail.com -dnl Ideas borrowed from the old GDAL test and from the m4 file -dnl gdal/m4/geos.m4 written by Andrey Kiselev for GEOS originally -dnl -dnl *************************************************************************** -dnl Copyright (c) 2016, Avyav Kumar Singh -dnl -dnl Permission is hereby granted, free of charge, to any person obtaining a -dnl copy of this software and associated documentation files (the "Software"), -dnl to deal in the Software without restriction, including without limitation -dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, -dnl and/or sell copies of the Software, and to permit persons to whom the -dnl Software is furnished to do so, subject to the following conditions: -dnl -dnl The above copyright notice and this permission notice shall be included -dnl in all copies or substantial portions of the Software. -dnl -dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -dnl DEALINGS IN THE SOFTWARE. -dnl *************************************************************************** - -dnl -dnl SFCGAL_INIT (MINIMUM_VERSION) -dnl -dnl Test for SFCGAL: define HAVE_SFCGAL, SFCGAL_LIBS, SFCGAL_CFLAGS, SFCGAL_VERSION -dnl -dnl Call as SFCGAL_INIT or SFCGAL_INIT(minimum version) in configure.ac. Test -dnl HAVE_SFCGAL (yes|no) afterwards. If yes, all other vars above can be -dnl used in program. -dnl - -AC_DEFUN([SFCGAL_INIT],[ - AC_SUBST(SFCGAL_LIBS) - AC_SUBST(SFCGAL_CFLAGS) - AC_SUBST(HAVE_SFCGAL) - AC_SUBST(SFCGAL_VERSION) - - AC_ARG_WITH(sfcgal, - AS_HELP_STRING([--with-sfcgal[=ARG]], - [Include SFCGAL support (ARG=yes, no or sfcgal-config path)]),,) - - ac_sfcgal_config_auto=no - - if test x"$with_sfcgal" = x"no" ; then - - AC_MSG_RESULT([SFCGAL support disabled]) - HAVE_SFCGAL=no - SFCGAL_CONFIG=no - - elif test x"$with_sfcgal" = x"yes" -o x"$with_sfcgal" = x"" ; then - - AC_PATH_PROG(SFCGAL_CONFIG, sfcgal-config, no) - if test x"$with_sfcgal" = x"" ; then - ac_sfcgal_config_auto=yes - fi - - else - - ac_sfcgal_config=`basename "$with_sfcgal"` - ac_sfcgal_config_dir=`AS_DIRNAME(["$with_sfcgal"])` - - AC_CHECK_PROG( - SFCGAL_CONFIG, - "$ac_sfcgal_config", - $with_sfcgal, - [no], - ["$ac_sfcgal_config_dir"], - [] - ) - - fi - - if test x"$SFCGAL_CONFIG" != x"no" ; then - - min_sfcgal_version=ifelse([$1], ,1.2.2,$1) - - AC_MSG_CHECKING(for SFCGAL version >= $min_sfcgal_version) - - sfcgal_major_version=`$SFCGAL_CONFIG --version | \ - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` - sfcgal_minor_version=`$SFCGAL_CONFIG --version | \ - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'` - sfcgal_micro_version=`$SFCGAL_CONFIG --version | \ - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'` - - req_major=`echo $min_sfcgal_version | \ - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` - req_minor=`echo $min_sfcgal_version | \ - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'` - req_micro=`echo $min_sfcgal_version | \ - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'` - - version_ok="no" - ac_req_version=`expr $req_major \* 100000 \+ $req_minor \* 100 \+ $req_micro` - ac_sfcgal_version=`expr $sfcgal_major_version \* 100000 \+ $sfcgal_minor_version \* 100 \+ $sfcgal_micro_version` - - if test $ac_req_version -le $ac_sfcgal_version; then - version_ok="yes" - AC_MSG_RESULT([yes]) - fi - - if test $version_ok = "no"; then - - HAVE_SFCGAL="no" - AC_MSG_RESULT(no) - - if test $ac_sfcgal_config_auto = "yes" ; then - AC_MSG_WARN([SFCGAL was found on your system, but sfcgal-config reports version ${sfcgal_major_version}.${sfcgal_minor_version}.${sfcgal_micro_version}, need at least $min_sfcgal_version. SFCGAL support disabled.]) - else - AC_MSG_ERROR([sfcgal-config reports version ${sfcgal_major_version}.${sfcgal_minor_version}.${sfcgal_micro_version}, need at least $min_sfcgal_version or configure --without-sfcgal]) - fi - - else - - HAVE_SFCGAL="no" - - SFCGAL_LIBS="`${SFCGAL_CONFIG} --libs`" - SFCGAL_CFLAGS="`${SFCGAL_CONFIG} --cflags`" - SFCGAL_VERSION="`${SFCGAL_CONFIG} --version`" - - ax_save_LIBS="${LIBS}" - LIBS=${SFCGAL_LIBS} - ax_save_CFLAGS="${CFLAGS}" - CFLAGS="${SFCGAL_CFLAGS} ${CFLAGS}" - - AC_CHECK_LIB([SFCGAL], - [sfcgal_version], - [HAVE_SFCGAL="yes"], - [HAVE_SFCGAL="no"], - [] - ) - - - if test x"$HAVE_SFCGAL" = "xno"; then - if test $ac_sfcgal_config_auto = "yes" ; then - AC_MSG_WARN([SFCGAL was found on your system, but the library could not be linked. SFCGAL support disabled.]) - else - AC_MSG_ERROR([SFCGAL library could not be linked]) - fi - - SFCGAL_CFLAGS="" - fi - - CFLAGS="${ax_save_CFLAGS}" - LIBS="${ax_save_LIBS}" - - fi - - else - - if test x"$with_sfcgal" != x"no" -a x"$with_sfcgal" != x ; then - AC_MSG_ERROR([SFCGAL support explicitly enabled, but sfcgal-config could not be found]) - fi - - fi -]) diff --git a/makefile.vc b/makefile.vc deleted file mode 100644 index 3937c0184454..000000000000 --- a/makefile.vc +++ /dev/null @@ -1,277 +0,0 @@ -GDAL_ROOT = . - -!INCLUDE nmake.opt - -!IF !DEFINED(PROJ_INCLUDE) -!ERROR PROJ_INCLUDE should be defined. PROJ >= 6 is a required dependency -!ENDIF - -############################################################################## -# The following determines whether we are linking all the OGR formats -# into the DLL, or only the minimum spatial reference related stuff required -# for a raster-gdal build. - -#OGR_BASE_INCLUDE = /INCLUDE:_OCTNewCoordinateTransformation@8 \ -# /INCLUDE:_OSRValidate@4 \ -# /INCLUDE:_OGR_G_GetPointCount@4 - -OGR_BASE_INCLUDE = /INCLUDE:$(SYM_PREFIX)OSRValidate \ - /INCLUDE:$(SYM_PREFIX)OGR_G_GetPointCount - - -OGR_OBJ = ogr\ogrsf_frmts\ogrsf_frmts.lib ogr\ogr.lib -OGR_INCLUDE = $(OGR_BASE_INCLUDE) \ - /INCLUDE:$(SYM_PREFIX)OGRRegisterAll - -!IFDEF INCLUDE_GNM_FRMTS -CPPFLAGS = $(CPPFLAGS) -DGNM_ENABLED -!ENDIF - -!IF DEFINED(STDCALL) && !DEFINED(WIN64) - -BASE_INCLUDE = /INCLUDE:_GDALSimpleImageWarp@36 \ - /INCLUDE:_GDALReprojectImage@48 \ - /INCLUDE:_GDALComputeMedianCutPCT@32 \ - /INCLUDE:_GDALDitherRGB2PCT@28 \ - /INCLUDE:_OCTNewCoordinateTransformation@8 -!ELSE -BASE_INCLUDE = /INCLUDE:$(SYM_PREFIX)GDALSimpleImageWarp \ - /INCLUDE:$(SYM_PREFIX)GDALReprojectImage \ - /INCLUDE:$(SYM_PREFIX)GDALComputeMedianCutPCT \ - /INCLUDE:$(SYM_PREFIX)GDALDitherRGB2PCT \ - /INCLUDE:$(SYM_PREFIX)OCTNewCoordinateTransformation -!ENDIF - -APPS_OBJ = apps\commonutils.obj apps\gdalinfo_lib.obj apps\gdal_translate_lib.obj apps\gdalwarp_lib.obj apps\ogr2ogr_lib.obj \ - apps\gdaldem_lib.obj apps\nearblack_lib.obj apps\gdal_grid_lib.obj apps\gdal_rasterize_lib.obj apps\gdalbuildvrt_lib.obj \ - apps\gdalmdiminfo_lib.obj apps\gdalmdimtranslate_lib.obj - -LIBOBJ = port\*.obj gcore\*.obj alg\*.obj frmts\o\*.obj $(OGR_OBJ) gnm\*.obj gnm\gnm_frmts\o\*.obj third_party\o\*.obj $(APPS_OBJ) - -LIB_DEPENDS = port_dir core_dir ogr_dir gnm_dir third_party_dir frmts_dir appslib-target - -DISTDIR = gdal_$(VERSION) - -!IF "$(DLLBUILD)" == "1" -TARGET_LIB = dll -PLUGIN_TARGET = plugin_dir -!ELSE -TARGET_LIB = staticlib -!ENDIF - -DEFAULT_TARGETS = - -default: $(TARGET_LIB) $(PLUGIN_TARGET) apps_dir - @echo;Starting with GDAL 3.5, the nmake build system is deprecated in favor of the CMake build system. The nmake build system will be completely removed in GDAL 3.6 - -# Batch commands to clean main build output are stored in a macro so they can be reused by different -# targets in an inline temporary batch file. -# -# We want them to run before creating a DLL or static LIB file, but if they were in a target then -# that target would have to be a dependency of dll or staticlib and would always have to run, making -# the dependent targets "out-of-date". -# -# We don't want to re-link the whole DLL just because we tried to delete a static LIB that didn't -# exist. We also don't want to install a stale DLL in a static build, so we'll remove main build -# output before creating main build output, but not as a target dependency. -CLEAN_MAIN_BUILD_OUTPUT_CMDS = \ -@SETLOCAL EnableExtensions^ -if exist $(GDAL_LIB_NAME) del $(GDAL_LIB_NAME)^ -if exist $(GDAL_DLL) del $(GDAL_DLL)^ -if exist $(GDAL_DLL).manifest del $(GDAL_DLL).manifest^ -if exist *.ilk del *.ilk - -staticlib: $(LIB_DEPENDS) - call <= 6) -#PROJ_INCLUDE = -Id:\install-proj\local\include -# Note: add shell32.lib is needed starting with PROJ 7.0 in some circumstances -# for static linking. See https://github.com/OSGeo/gdal/issues/2488 -# And ole32.lib also since PROJ 7.1 (see https://github.com/OSGeo/gdal/issues/2743) -#PROJ_LIBRARY = d:\install-proj\local\lib\proj_6_0.lib shell32.lib ole32.lib - -# Uncomment to build with libiconv library to support extended character -# recoding capabilities. GDAL's internal stub implementation supports -# latin1<->utf-8 translations only. -# Depending on your libiconv build you may need to set ICONV_CONST macro to -# const or leave it empty. Take a look on your iconv() declaration in iconv.h. -# If the second parameter declared as const char** then you need to define -# ICONV_CONST=const otherwise leave it empty. -#LIBICONV_DIR = "C:\Program Files\GnuWin32" -#LIBICONV_INCLUDE = -I$(LIBICONV_DIR)\include -#LIBICONV_LIBRARY = $(LIBICONV_DIR)\lib\libiconv.lib -#LIBICONV_CFLAGS = -DICONV_CONST=const - -# Comment out the following to disable BSB support. -!IFNDEF BSB_SUPPORTED -BSB_SUPPORTED = 1 -!ENDIF - -# Comment out the following to disable ODBC support. - -!IFNDEF ODBC_SUPPORTED -ODBC_SUPPORTED = 1 -!ENDIF - -# Uncomment out the following to enable plugin with SQL Native Client support for MSSQL Bulk Copy. -#SQLNCLI_VERSION = 11 -#SQLNCLI_DIR = C:\Program Files (x86)\Microsoft SQL Server\$(SQLNCLI_VERSION)0\SDK -#SQLNCLI_LIB = "$(SQLNCLI_DIR)\Lib\x86\sqlncli$(SQLNCLI_VERSION).lib" -#SQLNCLI_INCLUDE = "-I$(SQLNCLI_DIR)\Include" -DSQLNCLI_VERSION=$(SQLNCLI_VERSION) -DMSSQL_BCP_SUPPORTED=1 - -# Uncomment out the following to enable plugin with Microsoft ODBC Driver 17 for SQL Server support for MSSQL Bulk Copy. -#MSODBCSQL_VERSION = 17 -#MSODBCSQL_DIR = C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\$(MSODBCSQL_VERSION)0\SDK -#MSODBCSQL_LIB = "$(MSODBCSQL_DIR)\Lib\x86\msodbcsql$(MSODBCSQL_VERSION).lib" -#MSODBCSQL_INCLUDE = "-I$(MSODBCSQL_DIR)\Include" -DMSODBCSQL_VERSION=$(MSODBCSQL_VERSION) -DMSSQL_BCP_SUPPORTED=1 - -# Comment out the following to disable JPEG support. - -!IFNDEF JPEG_SUPPORTED -JPEG_SUPPORTED = 1 -!ENDIF - -# This will enable 12bit libjpeg, using internal IJG libjpeg-6b in 12-bit mode -# Note: it is possible to have 12bit JPEG support with this internal IJG libjpeg-6b -# and 8bit JPEG support through an external libjpeg, such as libjpeg-turbo -!IFNDEF JPEG12_SUPPORTED -JPEG12_SUPPORTED = 1 -!ENDIF - -#if using an external jpeg library uncomment the following lines -# libjpeg-turbo is also supported (and recommended for better performance) -#JPEG_EXTERNAL_LIB = 1 -#JPEGDIR = c:/projects/jpeg-6b -#JPEG_LIB = $(JPEGDIR)/libjpeg.lib - -#if using an external png library uncomment the following lines -#PNG_EXTERNAL_LIB = 1 -#PNGDIR = c:/projects/libpng-1.0.8 -#PNG_LIB = $(PNGDIR)/libpng.lib - -# if using an external libtiff library. Must be libtiff >= 4.0 -#TIFF_INC = -Ic:/warmerda/libtiff/libtiff -#TIFF_LIB = c:/warmerda/libtiff/libtiff/libtiff_i.lib - -# if using an external libgeotiff library -#GEOTIFF_INC = -Ic:/warmerda/libgeotiff -Ic:/warmerda/libgeotiff/libxtiff -#GEOTIFF_LIB = C:/warmerda/libgeotiff/geotiff_i.lib - -# Uncomment out the following lines to enable LibKML support. -#LIBKML_DIR = C:/Dev/libkml -#LIBKML_INCLUDE = -I$(LIBKML_DIR)/src -I$(LIBKML_DIR)/third_party/boost_1_34_1 -#LIBKML_LIBRARY = $(LIBKML_DIR)/msvc/Release -#LIBKML_LIBS = $(LIBKML_LIBRARY)/libkmlbase.lib \ -# $(LIBKML_LIBRARY)/libkmlconvenience.lib \ -# $(LIBKML_LIBRARY)/libkmldom.lib \ -# $(LIBKML_LIBRARY)/libkmlengine.lib \ -# $(LIBKML_LIBRARY)/libkmlregionator.lib \ -# $(LIBKML_LIBRARY)/libkmlxsd.lib \ -# $(LIBKML_LIBRARY)/minizip_static.lib \ -# $(LIBKML_DIR)/third_party\expat.win32/libexpat.lib \ -# $(LIBKML_DIR)/third_party\uriparser-0.7.5.win32/release/uriparser.lib \ -# $(LIBKML_DIR)/third_party\zlib-1.2.3.win32/lib/minizip.lib \ -# $(LIBKML_DIR)/third_party\zlib-1.2.3.win32/lib/zlib.lib - -# Uncomment the following and update to enable ECW read support with the -# 4.1+ readonly SDK -#ECWDIR = "c:/Program Files/ERDAS/ERDAS ECW JPEG2000 Read SDK" -#ECWFLAGS = -DECWSDK_VERSION=41 \ -# -I$(ECWDIR)\include \ -# -I$(ECWDIR)\include/NCSECW/api -I$(ECWDIR)\include/NCSECW/jp2 \ -# -I$(ECWDIR)\include/NCSECW/ecw -#ECWLIB = $(ECWDIR)\lib\vc90\win32\NCSEcw4_RO.lib \ -# $(ECWDIR)\lib\vc90\win32\NCSUtil4.lib \ -# $(ECWDIR)\lib\vc90\win32\NCScnet4.lib - -# To add Write support, use the write SDK, change NCSEcw4_RO.lib to -# NCSEcw4.lib, and add -DHAVE_COMPRESS to ECWFLAGS. The ECWDIR setting will -# also need some adjustment. - -# Uncomment the following and update to enable ECW read support with the 5.0+ SDK -#!IFNDEF MSVC_VER -#ECW_PLATFORM_TOOLSET_DIR = vc140 -#!ELSEIF $(MSVC_VER) < 1910 -#ECW_PLATFORM_TOOLSET_DIR = vc140 -#!ELSEIF $(MSVC_VER) < 1920 -#ECW_PLATFORM_TOOLSET_DIR = vc141 -#!ELSE -#ECW_PLATFORM_TOOLSET_DIR = vc141 -#!ENDIF - -#!IF "$(DEBUG)" == "1" -#ECW_LIB_DEBUG_SUFFIX = d -#!ENDIF - -#!IF "$(WIN64)" == "1" -#ECW_PLATFORM_DIR = x64 -#!ELSE -#ECW_PLATFORM_DIR = Win32 -#!ENDIF - -#ECWDIR = "C:/Hexagon/ERDAS ECW JPEG 2000 SDK 5.4.0/Desktop Read-Only" -#ECWDIR = "C:/Hexagon/ERDAS ECW JPEG 2000 SDK 5.5.0/Desktop Read-Only" -#ECW_MAJOR_MINOR_VERSION = 55 - -#ECW_INCLUDES = -I$(ECWDIR)/include \ -# -I$(ECWDIR)/include/NCSEcw/API -I$(ECWDIR)/include/NCSEcw/JP2 \ -# -I$(ECWDIR)/include/NCSEcw/ECW - -#ECW_ENABLE_COMPRESSION = -DHAVE_COMPRESS -#ECWFLAGS = -DECWSDK_VERSION=$(ECW_MAJOR_MINOR_VERSION) $(ECW_ENABLE_COMPRESSION) $(ECW_INCLUDES) -#ECWLIB = $(ECWDIR)\lib\$(ECW_PLATFORM_TOOLSET_DIR)\$(ECW_PLATFORM_DIR)\NCSEcw$(ECW_LIB_LINK_SUFFIX).lib - -# To build ECW support as a plugin uncomment the following, and make sure -# to do "nmake /f makefile.vc plugin" in gdal/frmts/ecw and copy the two -# resulting DLLs to an appropriate place. -#ECW_PLUGIN = YES - - -# Uncomment the following and update to enable JP2Lura driver -#LURATECH_CFLAGS = -Ic:\jp2_csdk_2.16_win64\include -#LURATECH_LIB = c:\jp2_csdk_2.16_win64\library\lwf_jp2.lib - -# To build JP2Lura support as a plugin uncomment the following, and make sure -# to do "nmake /f makefile.vc plugin" in gdal/frmts/jp2lura and copy the two -# resulting DLLs to an appropriate place. -#JP2LURA_PLUGIN = YES - - - -# Uncomment the following and update to enable ECW support with the 3.3 SDK. -# Significant adaption may be needed. -#ECWDIR = C:\warmerda\libecwj2-3.3 -#ECWLIB = $(ECWDIR)\Source\NCSBuildQmake\Debug\libecwj2.lib -#ECWFLAGS = -DECWSDK_VERSION=33 \ -# -I$(ECWDIR)\include -I$(ECWDIR)/Source/include \ -# /D_MBCS /D_UNICODE /DUNICODE /D_WINDOWS \ -# /DLIBECWJ2 /DWIN32 /D_WINDLL -DNO_X86_MMI - -# DWG support using the Open Design Alliance Teigha Libraries -# Two versions are supported: -# - ODA >= 2021 (tested with 2021.2), defined immediately -# - Teigha 4.2, see a bit below - -# For ODA >= 2021, you must define appropriately the following variables -# TD_ACTIVATION_FILE_DIRECTORY: path to a directory where the "OdActivationInfo" file is. -# TD_DRAWINGS_BASE: path where the Drawings component is installed (it has among others the Dgn, lib, Kernel and KernelBase subdirectories) -# TD_KERNEL_BASE: path where the Kernel component is installed (it has among others the lib subdirectories) -# TD_PLATFORM: suffix indicating the architecture, compiler version and uild type. For example "vc15dll", "vc15md". This is the suffix found at the end of TD_KERNEL_BASE and TD_DRAWINGS_BASE -# And only when linking against a DLL build of ODA, -# TD_DLL_FLAGS: to uncomment only when linking against a DLL build of ODA. -# -# Example: -# TD_ACTIVATION_FILE_DIRECTORY = C:\dev\oda -# TD_KERNEL_BASE = C:\dev\oda\Kernel_vc15dll -# TD_DRAWINGS_BASE = C:\dev\oda\Drawings_vc15dll -# TD_PLATFORM = vc15dll -# TD_DLL_FLAGS = /D_TOOLKIT_IN_DLL_ - -# Logic to define TD_INCLUDE and TD_LIBS for ODA >= 2020 -!IFDEF TD_PLATFORM -!IFNDEF TD_INCLUDE -TD_INCLUDE = $(TD_DLL_FLAGS)\ - -I$(TD_ACTIVATION_FILE_DIRECTORY) \ - -I$(TD_DRAWINGS_BASE)\KernelBase\Include \ - -I$(TD_DRAWINGS_BASE)\Kernel\Include \ - -I$(TD_DRAWINGS_BASE)\Kernel\Extensions\ExServices \ - -I$(TD_DRAWINGS_BASE)\Drawing\Include \ - -I$(TD_DRAWINGS_BASE)\Drawing\Extensions\ExServices \ - -I$(TD_DRAWINGS_BASE)\Dgn\include \ - -I$(TD_DRAWINGS_BASE)\Dgn\Extensions\ExServices -!ENDIF - -!IFNDEF TD_LIBS -TD_DRAWINGS_LIBDIR = $(TD_DRAWINGS_BASE)\lib\$(TD_PLATFORM) -TD_KERNEL_LIBDIR = $(TD_KERNEL_BASE)\lib\$(TD_PLATFORM) - -TD_LIBS = \ - $(TD_DRAWINGS_LIBDIR)/TD_Db.lib \ - $(TD_DRAWINGS_LIBDIR)/TD_DbCore.lib \ - $(TD_DRAWINGS_LIBDIR)/TD_DbEntities.lib \ - $(TD_DRAWINGS_LIBDIR)/TD_DrawingsExamplesCommon.lib \ - $(TD_DRAWINGS_LIBDIR)/TG_Db.lib \ - $(TD_DRAWINGS_LIBDIR)/TG_ExamplesCommon.lib \ - $(TD_KERNEL_LIBDIR)/TD_Alloc.lib \ - $(TD_KERNEL_LIBDIR)/TD_DbRoot.lib \ - $(TD_KERNEL_LIBDIR)/TD_ExamplesCommon.lib \ - $(TD_KERNEL_LIBDIR)/TD_Ge.lib \ - $(TD_KERNEL_LIBDIR)/TD_Root.lib \ - advapi32.lib - -!IFDEF TD_DLL_FLAGS -# Additional libs specific to ODA DLL builds -TD_LIBS = $(TD_LIBS) \ - $(TD_DRAWINGS_LIBDIR)/TD_Key.lib -!ELSE -# Additional libs specific to ODA static builds -TD_LIBS = $(TD_LIBS) \ - $(TD_KERNEL_LIBDIR)/TD_Gi.lib \ - $(TD_KERNEL_LIBDIR)/tinyxml.lib \ - $(TD_KERNEL_LIBDIR)/TD_Zlib.lib \ - $(TD_DRAWINGS_LIBDIR)/TD_DbIO.lib \ - $(TD_DRAWINGS_LIBDIR)/ISM.lib \ - $(TD_DRAWINGS_LIBDIR)/WipeOut.lib \ - $(TD_DRAWINGS_LIBDIR)/RText.lib \ - $(TD_DRAWINGS_LIBDIR)/ATEXT.lib \ - $(TD_DRAWINGS_LIBDIR)/SCENEOE.lib \ - $(TD_DRAWINGS_LIBDIR)/ACCAMERA.lib \ - $(TD_DRAWINGS_LIBDIR)/AcMPolygonObj15.lib \ - $(TD_KERNEL_LIBDIR)/TD_Gs.lib \ - $(TD_KERNEL_LIBDIR)/TD_SpatialIndex.lib \ - $(TD_KERNEL_LIBDIR)/oless.lib \ - $(TD_KERNEL_LIBDIR)/UTF.lib \ - $(TD_KERNEL_LIBDIR)/WinBitmap.lib \ - $(TD_KERNEL_LIBDIR)/OdBrepModeler.lib \ - $(TD_KERNEL_LIBDIR)/TD_Br.lib \ - $(TD_KERNEL_LIBDIR)/TD_AcisBuilder.lib \ - $(TD_KERNEL_LIBDIR)/TD_BrepBuilder.lib \ - $(TD_KERNEL_LIBDIR)/TD_BrepBuilderFiller.lib \ - $(TD_KERNEL_LIBDIR)/TD_BrepRenderer.lib \ - $(TD_DRAWINGS_LIBDIR)/ModelerGeometry.lib \ - $(TD_DRAWINGS_LIBDIR)/RecomputeDimBlock.lib \ - crypt32.lib \ - secur32.lib \ - user32.lib \ - gdi32.lib \ - ole32.lib -!ENDIF # TD_DLL_FLAGS -!ENDIF # TD_LIBS -!ENDIF # TD_PLATFORM - -# The following works for Teigha 4.2.2 -# In TD_INCLUDE, add /D_TOOLKIT_IN_DLL_ if linking against the .dll -#TD_INCLUDE = -I$(TD_BASE)\Core\Include -I$(TD_BASE)\Core\Extensions\ExServices -I$(TD_BASE)\Dgn\include -I$(TD_BASE)\Dgn\Extensions\ExServices -#TD_LIBDIR = $(TD_BASE)\lib\vc14dll -#TD_LIBS = \ -# $(TD_LIBDIR)/TD_Key.lib \ -# $(TD_LIBDIR)/TD_ExamplesCommon.lib \ -# $(TD_LIBDIR)/TD_Db.lib \ -# $(TD_LIBDIR)/TD_DbRoot.lib \ -# $(TD_LIBDIR)/TD_Root.lib \ -# $(TD_LIBDIR)/TD_Ge.lib \ -# $(TD_LIBDIR)/TD_Alloc.lib \ -# $(TD_LIBDIR)/TG_Db.lib \ -# $(TD_LIBDIR)/TG_ExamplesCommon.lib \ -# advapi32.lib - -# Uncomment to build as a plugin -#TD_PLUGIN = YES - - -# Uncomment the following and update to enable OGDI support. -#OGDIDIR = D:\warmerda\iii\devdir -#OGDI_INCLUDE = $(OGDIDIR)\include\ogdi -#OGDIVER = 31 -#OGDILIB = $(OGDIDIR)\lib\$(TARGET)\ogdi$(OGDIVER).lib \ -# $(OGDIDIR)\lib\$(TARGET)\zlib_ogdi$(OGDIVER).lib - -# Uncomment for Expat support (required for KML, GPX and GeoRSS read support). -#EXPAT_DIR = "C:\Program Files\Expat 2.0.1" -#EXPAT_INCLUDE = -I$(EXPAT_DIR)/source/lib -#EXPAT_LIB = $(EXPAT_DIR)/bin/libexpat.lib - -# Uncomment for Xerces based GML and ILI support. -#XERCES_DIR = c:\warmerda\supportlibs\xerces-c_3_1_3 -#XERCES_INCLUDE = -I$(XERCES_DIR)/include -I$(XERCES_DIR)/include/xercesc -#XERCES_LIB = $(XERCES_DIR)/lib/xerces-c_3.lib - -# Uncomment the following for Interlis support. Note that a Xercex 3.x -# is also required (see above). Also, Interlis support only works with -# Visual Studio.NET or newer, not VC6. -#ILI_ENABLED = YES - -# Uncomment and adjust paths if you have Kakadu 6.0 or newer -# -# Starting with KKDU V7.9.1 (at least), it is possible to generate -# jp2ak and jpipkak with the 2 Kakadu DLLs instead of object files -# In such case : -# o do NOT define KAKOBJDIR -# o define KAKLIB with BOTH Kakadu DLLs -#KAKFLAGS=-DKDU_MAJOR_VERSION=7 -DKDU_MINOR_VERSION=9 -DKDU_PATCH_VERSION=1 -#KAKDIR = C:\0_PGH\SRC_CSD\CSD_INTEGRATION\cots\kakadu\download\dev -#KAKLIB = $(KAKDIR)\lib_x64\kdu_v79R.lib $(KAKDIR)\lib_x64\kdu_a79R.lib -#KAKSRC = $(KAKDIR)\v7_9_1-01156C -#KAKEXTRAINC=-I$(KAKDIR) -#KAKOBJDIR = $(KAKDIR)\v7_generated_x86 -#JP2KAK_PLUGIN = YES -!IFNDEF KAKADU_7_5_OR_LATER -KAKADU_7_5_OR_LATER = YES -!ENDIF - -# Uncomment the following and update to enable NCSA HDF Release 4 support. -#HDF4_PLUGIN = NO -#HDF4_DIR = D:\warmerda\HDF41r5 -#HDF4_LIB = /LIBPATH:$(HDF4_DIR)\lib Ws2_32.lib -#HDF4_INCLUDE = $(HDF4_DIR)\include -# HDF4 library newer than 4.2.5 has a SDreset_maxopenfiles/SDget_maxopenfiles -# interface which allows opening many HDF files simultaneously (the max -# number of files was previously hardcoded and too low, smth. like 32). -# Uncomment following if your library is newer than 4.2.5. -#HDF4_HAS_MAXOPENFILES = YES - -# Uncomment the following and update to enable NCSA HDF Release 5 support. -#HDF5_PLUGIN = NO -#HDF5_DIR = c:\warmerda\supportlibs\hdf5\5-164-win -#HDF5_LIB = $(HDF5_DIR)\dll\hdf5dll.lib - -# Needed to define H5_BUILT_AS_DYNAMIC_LIB for windows compilation -# scenarios where it is not exported on the target (non-CMake builds) -#HDF5_H5_IS_DLL = YES - -# Uncomment the following and update to enable KEA support. -#KEA_PLUGIN = NO -#KEA_CFLAGS = -Ic:\kea\include -#KEA_LIB = c:\kea\libkea.lib - -# Uncomment the following for MrSID support. Only MRSID_DIR is required, -# which may point to a MrSID Raster SDK and -# will auto-configure the mrsid driver as appropriate. -# Other configuration options can be specified to control specific features -# that may be available. See comments at the top of frmts/mrsid/nmake.opt -# for more details. -#MRSID_DIR = d:\projects\mrsid -#MRSID_JP2 = YES - -!IF DEFINED(MRSID_DIR) || DEFINED(MRSID_RASTER_DIR) -!IF EXIST(frmts\mrsid\nmake.opt) -!INCLUDE frmts\mrsid\nmake.opt -!ENDIF -!ENDIF - -# PCIDSK Libraries - default configuration uses internal implementation -PCIDSK_SETTING=INTERNAL -# Replace with these to use an external build. -#PCIDSK_SETTING=EXTERNAL -#PCIDSK_INCLUDE=-I\warmerda\pcidsk\src -#PCIDSK_LIB=\warmerda\pcidsk\src\pcidsk.lib - -# PostGIS Libraries -#PG_INC_DIR = n:\pkg\libpq_win32\include -#PG_LIB = n:\pkg\libpq_win32\lib\libpqdll.lib wsock32.lib - -# MySQL Libraries -# NOTE: Need /MT instead of /MD, also enable /EHsc switch. -#MYSQL_INC_DIR = D:\Software\MySQLServer4.1\include -#MYSQL_LIB = D:\Software\MySQLServer4.1\lib\opt\libmysql.lib advapi32.lib - - -# SQLite Libraries -#SQLITE_INC=-IN:\pkg\sqlite-win32 -#SQLITE_LIB=N:\pkg\sqlite-win32\sqlite3_i.lib -# For spatialite support, try this instead (assuming you grab the libspatialite-amalgamation-2.3.1 and installed it in osgeo4w): -# The -DSPATIALITE_AMALGAMATION, which cause "spatialite/sqlite3.h" to be included instead of "sqlite3.h" might not be necessary -# depending on the layout of the include directories. In case of compilation errors, remove it. -# For RasterLite2 support, add something like -Ic:\install-rl2\include -DHAVE_RASTERLITE2 -#SQLITE_INC=-IC:\osgeo4w\include -DHAVE_SPATIALITE -DSPATIALITE_AMALGAMATION -# For RasterLite2 support, add something like c:\install-rl2\lib\librasterlite2.lib -#SQLITE_LIB=C:\osgeo4w\lib\spatialite_i.lib -# Uncomment following line if libsqlite3 has been compiled with SQLITE_HAS_COLUMN_METADATA=yes -#SQLITE_HAS_COLUMN_METADATA=yes -# Uncomment following line if spatialite is 4.1.2 or later -#SPATIALITE_412_OR_LATER=yes - -# PCRE2 Library (REGEXP support for SQLite) -#PCRE2_INC=-I"C:\dev\install-pcre2\include" -DHAVE_PCRE2 -#PCRE2_LIB="C:\dev\install-pcre2\lib\pcre2-8.lib" - -# Deprecated: PCRE Library (REGEXP support for SQLite) for example from http://sourceforge.net/projects/gnuwin32/files/pcre/7.0/pcre-7.0.exe/download -#PCRE_INC=-I"C:\Program Files\GNUWin32\include" -DHAVE_PCRE -#PCRE_LIB="C:\Program Files\GNUWin32\lib\pcre.lib" - -# Informix Data Blade -#INFORMIXDIR="C:\Program Files\IBM\Informix\Client-SDK" -#IDB_INC=-I$(INFORMIXDIR)\incl\cpp -I$(INFORMIXDIR)\incl\dmi \ -# -I$(INFORMIXDIR)\incl\esql -#IDB_LIB=$(INFORMIXDIR)\lib\cpp\libthc++.lib \ -# $(INFORMIXDIR)\lib\dmi\libthdmi.lib $(INFORMIXDIR)\lib\isqlt09a.lib - -# Uncomment the following to enable FITS format support -#FITS_PLUGIN = NO -#FITS_INC_DIR = c:\dev32\usr\include\cfitsio -#FITS_LIB = c:\dev32\usr\lib\cfitsio.lib - -# Comment out to disable GRIB support. -GRIB_SETTING=yes - -# Uncomment the following to enable NetCDF format. -#NETCDF_PLUGIN = NO -#NETCDF_SETTING=yes -#NETCDF_LIB=C:\Software\netcdf\lib\netcdf.lib -#NETCDF_INC_DIR=C:\Software\netcdf\include - -# Uncomment the following to add NC4 and HDF4 support -#NETCDF_HAS_NC4 = yes -#NETCDF_HAS_HDF4 = yes - -# Uncomment for a version of netcdf with netcdf_mem.h (>= 4.5.0) -#NETCDF_HAS_NETCDF_MEM = yes - -# Add ORACLE support. -# Uncomment the following line to enable OCI Oracle Spatial support. -#ORACLE_HOME = C:/Software/Oracle/Product/10.1.0/db_1 -# Uncomment the following if you prefer to build OCI support as a plugin. -#OCI_PLUGIN = YES - -!IFDEF ORACLE_HOME -!IFNDEF OCI_LIB -OCI_LIB = $(ORACLE_HOME)\oci\lib\msvc\ociw32.lib \ - $(ORACLE_HOME)\oci\lib\msvc\oci.lib -!ENDIF -!IFNDEF OCI_INCLUDE -OCI_INCLUDE = -I$(ORACLE_HOME)\oci\include -!ENDIF -!ENDIF - -#FGDB_ENABLED = YES -#FGDB_PLUGIN = YES -#FGDB_SDK = C:\Users\rburhum\Desktop\FileGDB_API_VS2008_1_0beta3 -#FGDB_INC = $(FGDB_SDK)\include -#FGDB_LIB = $(FGDB_SDK)\lib\FileGDBAPI.lib - -#uncomment to build AmigoCloud as a plugin instead -#AMIGOCLOUD_PLUGIN = YES - - -#uncomment to use ArcObjects -#ARCOBJECTS_ENABLED = YES -#ARCOBJECTS_PLUGIN = YES -#ARCOBJECTS_SDK = C:\PROGRA~2\ArcGIS\com -#ARCOBJECTS_INC = $(ARCOBJECTS_SDK)\..\include -# -#Interestingly, since this is a COM application, we don't link against external libraries, -#but we still need to link the app, so we put the generic user32.lib to force the linking process -#ARCOBJECTS_LIB = user32.lib - - -# Uncomment to use libcurl (DLL by default) -# The cURL library is used for WCS, WMS, GeoJSON, SRS call importFromUrl(), WFS, CouchDB, /vsicurl/ etc. -#CURL_DIR=C:\curl-7.15.0 -#CURL_INC = -I$(CURL_DIR)/include -# Uncomment following line to use libcurl as dynamic library -#CURL_LIB = $(CURL_DIR)/libcurl_imp.lib wsock32.lib wldap32.lib winmm.lib -# Uncomment following two lines to use libcurl as static library -#CURL_LIB = $(CURL_DIR)/libcurl.lib wsock32.lib wldap32.lib winmm.lib -#CURL_CFLAGS = -DCURL_STATICLIB - -# Uncomment for GEOS support (GEOS >= 3.1.0 required) -#GEOS_DIR=C:/warmerda/geos -#GEOS_CFLAGS = -I$(GEOS_DIR)/capi -I$(GEOS_DIR)/source/headers -DHAVE_GEOS -#GEOS_LIB = $(GEOS_DIR)/source/geos_c_i.lib - -# Uncomment for SOSI support -#SOSI_PLUGIN = YES -#SOSI_ENABLED = YES -#SOSI_INC_DIR = e:/sosi -#SOSI_LIBS = e:/sosi/FYBA.lib e:/sosi/GM.lib e:/sosi/UT.lib - -# Uncomment for OpenJpeg (release v2.1 or later) support -#OPENJPEG_ENABLED = YES -# Note that, contrary to GDAL releases <= 2.2.X, this must point to the -# directory where openjpeg.h and opj_config.h are set -#OPENJPEG_CFLAGS = -IC:\openjpeg\include\openjpeg-2.X -#OPENJPEG_LIB = C:\openjpeg\lib\openjp2.lib - -#if using an external zlib uncomment the following lines -#ZLIB_EXTERNAL_LIB = 1 -#ZLIB_INC = -IC:\projects\zlib -#ZLIB_LIB = C:\projects\lib\Release\zlib.lib - -# Uncomment for libdeflate support (still requires zlib in some cases) -#LIBDEFLATE_CFLAGS = -Ie:/dev/install-libdeflate-1.6/include -#LIBDEFLATE_LIB = e:/dev/install-libdeflate-1.6/lib/libdeflate.lib - -# Uncomment for PDF support, and update version numbers (poppler 0.23 or later required) -#POPPLER_ENABLED = YES -#POPPLER_CFLAGS = -Ie:/kde/include -Ie:/kde/include/poppler -#POPPLER_MAJOR_VERSION = 0 -#POPPLER_MINOR_VERSION = 69 -#POPPLER_LIBS = e:/kde/lib/poppler.lib e:/kde/lib/freetype.lib e:/kde/lib/liblcms-1.lib advapi32.lib gdi32.lib - -# Uncomment for PDF support -#PODOFO_ENABLED = YES -#PODOFO_CFLAGS = -Ie:/podofo-svn/install/include -Ie:/podofo-svn/install/include/podofo -#PODOFO_LIBS = e:/podofo-svn/install/lib/podofo.lib E:/release-1500-dev/release-1500/lib/freetype239.lib gdi32.lib - -# Uncomment for PDF support with PDFium -# -# Copyright (C) 2015 Klokan Technologies GmbH (http://www.klokantech.com/) -# Author: Martin Mikita , xmikit00 @ FIT VUT Brno -# Copyright 2019 Even Rouault -# -# Pdfium must be built from https://github.com/rouault/pdfium_build_gdal_3_4 - -#PDFIUM_ENABLED = YES -#PDFIUM_CFLAGS = -IC:\dev\pdfium\install\include\pdfium -#PDFIUM_LIB_DIR = C:\dev\pdfium\install\lib -#PDFIUM_LIBS = $(PDFIUM_LIB_DIR)\pdfium.lib gdi32.lib kernel32.lib user32.lib Advapi32.lib - - -# Build PDF driver as plugin -#PDF_PLUGIN = NO - -# Uncomment for LZMA TIFF support -#LZMA_CFLAGS = -IC:/gdal_trunk/xz-5.0.0-windows/include -#LZMA_LIBS = C:/gdal_trunk/xz-5.0.0-windows/bin_i486/liblzma.lib - -# Uncomment for ZSTD TIFF support -#ZSTD_CFLAGS = -IC:/install-zstd/include -#ZSTD_LIBS = C:/install-zstd/lib/libzstd.lib - -# Uncomment for Blosc support (for Zarr in particular) -#BLOSC_CFLAGS = -IC:/install-blosc/include -#BLOSC_LIBS = C:/install-blosc/lib/libblosc.lib - -# Uncomment for LZ4 support (for Zarr in particular) -#LZ4_CFLAGS = -IC:/install-lz4/include -#LZ4_LIBS = C:/install-lz4/lib/liblz4.lib - -# Uncomment for TileDB support -#TILEDB_ENABLED = YES -# For TileDB >= 2.7, add "/std:c++17" to TILEDB_CFLAGS -#TILEDB_CFLAGS = -IC:/install-tiledb/dist/include -#TILEDB_LIBS = C:/install-tiledb/dist/lib/libtiledb.lib - -# Uncomment for RDB support -#RDB_ENABLED = YES -#RDB_CFLAGS = -IC:\rdb\rdblib-2.2.0-x86_64-windows\interface\cpp -IC:\rdb\rdblib-2.2.0-x86_64-windows\interface\c -#RDB_LIB = C:\rdb\rdblib-2.2.0-x86_64-windows\library\rdblib.lib - -# Uncomment for WEBP support -#WEBP_ENABLED = YES -#WEBP_CFLAGS = -IE:/libwebp-0.1-windows/dev/Include -#WEBP_LIBS = e:/libwebp-0.1-windows/dev/lib/libwebp_a.lib - -# Uncomment for libxml2 support (for cpl_xml_validate.cpp routines, used optionally by the GML driver) -#LIBXML2_INC = -Iz:\home\even\release-1500-dev\release-1500\include -#LIBXML2_LIB = z:\home\even\release-1500-dev\release-1500\lib\libxml2.lib - -# Uncomment for freexl support -# -# Note: Currently there is no MSVC makefile to build freexl. -# Here's the procedure I've followed (from root of freexl source tree) -# cl /c src/freexl.c /Iheaders /IE:\release-1500-dev\release-1500\include /DDLL_EXPORT -# link /dll E:\release-1500-dev\release-1500\lib\iconv.lib freexl.obj /out:freexl.dll /implib:freexl_i.lib -# -#FREEXL_CFLAGS = -Ie:/freexl-1.0.0a/headers -#FREEXL_LIBS = e:/freexl-1.0.0a/freexl_i.lib - -# Uncomment for libgta support -# -#GTA_CFLAGS = -IC:/gdal_trunk/libgta-1.0.0-w32/include -IC:/gdal_trunk/libgta-1.0.0-w32/include/gta -#GTA_LIBS = C:/gdal_trunk/libgta-1.0.0-w32/lib/libgta.dll.a - -# Uncomment for MongoDBv3 support -# Uncomment following line if plugin is preferred -#MONGODBV3_PLUGIN = YES -#BOOST_INC=E:/boost_1_69_0 -#MONGOCXXV3_CFLAGS = -IE:/dev/install-mongocxx-3.4.0/include/mongocxx/v_noabi -IE:/dev/install-mongocxx-3.4.0/include/bsoncxx/v_noabi -#MONGOCXXV3_LIBS = E:/dev/install-mongocxx-3.4.0/lib/mongocxx.lib E:/dev/install-mongocxx-3.4.0/lib/bsoncxx.lib - -# QHull configuration. By default use internal libqhull. -# QHULL_SETTING can be set to INTERNAL, EXTERNAL or NO -# For external qhull, use reentrant qhull 2020.2 or later -!IFNDEF QHULL_SETTING -QHULL_SETTING = INTERNAL -!ENDIF -# To be defined if QHULL_SETTING=EXTERNAL -# QHULL_INC = -I.... -# To be defined if QHULL_SETTING=EXTERNAL -# QHULL_LIB = path_to_libqhull.lib - -# Cryptopp stuff. -# Make sure cryptopp is compiled with /MD ( Properties | Configuration properties | C/C++ | Code Generation | Runtime Library: Multi-threaded DLL (/MD)) -# The headers file must be in $(CRYPTOPP_INC)/cryptopp (the /cryptopp part must not be in the following variable then) -# CRYPTOPP_INC = -Ic:/install-cryptopp-x64/include -# -# Define USE_ONLY_CRYPTODLL_ALG is running against cryptopp.dll, but not if statically linking -# USE_ONLY_CRYPTODLL_ALG=YES -# -# When linking against the DLL: -# CRYPTOPP_LIB = c:/install-cryptopp-x64/lib/cryptopp.lib -# -# When linking against the static lib: -# CRYPTOPP_LIB = c:/install-cryptopp-x64/lib/cryptlib.lib - -# OpenSSL stuff (needed if using curl in multithreaded way, with OpenSSL backend) -# OPENSSL_INC = -Ic:/install-openssl/include -# OPENSSL_LIB = c:/instal-openssl/lib/ssleay32.lib c:/instal-openssl/lib/libeay32.lib crypt32.lib - -# Comment out to disable MRF support. -MRF_SETTING=yes - -# Any extra libraries needed on this platform? -ADD_LIBS = - -# Binding list. One or several in the following list -# csharp, java, python -#BINDINGS=java python - -# Comment out the following if you want to build with Python support, but -# you don't have Numeric Python installed (with include files). Numeric -# integration may not work. This only appears to the old generation -# bindings. -#HAVE_NUMPY=1 - -# Uncomment for external liblerc -# The only use of external liblerc currently is for the LERC codec of internal libtiff -# The MRF driver requires internal liblerc to have LERC capabilities -#HAVE_LERC=external -#LERC_INCLUDE = -Ic:\dev\liblerc\include -#LERC_LIB = c:\dev\liblerc\lib\liblerc.lib - -# Set HAVE_LERC=no to disable LERC support -!IFNDEF HAVE_LERC -HAVE_LERC=internal -!ENDIF - -# Uncomment to build MRF with brunsli support -#BRUNSLI_DIR = C:/brunsli -#BRUNSLI_INC = $(BRUNSLI_DIR)/include -#!IF "$(DEBUG)" == "1" -#BRUNSLI_LIB_DIR = $(BRUNSLI_DIR)/lib/debug -#!ELSE -#BRUNSLI_LIB_DIR = $(BRUNSLI_DIR)/lib -#!ENDIF -#BRUNSLI_LIB = $(BRUNSLI_LIB_DIR)/brunslienc-c.lib $(BRUNSLI_LIB_DIR)/brunslidec-c.lib - -# QB3 in MRF -#QB3_DIR = "C:\Program Files\QB3" -#QB3_INC = $(QB3_DIR)\include -#!IFDEF DEBUG -#QB3_LIB = $(QB3_DIR)\lib\libQB3d.lib -#!ELSE -#QB3_LIB = $(QB3_DIR)\lib\libQB3.lib -#!ENDIF - -# Comment out for DDS driver -#CRUNCH_INC = -Ic:\dev\install-crunch\include\crunch -#CRUNCH_LIB = c:\dev\install-crunch\lib\crunch.lib - -# Comment out for OpenEXR driver -#OPENEXR_INC = -Ic:\dev\install-openexr\include\OpenEXR -DOPENEXR_DLL -#OPENEXR_LIB = c:\dev\install-openexr\lib\IlmImf-2_4.lib c:\dev\install-openexr\lib\Iex-2_4.lib c:\dev\install-openexr\lib\Half-2_4.lib - -# Comment out for HEIF driver -#HEIF_INC = -Ic:\dev\install-libheif\include -#HEIF_LIB = C:\dev\install-libheif\lib\heif.lib - -# Comment out for JXL support (in internal libtiff) -# Add -DHAVE_JxlEncoderFrameSettingsSetOption to JXL_CFLAGS if using a libjxl version > 0.6.1 -#JXL_CFLAGS = -Ic:\dev\install-libjxl\include -#JXL_LIB = C:\dev\install-libjxl\lib\libjxl.lib - -########### END OF STUFF THAT NORMALLY NEEDS TO BE UPDATED ################## - - -# Location of MS Data Access SDK (not really needed anymore I think) -#MSDASDK = D:\Software\MDAC_2.6 - -!IFNDEF GDAL_DLL -GDAL_DLL = gdal$(VERSION)$(POSTFIX).dll -!ENDIF - -INC = -I$(GDAL_ROOT)\port -I$(GDAL_ROOT)\ogr -I$(GDAL_ROOT)\gcore \ - -I$(GDAL_ROOT)\alg -I$(GDAL_ROOT)\ogr\ogrsf_frmts -I$(GDAL_ROOT)\gnm -I$(GDAL_ROOT)\gnm\gnm_frmts -I$(GDAL_ROOT)\apps - -!IFDEF MSVC_VLD_DIR -MSVC_VLD_FLAGS=-DMSVC_USE_VLD=1 -I$(MSVC_VLD_DIR)\include -!IFDEF WIN64 -MSVC_VLD_LIB=/LIBPATH:$(MSVC_VLD_DIR)/lib/Win64 -!ELSE -MSVC_VLD_LIB=/LIBPATH:$(MSVC_VLD_DIR)/lib/Win32 -!ENDIF -!ENDIF - -!IFDEF INCLUDE_GNM_FRMTS -!IFNDEF GNM_FLAG -GNM_FLAG = -DGNM_ENABLED -!ENDIF -!ENDIF - -#LINKER_FLAGS = /NODEFAULTLIB:LIBC -LINKER_FLAGS = $(EXTRA_LINKER_FLAGS) $(MSVC_VLD_LIB) $(LDEBUG) - - -CFLAGS = $(OPTFLAGS) $(WARNFLAGS) $(USER_DEFS) $(SSEFLAGS) $(SSSE3FLAGS) $(INC) $(AVXFLAGS) $(EXTRAFLAGS) $(OGR_FLAG) $(GNM_FLAG) $(MSVC_VLD_FLAGS) -DGDAL_COMPILATION -CPPFLAGS = $(CFLAGS) -DNOMINMAX -MAKE = nmake /nologo - -!IFNDEF CC -CC = cl -!ENDIF - -INSTALL = xcopy /y /r /d /f /I - -CPLLIB = $(GDAL_ROOT)/port/cpl.lib - -!IFNDEF GDAL_LIB_NAME -!IF "$(DLLBUILD)" == "1" -GDAL_LIB_NAME = gdal_i$(POSTFIX).lib -!ELSE -GDAL_LIB_NAME = gdal$(POSTFIX).lib -!ENDIF -!ENDIF - -GDALLIB = $(GDAL_ROOT)\$(GDAL_LIB_NAME) -!IFDEF ODBC_SUPPORTED -# legacy_stdio_definitions.lib : https://connect.microsoft.com/VisualStudio/feedback/details/1134693/vs-2015-ctp-5-c-vsnwprintf-s-and-other-functions-are-not-exported-in-appcrt140-dll-breaking-linkage-of-static-libraries -ODBCLIB = legacy_stdio_definitions.lib odbc32.lib odbccp32.lib user32.lib -!ENDIF - -!IF DEFINED(MRSID_DIR) || DEFINED(MRSID_RASTER_DIR) -!IF "$(MRSID_PLUGIN)" != "YES" -MRSID_LIB_LINK = $(MRSID_LIB) -!ELSE -MRSID_LIB_LINK= -!ENDIF -!ENDIF - -!IFDEF ECWDIR -!IF "$(ECW_PLUGIN)" != "YES" -ECW_LIB_LINK= $(ECWLIB) -!ELSE -ECW_LIB_LINK= -!ENDIF -!ENDIF - -!IFDEF LURATECH_CFLAGS -!IF "$(JP2LURA_PLUGIN)" != "YES" -LURATECH_LIB_LINK= $(LURATECH_LIB) -!ELSE -LURATECH_LIB_LINK= -!ENDIF -!ENDIF - -!IFDEF KAKDIR -!IF "$(JP2KAK_PLUGIN)" != "YES" -KAK_LIB_LINK= $(KAKLIB) -!ELSE -KAK_LIB_LINK= -!ENDIF -!ENDIF - -!IFDEF FITS_LIB -!IF "$(FITS_PLUGIN)" != "YES" -FITS_LIB_LINK = $(FITS_LIB) -!ELSE -FITS_LIB_LINK = -!ENDIF -!ENDIF - -!IFDEF POPPLER_LIBS -!IF "$(PDF_PLUGIN)" != "YES" -PDF_LIB_LINK = $(POPPLER_LIBS) -!ELSE -PDF_LIB_LINK = -!ENDIF -!ENDIF - -!IFDEF PODOFO_LIBS -!IF "$(PDF_PLUGIN)" != "YES" -PDF_LIB_LINK = $(PODOFO_LIBS) -!ELSE -PDF_LIB_LINK = -!ENDIF -!ENDIF - -!IFDEF PDFIUM_LIBS -!IF "$(PDF_PLUGIN)" != "YES" -PDF_LIB_LINK = $(PDFIUM_LIBS) -!ELSE -PDF_LIB_LINK = -!ENDIF -!ENDIF - -!IFDEF NETCDF_LIB -!IF "$(NETCDF_PLUGIN)" != "YES" -NETCDF_LIB_LINK = $(NETCDF_LIB) -!ELSE -NETCDF_LIB_LINK = -!ENDIF -!ENDIF - -!IFDEF HDF4_LIB -!IF "$(HDF4_PLUGIN)" != "YES" -HDF4_LIB_LINK = $(HDF4_LIB) -!ELSE -HDF4_LIB_LINK = -!ENDIF -!ENDIF - -!IFDEF HDF5_LIB -!IF "$(HDF5_PLUGIN)" != "YES" -HDF5_LIB_LINK = $(HDF5_LIB) -!ELSE -HDF5_LIB_LINK = -!ENDIF -!ENDIF - -!IFDEF KEA_LIB -!IF "$(KEA_PLUGIN)" != "YES" -KEA_LIB_LINK = $(KEA_LIB) -!ELSE -KEA_LIB_LINK = -!ENDIF -!ENDIF - -!IFDEF FGDB_LIB -!IF "$(FGDB_PLUGIN)" != "YES" -FGDB_LIB_LINK = $(FGDB_LIB) -!ELSE -FGDB_LIB_LINK = -!ENDIF -!ENDIF - -!IFDEF MONGOCXXV3_CFLAGS -!IF "$(MONGODBV3_PLUGIN)" != "YES" -MONGODBV3_LIB_LINK = $(MONGOCXXV3_LIBS) -!ELSE -MONGODBV3_LIB_LINK = -!ENDIF -!ENDIF - -!IFDEF XERCES_DIR -NAS_ENABLED = YES -!ENDIF - -!IFDEF TD_LIBS -!IF "$(TD_PLUGIN)" != "YES" -DWG_LIB_LINK = $(TD_LIBS) -!ELSE -DWG_LIB_LINK = -!ENDIF -!ENDIF - -# Under win64, symbols for function names lack the underscore prefix -# present on win32. Also the STDCALL calling convention is not used. -!IFDEF WIN64 -!UNDEF STDCALL -!ELSE -SYM_PREFIX=_ -!ENDIF - -EXTERNAL_LIBS = $(OGDILIB) $(XERCES_LIB) $(EXPAT_LIB) $(OCI_LIB) $(PG_LIB) \ - $(KAK_LIB_LINK) $(ECW_LIB_LINK) $(LURATECH_LIB_LINK) $(HDF4_LIB_LINK) $(MRSID_LIB_LINK) \ - $(FITS_LIB_LINK) $(JPEG_LIB) $(NETCDF_LIB_LINK) $(PROJ4_LIB) \ - $(GEOTIFF_LIB) $(TIFF_LIB) $(PROJ_LIBRARY) $(SQLITE_LIB) \ - $(MYSQL_LIB) $(GEOS_LIB) $(HDF5_LIB_LINK) $(KEA_LIB_LINK) $(DWG_LIB_LINK) \ - $(IDB_LIB) $(CURL_LIB) $(PCIDSK_LIB) \ - $(ODBCLIB) $(PNG_LIB) $(ZLIB_LIB) $(LIBDEFLATE_LIB) $(ADD_LIBS) $(OPENJPEG_LIB) \ - $(LIBKML_LIBS) $(SOSI_LIBS) $(PDF_LIB_LINK) $(LZMA_LIBS) $(ZSTD_LIBS) $(BLOSC_LIBS) $(LZ4_LIBS) \ - $(LIBICONV_LIBRARY) $(WEBP_LIBS) $(TILEDB_LIBS) $(FGDB_LIB_LINK) $(FREEXL_LIBS) $(GTA_LIBS) \ - $(LIBXML2_LIB) $(PCRE_LIB) $(PCRE2_LIB) $(MONGODBV3_LIB_LINK) $(CRYPTOPP_LIB) $(OPENSSL_LIB) ws2_32.lib \ - $(RDB_LIB) $(CRUNCH_LIB) $(OPENEXR_LIB) $(HEIF_LIB) $(LERC_LIB) $(JXL_LIB) $(BRUNSLI_LIB) $(QB3_LIB) $(QHULL_LIB) \ - kernel32.lib psapi.lib wbemuuid.lib diff --git a/ogr/GNUmakefile b/ogr/GNUmakefile deleted file mode 100644 index 2b21fd210037..000000000000 --- a/ogr/GNUmakefile +++ /dev/null @@ -1,101 +0,0 @@ - -include ../GDALmake.opt - -include ./file.lst - -INST_H_FILES = ogr_core.h ogr_feature.h ogr_geometry.h ogr_p.h \ - ogr_spatialref.h ogr_srs_api.h ogrsf_frmts/ogrsf_frmts.h \ - ogr_featurestyle.h ogr_api.h ogr_geocoding.h ogr_swq.h ogr_recordbatch.h - -ifeq ($(HAVE_GEOS),yes) -CPPFLAGS := -DHAVE_GEOS=1 $(GEOS_CFLAGS) $(CPPFLAGS) -endif - -ifeq ($(HAVE_SFCGAL),yes) -CPPFLAGS := -DHAVE_SFCGAL=1 $(SFCGAL_CFLAGS) $(CPPFLAGS) -endif - -CXXFLAGS := -DHAVE_MITAB $(CXXFLAGS) - -ifeq ($(HAVE_EXPAT),yes) -CPPFLAGS := -DHAVE_EXPAT $(EXPAT_INCLUDE) $(CPPFLAGS) -endif - -ifeq ($(HAVE_XERCES),yes) -CPPFLAGS := -DHAVE_XERCES $(XERCES_INCLUDE) $(CPPFLAGS) -endif - -ifeq ($(LIBZ_SETTING),internal) -ZLIB_XTRA_OPT = -I../frmts/zlib -else -ZLIB_XTRA_OPT = -endif - -CPPFLAGS := -iquote ogrsf_frmts -iquote ogrsf_frmts/mem -iquote ogrsf_frmts/geojson $(JSON_INCLUDE) -iquote . $(PROJ_INCLUDE) $(PROJ_FLAGS) $(CPPFLAGS) $(ZLIB_XTRA_OPT) - -CXXFLAGS := $(WARN_EFFCPLUSPLUS) $(WARN_OLD_STYLE_CAST) $(CXXFLAGS) - -default: lib - -all: lib - -clean: - rm -f html/* - (cd ogrsf_frmts; $(MAKE) clean) - $(RM) *.o - $(RM) -f test_geo_utils$(EXE) - -very-clean: clean - rm -rf html rtf - -lib: sublibs $(OBJ:.o=.$(OBJ_EXT)) - -$(OBJ): ogr_feature.h ogr_geometry.h ogr_swq.h - -obj: $(OBJ) - -sublibs: - (cd ogrsf_frmts; $(MAKE)) - -docs: - echo "This target does not exist anymore. Use top-level" - -install-docs: - echo "This target does not exist anymore. Use top-level" - -gdalso: $(GDAL_SLIB) - -$(GDAL_SLIB): - (cd ..; $(MAKE) check-lib) - -web-update: docs - echo "This target does not exist anymore. Use top-level" - -install: - for f in $(INST_H_FILES) ; \ - do $(INSTALL_DATA) $$f $(DESTDIR)$(INST_INCLUDE) ; \ - done - -test_geo_utils$(EXE): test_geo_utils.$(OBJ_EXT) ogr_geo_utils.$(OBJ_EXT) - $(LD) $(LDFLAGS) test_geo_utils.$(OBJ_EXT) ogr_geo_utils.$(OBJ_EXT) $(CONFIG_LIBS) -o test_geo_utils$(EXE) - -# The sed substitution below workarounds a bug with gcc 4.1 -O2 (checked on 64bit platforms) -# that produces buggy compiled code. -# Seen on gcc 4.1.2-27ubuntu1 (Ubuntu 10.04) (not the default compiler) and gcc-4.1.2-48.el5 (CentOS 5.5) -# (default compiler...) -# The memset isn't necessary at all with a non-buggy compiler, but I've found -# that it helps gcc 4.1 generating correct code here... -parser: - bison -p swq -d -oswq_parser.cpp swq_parser.y - sed -i.bak "s/yytype_int16 yyssa\[YYINITDEPTH\];/yytype_int16 yyssa[YYINITDEPTH]; \/\* workaround bug with gcc 4.1 -O2 \*\/ memset(yyssa, 0, sizeof(yyssa));/" swq_parser.cpp - sed -i.bak "s/\*yyssp = yystate/\*yyssp = static_cast(yystate)/" swq_parser.cpp - sed -i.bak "s/ \/\* Fall through\. \*\// CPL_FALLTHROUGH/" swq_parser.cpp - sed -i.bak "s/#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)/#define YYSIZE_MAXIMUM static_cast(-1)/" swq_parser.cpp - sed -i.bak "s/(unsigned int) (YYX)/static_cast(YYX)/" swq_parser.cpp - sed -i.bak "s/(char \*) YYSTACK_ALLOC (yymsg_alloc)/static_cast(YYSTACK_ALLOC (yymsg_alloc))/" swq_parser.cpp - sed -i.bak "s/(union yyalloc \*) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize))/static_cast(YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)))/" swq_parser.cpp - sed -i.bak "s/const char \*yyformat = YY_NULLPTR;/const char *yyformat = \"\";/" swq_parser.cpp - rm swq_parser.cpp.bak - -swq_parser.$(OBJ_EXT): swq_parser.cpp - $(CXX) $(GDAL_INCLUDE) $(CXXFLAGS) $(CPPFLAGS) $(NO_LOGICAL_OP_FLAG) -c -o $@ $< diff --git a/ogr/makefile.vc b/ogr/makefile.vc deleted file mode 100644 index dd1f38294c02..000000000000 --- a/ogr/makefile.vc +++ /dev/null @@ -1,74 +0,0 @@ - -LINKFLAGS = /Zi /MTd -EXTRAFLAGS = -DWIN32 -I. -Iogrsf_frmts -Iogrsf_frmts\mem -Iogrsf_frmts\geojson -Iogrsf_frmts\geojson\libjson -I..\frmts\gtiff\libgeotiff $(ZLIB_FLAGS) \ - $(PROJ_FLAGS) $(PROJ_INCLUDE) $(GEOS_CFLAGS) - -GDAL_ROOT = .. - -!INCLUDE ..\nmake.opt - -!IFDEF ZLIB_EXTERNAL_LIB -ZLIB_FLAGS = $(ZLIB_INC) -!ELSE -ZLIB_FLAGS = -I..\frmts\zlib -!ENDIF - -EXTRAFLAGS = $(EXTRAFLAGS) -DHAVE_MITAB - -!IFDEF EXPAT_DIR -EXTRAFLAGS = $(EXTRAFLAGS) $(EXPAT_INCLUDE) -DHAVE_EXPAT -!ENDIF - -!IFDEF XERCES_DIR -EXTRAFLAGS = $(EXTRAFLAGS) $(XERCES_INCLUDE) -DHAVE_XERCES -!ENDIF - -OGR_FRMTS = ogrsf_frmts\ogrsf_frmts.lib ogrsf_frmts\ogrsf_frmts_sup.lib -OBJ_OGR = ogrgeometryfactory.obj ogrpoint.obj ogrcurve.obj ogrsurface.obj ogr_api.obj \ - ogrlinestring.obj ogrtriangle.obj ogrpolygon.obj ogrlinearring.obj \ - ogrutils.obj ogrgeometry.obj ogrgeometrycollection.obj \ - ogrmultipolygon.obj ogrmultilinestring.obj \ - ogrmultipoint.obj ogrcircularstring.obj ogrcompoundcurve.obj \ - ogrcurvepolygon.obj ogrtriangulatedsurface.obj ogrcurvecollection.obj ogrmultisurface.obj \ - ogrmulticurve.obj ogrpolyhedralsurface.obj ogrfeature.obj ogrfeaturedefn.obj \ - ogrfielddefn.obj ogr_srsnode.obj ogrspatialreference.obj \ - ogr_fromepsg.obj ogrct.obj \ - ogrfeaturestyle.obj ogr_srs_esri.obj ogrfeaturequery.obj \ - ogr_srs_xml.obj ograssemblepolygon.obj \ - ogr2gmlgeometry.obj gml2ogrgeometry.obj ogr_srs_pci.obj \ - ogr_srs_usgs.obj ogr_srs_dict.obj ogr_srs_panorama.obj \ - ogr_srs_ozi.obj ogr_srs_erm.obj ogr_expat.obj \ - swq.obj swq_parser.obj swq_select.obj swq_op_registrar.obj \ - swq_op_general.obj swq_expr_node.obj ogrpgeogeometry.obj \ - ogr_geocoding.obj \ - ogrgeomfielddefn.obj ograpispy.obj \ - ogr_xerces.obj ogr_geo_utils.obj ogr_proj_p.obj - -default: ogr.lib - -ogrsf_frmts\ogrsf_frmts.lib: - -sublibs: frmts - -frmts: - cd ogrsf_frmts - $(MAKE) /f makefile.vc - cd .. - -all: frmts default - -ogr.lib: $(OBJ_OGR) - lib /nologo /out:ogr.lib $(OBJ_OGR) - -install: default - -clean: - -del *.obj - -del *.lib - -del *.pdb - -del *.ilk - -allclean: clean - cd ogrsf_frmts - $(MAKE) /f makefile.vc clean - cd .. diff --git a/ogr/ogrsf_frmts/GNUmakefile b/ogr/ogrsf_frmts/GNUmakefile deleted file mode 100644 index 57005ec73b3d..000000000000 --- a/ogr/ogrsf_frmts/GNUmakefile +++ /dev/null @@ -1,24 +0,0 @@ - -include ../../GDALmake.opt - -SUBDIRS-yes = generic geojson kml mem mitab vrt $(OGR_FORMATS) - -SUBDIRS-$(HAVE_TEIGHA) += dwg -SUBDIRS-$(HAVE_IDB) += idb -SUBDIRS-$(HAVE_MYSQL) += mysql -SUBDIRS-$(HAVE_HANA) += hana -SUBDIRS-$(HAVE_OGDI) += ogdi -SUBDIRS-$(HAVE_OCI) += oci -SUBDIRS-$(HAVE_OGR_PG) += pg -SUBDIRS-$(HAVE_SQLITE) += sqlite -SUBDIRS-$(HAVE_FGDB) += filegdb -SUBDIRS-$(HAVE_LIBKML) += libkml -SUBDIRS-$(HAVE_FREEXL) += xls -SUBDIRS-$(HAVE_SOSI) += sosi -SUBDIRS-$(HAVE_MONGOCXXV3) += mongodbv3 - -default: $(foreach d,$(SUBDIRS-yes),$(d)-target) - -clean: $(foreach d,$(SUBDIRS-yes),$(d)-clean) - rm -f o/*.o - $(RM) o/*.lo diff --git a/ogr/ogrsf_frmts/amigocloud/GNUmakefile b/ogr/ogrsf_frmts/amigocloud/GNUmakefile deleted file mode 100644 index b0b948af6565..000000000000 --- a/ogr/ogrsf_frmts/amigocloud/GNUmakefile +++ /dev/null @@ -1,14 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogramigoclouddriver.o ogramigoclouddatasource.o ogramigocloudlayer.o ogramigocloudtablelayer.o ogramigocloudresultlayer.o - -CPPFLAGS := -iquote ../geojson $(JSON_INCLUDE) -iquote .. -iquote ../.. -iquote ../pgdump $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ): ogr_amigocloud.h diff --git a/ogr/ogrsf_frmts/amigocloud/makefile.vc b/ogr/ogrsf_frmts/amigocloud/makefile.vc deleted file mode 100644 index 360b376d56da..000000000000 --- a/ogr/ogrsf_frmts/amigocloud/makefile.vc +++ /dev/null @@ -1,33 +0,0 @@ -OBJ = ogramigoclouddriver.obj ogramigoclouddatasource.obj ogramigocloudlayer.obj ogramigocloudtablelayer.obj ogramigocloudresultlayer.obj -EXTRAFLAGS = -I.. -I..\.. -I..\geojson -I..\geojson\libjson -I..\pgdump - -GDAL_ROOT = ..\..\.. - -PLUGIN_DLL = ogr_AmigoCloud.dll - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - $(INSTALL) *.obj ..\o - -all: default - -clean: - -del *.obj - -del *.dll - -del *.exp - -del *.lib - -del *.manifest - -del *.pdb - -del *.tlh - -plugin: $(PLUGIN_DLL) - - -$(PLUGIN_DLL): $(OBJ) - link /dll $(LDEBUG) /out:$(PLUGIN_DLL) $(OBJ) $(GDALLIB) ../geojson/libjson/*.obj - if exist $(PLUGIN_DLL).manifest mt -manifest $(PLUGIN_DLL).manifest -outputresource:$(PLUGIN_DLL);2 - -plugin-install: - -mkdir $(PLUGINDIR) - $(INSTALL) $(PLUGIN_DLL) $(PLUGINDIR) \ No newline at end of file diff --git a/ogr/ogrsf_frmts/avc/GNUmakefile b/ogr/ogrsf_frmts/avc/GNUmakefile deleted file mode 100644 index 64ae3b7e75f7..000000000000 --- a/ogr/ogrsf_frmts/avc/GNUmakefile +++ /dev/null @@ -1,26 +0,0 @@ - - -include ../../../GDALmake.opt - -OGR_OBJ = ogravcbindriver.o ogravcbindatasource.o ogravcbinlayer.o \ - ogravclayer.o ogravcdatasource.o \ - ogravce00layer.o ogravce00datasource.o ogravce00driver.o - -AVC_OBJ = avc_bin.o avc_e00gen.o avc_e00parse.o \ - avc_e00read.o avc_mbyte.o avc_misc.o \ - avc_rawbin.o - -OBJ = $(AVC_OBJ) $(OGR_OBJ) - -CPPFLAGS := -iquote ../shape -iquote .. -iquote ../.. $(CPPFLAGS) - -ifeq ($(RENAME_INTERNAL_SHAPELIB_SYMBOLS),yes) -CPPFLAGS := $(CPPFLAGS) -DRENAME_INTERNAL_SHAPELIB_SYMBOLS -DSHPAPI_CALL= -endif - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ): ogr_avc.h avc.h diff --git a/ogr/ogrsf_frmts/avc/makefile.vc b/ogr/ogrsf_frmts/avc/makefile.vc deleted file mode 100644 index 3a56ed16aee9..000000000000 --- a/ogr/ogrsf_frmts/avc/makefile.vc +++ /dev/null @@ -1,24 +0,0 @@ - -LL_OBJ = avc_bin.obj avc_e00gen.obj avc_e00parse.obj \ - avc_e00read.obj avc_mbyte.obj avc_misc.obj \ - avc_rawbin.obj -OGR_OBJ = ogravcbindriver.obj ogravcbindatasource.obj ogravcbinlayer.obj\ - ogravclayer.obj ogravcdatasource.obj ogravce00layer.obj \ - ogravce00datasource.obj ogravce00driver.obj -OBJ = $(LL_OBJ) $(OGR_OBJ) - -EXTRAFLAGS = -I.. -I..\.. -I..\shape - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - -clean: - -del *.lib - -del *.obj *.pdb - - - - diff --git a/ogr/ogrsf_frmts/cad/GNUmakefile b/ogr/ogrsf_frmts/cad/GNUmakefile deleted file mode 100644 index 8ba6f46ad4e4..000000000000 --- a/ogr/ogrsf_frmts/cad/GNUmakefile +++ /dev/null @@ -1,20 +0,0 @@ - -include ../../../GDALmake.opt - -SUBDIRS-yes := libopencad - -OBJ := \ - ogrcaddriver.o \ - gdalcaddataset.o \ - ogrcadlayer.o \ - vsilfileio.o - -CPPFLAGS := -iquote . -iquote .. -iquote ../.. -iquote libopencad $(CPPFLAGS) - -default: $(foreach d,$(SUBDIRS-yes),$(d)-target) $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: $(foreach d,$(SUBDIRS-yes),$(d)-clean) - rm -f *.o $(O_OBJ) - rm -f *~ - -$(O_OBJ): ogr_cad.h diff --git a/ogr/ogrsf_frmts/cad/libopencad/GNUmakefile b/ogr/ogrsf_frmts/cad/libopencad/GNUmakefile deleted file mode 100644 index 61bdb52eb183..000000000000 --- a/ogr/ogrsf_frmts/cad/libopencad/GNUmakefile +++ /dev/null @@ -1,31 +0,0 @@ - -include ../../../../GDALmake.opt - -SUBDIRS-yes := dwg - -OBJ := \ - cadfile.o \ - cadcolors.o \ - cadlayer.o \ - cadclasses.o \ - cadfileio.o \ - cadobjects.o \ - cadtables.o \ - cadfilestreamio.o \ - cadgeometry.o \ - cadheader.o \ - opencad.o \ - caddictionary.o - -O_OBJ := $(foreach file,$(OBJ),../../o/$(file)) - -CPPFLAGS := -iquote . -iquote .. -iquote ../.. $(CPPFLAGS) - -default: $(foreach d,$(SUBDIRS-yes),$(d)-target) $(O_OBJ:.o=.$(OBJ_EXT)) - -../../o/%.$(OBJ_EXT): %.cpp - $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< - -clean: $(foreach d,$(SUBDIRS-yes),$(d)-clean) - rm -f *.o $(O_OBJ) - rm -f *~ diff --git a/ogr/ogrsf_frmts/cad/libopencad/dwg/GNUmakefile b/ogr/ogrsf_frmts/cad/libopencad/dwg/GNUmakefile deleted file mode 100644 index 205c70c4f3b0..000000000000 --- a/ogr/ogrsf_frmts/cad/libopencad/dwg/GNUmakefile +++ /dev/null @@ -1,19 +0,0 @@ - -include ../../../../../GDALmake.opt - -OBJ := \ - io.o \ - r2000.o - -O_OBJ = $(foreach file,$(OBJ),../../../o/$(file)) - -CPPFLAGS := -iquote . -iquote .. -iquote ../.. -iquote ../../.. $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -../../../o/%.$(OBJ_EXT): %.cpp - $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< - -clean: - rm -f *.o $(O_OBJ) - rm -f *~ diff --git a/ogr/ogrsf_frmts/cad/libopencad/dwg/makefile.vc b/ogr/ogrsf_frmts/cad/libopencad/dwg/makefile.vc deleted file mode 100644 index 5f09b7df46ee..000000000000 --- a/ogr/ogrsf_frmts/cad/libopencad/dwg/makefile.vc +++ /dev/null @@ -1,18 +0,0 @@ -# -# Makefile building opencad library -# - -OBJ = \ - r2000.obj \ - io.obj - -GDAL_ROOT = ..\..\..\..\.. -EXTRAFLAGS = -I. -I.. -I..\.. -I..\..\.. -I..\..\..\.. -DOCAD_EXTERN="" - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - -clean: - -del *.lib - -del *.obj *.pdb \ No newline at end of file diff --git a/ogr/ogrsf_frmts/cad/libopencad/makefile.vc b/ogr/ogrsf_frmts/cad/libopencad/makefile.vc deleted file mode 100644 index 64d7a0471daa..000000000000 --- a/ogr/ogrsf_frmts/cad/libopencad/makefile.vc +++ /dev/null @@ -1,34 +0,0 @@ -# -# Makefile building opencad library -# - -OBJ = \ - cadclasses.obj \ - caddictionary.obj \ - cadcolors.obj \ - cadfile.obj \ - cadfileio.obj \ - cadfilestreamio.obj \ - cadgeometry.obj \ - cadheader.obj \ - cadlayer.obj \ - cadobjects.obj \ - cadtables.obj \ - opencad.obj - -GDAL_ROOT = ..\..\..\.. -EXTRAFLAGS = -I. -I.. -I..\.. -I..\..\.. -Idwg $(SOFTWARNFLAGS) -DOCAD_EXTERN="" - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - cd dwg - $(MAKE) /f makefile.vc - cd .. - -clean: - cd dwg - $(MAKE) /f makefile.vc clean - cd .. - -del *.lib - -del *.obj *.pdb diff --git a/ogr/ogrsf_frmts/cad/makefile.vc b/ogr/ogrsf_frmts/cad/makefile.vc deleted file mode 100644 index b9bf4d1852e2..000000000000 --- a/ogr/ogrsf_frmts/cad/makefile.vc +++ /dev/null @@ -1,21 +0,0 @@ - -OBJ = ogrcaddriver.obj gdalcaddataset.obj ogrcadlayer.obj vsilfileio.obj - -EXTRAFLAGS = -I.. -I..\.. -Ilibopencad $(SOFTWARNFLAGS) -DOCAD_EXTERN="" - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - cd libopencad - $(MAKE) /f makefile.vc - cd .. - -clean: - cd libopencad - $(MAKE) /f makefile.vc clean - cd .. - -del *.lib - -del *.obj *.pdb - diff --git a/ogr/ogrsf_frmts/carto/GNUmakefile b/ogr/ogrsf_frmts/carto/GNUmakefile deleted file mode 100644 index 28ddb0a2b993..000000000000 --- a/ogr/ogrsf_frmts/carto/GNUmakefile +++ /dev/null @@ -1,14 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogrcartodriver.o ogrcartodatasource.o ogrcartolayer.o ogrcartotablelayer.o ogrcartoresultlayer.o - -CPPFLAGS := -iquote ../geojson $(JSON_INCLUDE) -iquote .. -iquote ../.. -iquote ../pgdump $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ): ogr_carto.h \ No newline at end of file diff --git a/ogr/ogrsf_frmts/carto/makefile.vc b/ogr/ogrsf_frmts/carto/makefile.vc deleted file mode 100644 index ca2c58c033b6..000000000000 --- a/ogr/ogrsf_frmts/carto/makefile.vc +++ /dev/null @@ -1,16 +0,0 @@ - -OBJ = ogrcartodriver.obj ogrcartodatasource.obj ogrcartolayer.obj ogrcartotablelayer.obj ogrcartoresultlayer.obj - -EXTRAFLAGS = -I.. -I..\.. -I..\geojson -I..\geojson\libjson -I..\pgdump - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - -clean: - -del *.obj *.pdb - - - diff --git a/ogr/ogrsf_frmts/csv/GNUmakefile b/ogr/ogrsf_frmts/csv/GNUmakefile deleted file mode 100644 index 885e4bdd3f53..000000000000 --- a/ogr/ogrsf_frmts/csv/GNUmakefile +++ /dev/null @@ -1,15 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogrcsvdriver.o ogrcsvdatasource.o ogrcsvlayer.o - -CPPFLAGS := -iquote .. -iquote ../.. -iquote ../generic $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ): ogr_csv.h ../generic/ogreditablelayer.h - diff --git a/ogr/ogrsf_frmts/csv/makefile.vc b/ogr/ogrsf_frmts/csv/makefile.vc deleted file mode 100644 index cf7389083d2d..000000000000 --- a/ogr/ogrsf_frmts/csv/makefile.vc +++ /dev/null @@ -1,15 +0,0 @@ - -OBJ = ogrcsvdriver.obj ogrcsvdatasource.obj ogrcsvlayer.obj -EXTRAFLAGS = -I.. -I..\.. -I..\generic - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - -clean: - -del *.obj *.pdb - - - diff --git a/ogr/ogrsf_frmts/csw/GNUmakefile b/ogr/ogrsf_frmts/csw/GNUmakefile deleted file mode 100644 index 62ae129fe04c..000000000000 --- a/ogr/ogrsf_frmts/csw/GNUmakefile +++ /dev/null @@ -1,14 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogrcswdataset.o - -CPPFLAGS := -iquote .. -iquote ../.. -iquote ../gml -iquote ../wfs $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ): ../wfs/ogr_wfs.h ../../ogr_swq.h diff --git a/ogr/ogrsf_frmts/csw/makefile.vc b/ogr/ogrsf_frmts/csw/makefile.vc deleted file mode 100644 index 35fdb70eca11..000000000000 --- a/ogr/ogrsf_frmts/csw/makefile.vc +++ /dev/null @@ -1,15 +0,0 @@ - -OBJ = ogrcswdataset.obj -EXTRAFLAGS = -I.. -I..\.. -I..\gml -I..\wfs - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - -clean: - -del *.obj *.pdb - - - diff --git a/ogr/ogrsf_frmts/dgn/GNUmakefile b/ogr/ogrsf_frmts/dgn/GNUmakefile deleted file mode 100644 index 392699384cef..000000000000 --- a/ogr/ogrsf_frmts/dgn/GNUmakefile +++ /dev/null @@ -1,64 +0,0 @@ - - -include ../../../GDALmake.opt - -MIN_OBJ = dgnopen.o dgnread.o dgnhelp.o dgnwrite.o dgnstroke.o -OBJ = ogrdgndriver.o ogrdgndatasource.o ogrdgnlayer.o $(MIN_OBJ) - -CPPFLAGS := -iquote .. -iquote ../.. $(CPPFLAGS) - -CPL_DIR = ../../../port - -WEB_DIR = $(HOME)/dgnlib-web -DIST_REV = 1.11 -DIST_DIR = dgnlib-$(DIST_REV) -DIST_FILE = dgnlib-$(DIST_REV).zip -DIST_FILES = dgnread.cpp dgnopen.cpp dgnlib.h dgnlibp.h \ - dgnstroke.cpp dgnwrite.cpp dgnhelp.cpp \ - dgnwritetest.cpp dgndump.cpp \ - \ - dist/Makefile dist/Makefile.vc dist/cpl_config.h \ - dist/README \ - \ - $(CPL_DIR)/cpl_port.h \ - $(CPL_DIR)/cpl_vsi.h $(CPL_DIR)/cpl_vsisimple.cpp \ - $(CPL_DIR)/cpl_conv.h $(CPL_DIR)/cpl_conv.cpp \ - $(CPL_DIR)/cpl_error.h $(CPL_DIR)/cpl_error.cpp \ - $(CPL_DIR)/cpl_string.h $(CPL_DIR)/cpl_string.cpp \ - $(CPL_DIR)/cpl_config.h.vc.begin \ - $(CPL_DIR)/cpl_config.h.vc.common \ - $(CPL_DIR)/cpl_config.h.vc.no_dll \ - $(CPL_DIR)/cpl_config.h.vc.end \ - $(CPL_DIR)/cpl_vsil_simple.cpp \ - $(CPL_DIR)/cpl_path.cpp $(CPL_DIR)/cpl_dir.cpp \ - $(CPL_DIR)/cpl_multiproc.h $(CPL_DIR)/cpl_multiproc.cpp - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -rf *.o $(DEST_DIR) dgnlib-$(DIST_REV).zip html man $(O_OBJ) - rm -f dgndump$(EXE) dgnwritetest$(EXE) - -dgndump$(EXE): dgndump.$(OBJ_EXT) - $(LD) $(LDFLAGS) dgndump.$(OBJ_EXT) $(CONFIG_LIBS) -o dgndump$(EXE) - -dgnwritetest$(EXE): dgnwritetest.$(OBJ_EXT) - $(LD) $(LDFLAGS) dgnwritetest.$(OBJ_EXT) $(CONFIG_LIBS) -o dgnwritetest$(EXE) - -docs: - doxygen - -zip: - rm -rf $(DIST_DIR) - mkdir $(DIST_DIR) - cp $(DIST_FILES) $(DIST_DIR) - zip -r $(DIST_FILE) $(DIST_DIR) - -web-docs-update: docs - cp html/* $(WEB_DIR)/libhtml - -web-update: web-docs-update dist - cp $(DIST_FILE) $(WEB_DIR)/dl - -pge_test: pge_test.cpp dgn_pge.cpp $(OBJ) - gcc -Wall -g pge_test.cpp dgn_pge.cpp $(OBJ) $(GDAL_LIB) -lm -o pge_test diff --git a/ogr/ogrsf_frmts/dgn/dist/Makefile b/ogr/ogrsf_frmts/dgn/dist/Makefile deleted file mode 100644 index efca3c3c6020..000000000000 --- a/ogr/ogrsf_frmts/dgn/dist/Makefile +++ /dev/null @@ -1,18 +0,0 @@ - -DGNLIB_OBJ = dgnfloat.o dgnhelp.o dgnread.o dgnwrite.o \ - dgnopen.o dgnstroke.o -CPLLIB_OBJ = cpl_conv.o cpl_dir.o cpl_error.o cpl_multiproc.o \ - cpl_path.o cpl_string.o cpl_vsil_simple.o cpl_vsisimple.o - -OBJ = $(CPLLIB_OBJ) $(DGNLIB_OBJ) - -default: dgndump dgnwritetest - -dgndump: dgndump.c $(OBJ) - $(CXX) dgndump.c $(OBJ) -o dgndump - -dgnwritetest: dgnwritetest.c $(OBJ) - $(CXX) dgndump.c $(OBJ) -o dgnwritetest - -clean: - rm -f *.o dgndump dgnwritetest diff --git a/ogr/ogrsf_frmts/dgn/dist/Makefile.vc b/ogr/ogrsf_frmts/dgn/dist/Makefile.vc deleted file mode 100644 index 920a1791dbbe..000000000000 --- a/ogr/ogrsf_frmts/dgn/dist/Makefile.vc +++ /dev/null @@ -1,24 +0,0 @@ - -DGNLIB_OBJ = dgnfloat.obj dgnhelp.obj dgnread.obj dgnwrite.obj \ - dgnopen.obj dgnstroke.obj -CPLLIB_OBJ = cpl_conv.obj cpl_dir.obj cpl_error.obj cpl_multiproc.obj \ - cpl_path.obj cpl_string.obj cpl_vsil_simple.obj \ - cpl_vsisimple.obj - -OBJ = $(CPLLIB_OBJ) $(DGNLIB_OBJ) - -CPPFLAGS = /EHsc - -default: dgndump.exe dgnwritetest.exe dgnlib.dll - -dgndump.exe: dgndump.c $(OBJ) - $(CXX) dgndump.c $(OBJ) - -dgnwritetest.exe: dgnwritetest.c $(OBJ) - $(CXX) dgnwritetest.c $(OBJ) - -dgnlib.dll: $(OBJ) - link /dll /debug $(OBJ) /out:dgnlib.dll /implib:dgnlib_i.lib - -clean: - del *.lib *.dll *.exe *.obj diff --git a/ogr/ogrsf_frmts/dgn/dist/README b/ogr/ogrsf_frmts/dgn/dist/README deleted file mode 100644 index db8724c2bcab..000000000000 --- a/ogr/ogrsf_frmts/dgn/dist/README +++ /dev/null @@ -1,209 +0,0 @@ - - DGNLIB Source Distribution - ========================== - -Current information on DGNLIB, including detailed API documentation -can be found at: - - http://dgnlib.maptools.org/ - - -Building --------- - -This is a preliminary source distribution, and I have not gone to any -pains to make it easy to configure and build. To build please do the -following: - -== Unix: - -1. Update cpl_config.h to represent your platform accurately. Generally all -that matters is to #define WORDS_BIGENDIAN on big endian platforms. The -rest can likely be ignored.

- -2. Build the programs. - - % make - -== Windows: - -1. Ensure you have Microsoft Visual C++ 6.x or later installed. - -2. Ensure the commandline VC++ environment is setup properly. You may need - to run the VCVARS32.BAT script from within the VC++ tree. - -3. Compile the code, and build statically linked executables for the sample - programs and DLL using the following command. - - nmake /f makefile.vc - - - -Release Notes -============= - -Release 1.11 ------------- - - o B-Spline support: - - The DGNT_BSPLINE define was bogus, replaced with DGNT_BSPLINE_POLE. - - Added support for the following B-Spline related elements: - o DGNElemBSplineSurfaceHeader (24) - o DGNElemBSplineCurveHeader (27) - o DGNElemBSplineSurfaceBoundary (25) - o DGNElemKnotWeight (26/28) - - o Added initial support for Shared Cell Definition elements - - o 3D solid/surface fixes: - - Fixed incorrect reading and writing of surftype field. - - Added boundelms field to DGNElemComplexHeader - - Added DGNCreateSolidHeaderElem() and DGNCreateSolidHeaderElemFromGroup() - - Changed DGNCreateComplexHeaderElem() and - DGNCreateComplexHeaderElemFromGroup() to only support complex chains/shapes - - Fixed bug creating solids/surfaces: totlength was 1 word too short. - - Renamed bogus define DGNSUT_SOLID to DGNSUT_SURFACE_OF_PROJECTION - - o Added support for cloning Cone elements - - o Fixes for uor handling in DGNCreate(). - - o Treat the most recently read color table as the global color table, - instead of just the first one encountered. - - o Added Text Node implementation from Ilya Beylin. - - -Release 1.10 ------------- - - o Added DGNElemTypeHasDispHdr(), and use it in DGNParseCore() to avoid trying - to read disp hdr, or attributes from inappropriate elements. - - o Check if a negative amount of attribute information is being read in - DGNParseCore(), and if so just issue a warning, and skip attempt. - - o Fixed DGNCreateCellHeaderFromGroup() to not pre-transform the bounds. - - o Fixed missing handling of min/max Z in DGNCreateMultiPointElem(). (Marius) - - o Added surface type to DGNCreateComplexHeaderElem(). (Marius) - - o DGNRad50ToAscii() reimplemented to correct a few problems. New version - provided by Armin Berg (iez.com). - - o Fixes to complex header and cell header creation to set the total group - size properly, and to set up complex header pad attributes properly. Now - passed EDG validation. - - -Release 1.9 ------------ - - o Added DGNLoadTCB(), and fixed problem when writing new elements to an - existing file without having already read the TCB. - - o Fixed serious bug in setting the index "offset" location. Critical for - writing applications. - - -Release 1.8 ------------ - - o Added support for reading 3D cone (23), 3D surface (18) and 3D solid (19) - elements based on contributions from Marius Kintel. - - o Main site moved to http://dgnlib.maptools.org/ - - -Release 1.7 ------------ - - o Improved calculation of bounding box in DGLCreateTextElem() based on code - from Matt Kelder. - - o Added preliminary 3D write support. - - o Modified DGNCreateTextElem() arguments, and deprecated DGNCreateArcElem2D() - in favour of DGNCreateArcElem(). - - o Report transformation matrix for ViewInfo when dumping. - - -Release 1.6 ------------ - - o Bug fix in DGNGetLinkage() for DMRS recognition from Henk Jan Priester. - - o Added DGNCreateCellHeaderFromGroup() and DGNCreateCellHeaderElem() - functions in the write API. - - o Added a Microsoft VC++ makefile (Makefile.vc). - - -Release 1.5 ------------ - - o Added 2D write support! - - o Fixed collection of background color in color table (color 255) as per - bug report by Henk Jan Priester (Justcroft Technical Systems). - - o Added support for association ids (DGNLT_ASSOC_ID, DGNGetAssocID()). - - o Fixed problem with updating the DGNInfo.color_table field when a color - table is read. - - o Fixed problem with spatial queries either including all of a complex - element (and its members) or none. - - o Added support for reading the eight view descriptions in the TCB element. - - o Added a Makefile in the source distribution. - - o Fixed error with tags in DGNFreeElement() as reported by Henk Jan Priester. - - - -Release 1.4 ------------ - - o Added "fast" spatial searching via the DGNSetSpatialFilter() function. - This basically just reads the extents information at beginning of - geometric features to see if they should be returned. - - o Actually extract the global origin from the TCB, and use it when - transforming points. Only a few files (i.e. Brazos County roads.rds) use - a non-zero origin. - - o Added experimental multi byte text support from Ason Kang - (hiska@netian.com). - - o Add experimental support for 3D files. Some 3D elements not supported. - 3D quaternion for ellipse and arc elements not utilized. - - o Added preliminary support for reading cell header structures based - on input from Mike Cane. - - o Moved a bunch of stuff into dgnread.cpp. - - o Build default colortable into dgnhelp.cpp for use of DGNLookupColor(). - - o Added DGNGetShapeFillInfo(). - - o DGNGetShapeFillInfo() now tries to handle multi-part attribute linkages. - - -Release 1.3 ------------ - - o Added raw_data/raw_bytes members of DGNElemCore, and DGNSetOptions() - to allow control of when raw element image is retained. - - o Added -r flag to dgndump to dump raw contents of desired elements. - - o Add CPL_CVSID() to simplify tracking of versions. - - o Fixed bug with freeing element index in DGNClose(). - - diff --git a/ogr/ogrsf_frmts/dgn/dist/cpl_config.h b/ogr/ogrsf_frmts/dgn/dist/cpl_config.h deleted file mode 100644 index 14967996bfa2..000000000000 --- a/ogr/ogrsf_frmts/dgn/dist/cpl_config.h +++ /dev/null @@ -1,57 +0,0 @@ -/* Define to 1 if your processor stores words with the most significant byte - first (like Motorola and SPARC, unlike Intel and VAX). */ -/* #undef WORDS_BIGENDIAN */ - -#define CPL_MULTIPROC_STUB 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ERRNO_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if you have the `snprintf' function. */ -#define HAVE_SNPRINTF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_VALUES_H 1 - -/* Define to 1 if you have the `vprintf' function. */ -#define HAVE_VPRINTF 1 - -/* Define to 1 if you have the `vsnprintf' function. */ -#define HAVE_VSNPRINTF 1 - -/* The size of a `int', as computed by sizeof. */ -#define SIZEOF_INT 4 - -/* The size of a `long', as computed by sizeof. */ -#define SIZEOF_LONG 4 - diff --git a/ogr/ogrsf_frmts/dgn/makefile.vc b/ogr/ogrsf_frmts/dgn/makefile.vc deleted file mode 100644 index e4ac7a2e0ed4..000000000000 --- a/ogr/ogrsf_frmts/dgn/makefile.vc +++ /dev/null @@ -1,23 +0,0 @@ - -LL_OBJ = dgnopen.obj dgnread.obj dgnstroke.obj dgnhelp.obj\ - dgnwrite.obj -OGR_OBJ = ogrdgndriver.obj ogrdgndatasource.obj ogrdgnlayer.obj -OBJ = $(LL_OBJ) $(OGR_OBJ) - -EXTRAFLAGS = -I.. -I..\.. - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - -clean: - -del *.lib - -del *.obj *.pdb - -dgndump.exe: $(LL_OBJ) dgndump.obj - cl /Zi dgndump.obj $(LL_OBJ) $(GDAL_ROOT)/port/cpl.lib $(LIBS) - - - diff --git a/ogr/ogrsf_frmts/dwg/GNUmakefile b/ogr/ogrsf_frmts/dwg/GNUmakefile deleted file mode 100644 index e33b95c91f84..000000000000 --- a/ogr/ogrsf_frmts/dwg/GNUmakefile +++ /dev/null @@ -1,33 +0,0 @@ - -TDXXFLAGS = \ - -I$(TEIGHA_DIR)/Core/Include \ - -I$(TEIGHA_DIR)/Core/Extensions/ExServices \ - -I$(TEIGHA_DIR)/Core/Examples/Common \ - -I$(TEIGHA_DIR)/ThirdParty/activation \ - -I$(TEIGHA_DIR)/KernelBase/Include \ - -I$(TEIGHA_DIR)/Kernel/Include \ - -I$(TEIGHA_DIR)/Kernel/Extensions/ExServices \ - -I$(TEIGHA_DIR)/Drawing/Include \ - -I$(TEIGHA_DIR)/Drawing/Extensions/ExServices \ - -I$(TEIGHA_DIR)/Dgn/include \ - -I$(TEIGHA_DIR)/Dgn/Extensions/ExServices - -include ../../../GDALmake.opt - -OBJ = ogrdwgdriver.o ogrdwgdatasource.o ogrdwglayer.o \ - ogrdwg_dimension.o ogrdwg_hatch.o ogrdwgblockslayer.o \ - ogrdwg_blockmap.o \ - ogrdgnv8driver.o ogrdgnv8datasource.o ogrdgnv8layer.o \ - ogrteigha.o - -CPPFLAGS := -iquote ../dxf $(TDXXFLAGS) $(CPPFLAGS) $(TEIGHA_CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) createdgnv8testfile$(EXE) - -$(O_OBJ) $(OBJ): ogr_dwg.h ogr_dgnv8.h - -createdgnv8testfile$(EXE): createdgnv8testfile.$(OBJ_EXT) - $(LD) $(LDFLAGS) createdgnv8testfile.$(OBJ_EXT) $(CONFIG_LIBS) -o createdgnv8testfile$(EXE) diff --git a/ogr/ogrsf_frmts/dwg/makefile.vc b/ogr/ogrsf_frmts/dwg/makefile.vc deleted file mode 100644 index db71c8bb279e..000000000000 --- a/ogr/ogrsf_frmts/dwg/makefile.vc +++ /dev/null @@ -1,47 +0,0 @@ - -OBJ = \ - ogrdwgdriver.obj \ - ogrdwgdatasource.obj \ - ogrdwglayer.obj \ - ogrdwgblockslayer.obj \ - ogrdwg_blockmap.obj \ - ogrdwg_dimension.obj \ - ogrdwg_hatch.obj \ - ogrdgnv8driver.obj \ - ogrdgnv8datasource.obj \ - ogrdgnv8layer.obj \ - ogrteigha.obj - -DXF_OBJ = ..\dxf\intronurbs.obj ..\dxf\ogrdxf_polyline_smooth.obj ..\dxf\ogr_autocad_services.obj - -PLUGIN_DLL = ogr_DWG_DGNV8.dll - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -EXTRAFLAGS = -I.. -I..\.. $(TD_FLAGS) $(TD_INCLUDE) -I..\dxf - -default: $(OBJ) - -clean: - -del *.lib - -del *.obj *.pdb - -del *.dll - -plugin: $(PLUGIN_DLL) - -$(PLUGIN_DLL): $(OBJ) - link /dll $(LDEBUG) /out:$(PLUGIN_DLL) $(OBJ) $(DXF_OBJ) \ - $(GDALLIB) $(TD_LIBS) - if exist $(PLUGIN_DLL).manifest mt -manifest $(PLUGIN_DLL).manifest \ - -outputresource:$(PLUGIN_DLL);2 - -plugin-install: - -mkdir $(PLUGINDIR) - $(INSTALL) $(PLUGIN_DLL) $(PLUGINDIR) - -createdgnv8testfile.exe: createdgnv8testfile.obj - cl /Zi createdgnv8testfile.obj $(TD_LIBS) - - diff --git a/ogr/ogrsf_frmts/dxf/GNUmakefile b/ogr/ogrsf_frmts/dxf/GNUmakefile deleted file mode 100644 index 03f7587f82f4..000000000000 --- a/ogr/ogrsf_frmts/dxf/GNUmakefile +++ /dev/null @@ -1,20 +0,0 @@ - -include ../../../GDALmake.opt - -OBJ = ogrdxfdriver.o ogrdxfdatasource.o ogrdxflayer.o \ - ogrdxfreader.o ogrdxf_blockmap.o ogrdxf_dimension.o \ - ogrdxfwriterds.o ogrdxfwriterlayer.o intronurbs.o \ - ogrdxf_polyline_smooth.o ogrdxfblockslayer.o \ - ogrdxfblockswriterlayer.o ogrdxf_hatch.o \ - ogr_autocad_services.o ogrdxf_feature.o \ - ogrdxf_leader.o ogrdxf_ocstransformer.o - -CPPFLAGS := -iquote .. -iquote ../.. $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ): ogr_dxf.h - diff --git a/ogr/ogrsf_frmts/dxf/makefile.vc b/ogr/ogrsf_frmts/dxf/makefile.vc deleted file mode 100644 index 1ce7ac1d4495..000000000000 --- a/ogr/ogrsf_frmts/dxf/makefile.vc +++ /dev/null @@ -1,18 +0,0 @@ -OBJ = ogrdxfdriver.obj ogrdxfdatasource.obj ogrdxflayer.obj \ - ogrdxfreader.obj ogrdxf_blockmap.obj ogrdxf_dimension.obj \ - ogrdxfwriterds.obj ogrdxfwriterlayer.obj intronurbs.obj \ - ogrdxf_polyline_smooth.obj ogrdxfblockslayer.obj \ - ogrdxfblockswriterlayer.obj ogrdxf_hatch.obj \ - ogr_autocad_services.obj ogrdxf_feature.obj \ - ogrdxf_leader.obj ogrdxf_ocstransformer.obj - -EXTRAFLAGS = -I.. -I..\.. - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - -clean: - -del *.obj *.pdb diff --git a/ogr/ogrsf_frmts/edigeo/GNUmakefile b/ogr/ogrsf_frmts/edigeo/GNUmakefile deleted file mode 100644 index 390bf56bacf6..000000000000 --- a/ogr/ogrsf_frmts/edigeo/GNUmakefile +++ /dev/null @@ -1,14 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogredigeodriver.o ogredigeodatasource.o ogredigeolayer.o - -CPPFLAGS := -iquote .. -iquote ../.. $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ): ogr_edigeo.h \ No newline at end of file diff --git a/ogr/ogrsf_frmts/edigeo/makefile.vc b/ogr/ogrsf_frmts/edigeo/makefile.vc deleted file mode 100644 index 9921bb7cf80b..000000000000 --- a/ogr/ogrsf_frmts/edigeo/makefile.vc +++ /dev/null @@ -1,15 +0,0 @@ - -OBJ = ogredigeodriver.obj ogredigeodatasource.obj ogredigeolayer.obj -EXTRAFLAGS = -I.. -I..\.. - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - -clean: - -del *.obj *.pdb - - - diff --git a/ogr/ogrsf_frmts/elastic/GNUmakefile b/ogr/ogrsf_frmts/elastic/GNUmakefile deleted file mode 100644 index 6642e3c5751a..000000000000 --- a/ogr/ogrsf_frmts/elastic/GNUmakefile +++ /dev/null @@ -1,14 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogrelasticdriver.o ogrelasticdatasource.o ogrelasticlayer.o ogrelasticaggregationlayer.o - -CPPFLAGS := $(JSON_INCLUDE) -iquote .. -iquote ../.. -iquote ../geojson $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ): ogr_elastic.h ../geojson/ogrgeojsonreader.h ../geojson/ogrgeojsonwriter.h diff --git a/ogr/ogrsf_frmts/elastic/makefile.vc b/ogr/ogrsf_frmts/elastic/makefile.vc deleted file mode 100644 index f5da2ee8923c..000000000000 --- a/ogr/ogrsf_frmts/elastic/makefile.vc +++ /dev/null @@ -1,15 +0,0 @@ - -OBJ = ogrelasticdriver.obj ogrelasticdatasource.obj ogrelasticlayer.obj ogrelasticaggregationlayer.obj -EXTRAFLAGS = -DHAVE_CURL $(CURL_CFLAGS) $(CURL_INC) -I.. -I..\.. -I..\geojson -I..\geojson\libjson - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - -clean: - -del *.obj *.pdb - - - diff --git a/ogr/ogrsf_frmts/filegdb/GNUmakefile b/ogr/ogrsf_frmts/filegdb/GNUmakefile deleted file mode 100644 index a3de5102b0ec..000000000000 --- a/ogr/ogrsf_frmts/filegdb/GNUmakefile +++ /dev/null @@ -1,22 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = FGdbDatasource.o FGdbDriver.o FGdbLayer.o FGdbUtils.o FGdbResultLayer.o - -CPPFLAGS := -iquote ../generic -iquote ../openfilegdb $(FGDB_INC) $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ): ogr_fgdb.h ../openfilegdb/filegdb_fielddomain.h - -PLUGIN_SO = ogr_FileGDB.$(SO_EXT) - -plugin: $(PLUGIN_SO) - -$(PLUGIN_SO): $(OBJ) - $(LD_SHARED) $(LNK_FLAGS) $(OBJ) $(CONFIG_LIBS_INS) $(LIBS) \ - -o $(PLUGIN_SO) diff --git a/ogr/ogrsf_frmts/filegdb/makefile.vc b/ogr/ogrsf_frmts/filegdb/makefile.vc deleted file mode 100644 index 50f1d853a394..000000000000 --- a/ogr/ogrsf_frmts/filegdb/makefile.vc +++ /dev/null @@ -1,39 +0,0 @@ -OBJ = FGdbDriver.obj FGdbDatasource.obj FGdbLayer.obj FGdbUtils.obj FGdbResultLayer.obj -EXTRAFLAGS = -I.. -I..\generic -I..\.. -I..\openfilegdb -I$(FGDB_INC) - -!IFDEF FGDB_VERSION -EXTRAFLAGS = $(EXTRAFLAGS) -DFGDB_VERSION=$(FGDB_VERSION) -!ELSE -EXTRAFLAGS = $(EXTRAFLAGS) -DFGDB_VERSION=010300 -!ENDIF - -GDAL_ROOT = ..\..\.. - -PLUGIN_DLL = ogr_FileGDB.dll - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - $(INSTALL) *.obj ..\o - -all: default - -clean: - -del *.obj - -del *.dll - -del *.exp - -del *.lib - -del *.manifest - -del *.pdb - -del *.tlh - -plugin: $(PLUGIN_DLL) - -$(PLUGIN_DLL): $(OBJ) - link /dll $(LDEBUG) /out:$(PLUGIN_DLL) $(OBJ) $(GDALLIB) $(FGDB_LIB) - if exist $(PLUGIN_DLL).manifest mt -manifest $(PLUGIN_DLL).manifest -outputresource:$(PLUGIN_DLL);2 - - -plugin-install: - -mkdir $(PLUGINDIR) - $(INSTALL) $(PLUGIN_DLL) $(PLUGINDIR) diff --git a/ogr/ogrsf_frmts/flatgeobuf/GNUmakefile b/ogr/ogrsf_frmts/flatgeobuf/GNUmakefile deleted file mode 100644 index fb41d7bdc156..000000000000 --- a/ogr/ogrsf_frmts/flatgeobuf/GNUmakefile +++ /dev/null @@ -1,15 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = geometryreader.o geometrywriter.o ogrflatgeobufdataset.o ogrflatgeobuflayer.o ogrflatgeobufeditablelayer.o packedrtree.o - -CPPFLAGS := -iquote . -iquote .. -iquote ../.. -iquote ../generic $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f $(O_OBJ) *.o *.lo $(O_OBJ:.o=.$(OBJ_EXT)) - -$(O_OBJ): ogr_flatgeobuf.h cplerrors.h ../generic/ogreditablelayer.h - diff --git a/ogr/ogrsf_frmts/flatgeobuf/makefile.vc b/ogr/ogrsf_frmts/flatgeobuf/makefile.vc deleted file mode 100644 index 023c738bfdd1..000000000000 --- a/ogr/ogrsf_frmts/flatgeobuf/makefile.vc +++ /dev/null @@ -1,12 +0,0 @@ - -OBJ = geometryreader.obj geometrywriter.obj ogrflatgeobufdataset.obj ogrflatgeobuflayer.obj ogrflatgeobufeditablelayer.obj packedrtree.obj -EXTRAFLAGS = -I. -I.. -I..\.. -I..\generic - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - -clean: - -del *.obj *.pdb diff --git a/ogr/ogrsf_frmts/generic/GNUmakefile b/ogr/ogrsf_frmts/generic/GNUmakefile deleted file mode 100644 index ef0927ffd1d7..000000000000 --- a/ogr/ogrsf_frmts/generic/GNUmakefile +++ /dev/null @@ -1,86 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogrsfdriverregistrar.o ogrlayer.o ogrdatasource.o \ - ogrsfdriver.o ogrregisterall.o ogr_gensql.o \ - ogr_attrind.o ogr_miattrind.o ogrlayerdecorator.o \ - ogrwarpedlayer.o ogrunionlayer.o ogrlayerpool.o \ - ogrmutexedlayer.o ogrmutexeddatasource.o \ - ogremulatedtransaction.o ogreditablelayer.o \ - ograrrowarrayhelper.o - -CXXFLAGS := $(CXXFLAGS) $(SHADOW_WFLAGS) -DINST_DATA=\"$(INST_DATA)\" - -CXXFLAGS := $(WARN_EFFCPLUSPLUS) $(WARN_OLD_STYLE_CAST) $(CXXFLAGS) - -CXXFLAGS := $(CXXFLAGS) -DGENERIC_ENABLED -DGEOJSON_ENABLED -DKML_ENABLED -DMEM_ENABLED -DMITAB_ENABLED -DVRT_ENABLED $(OGR_FORMATS_ENABLED_CFLAGS) - -ifeq ($(HAVE_OGDI),yes) -CXXFLAGS := $(CXXFLAGS) -DOGDI_ENABLED -endif - -ifeq ($(HAVE_OCI),yes) -CXXFLAGS := $(CXXFLAGS) -DOCI_ENABLED -endif - -ifeq ($(HAVE_FGDB),yes) -CXXFLAGS := $(CXXFLAGS) -DFGDB_ENABLED -endif - -ifeq ($(HAVE_OGR_PG),yes) -CXXFLAGS := $(CXXFLAGS) -DPG_ENABLED -endif - -ifeq ($(HAVE_MYSQL),yes) -CXXFLAGS := $(CXXFLAGS) -DMYSQL_ENABLED -endif - -ifeq ($(HAVE_HANA),yes) -CXXFLAGS := $(CXXFLAGS) -DHANA_ENABLED -endif - -ifeq ($(PCIDSK_SETTING),internal) -CXXFLAGS := $(CXXFLAGS) -DPCIDSK_ENABLED -endif - -ifeq ($(PCIDSK_SETTING),external) -CXXFLAGS := $(CXXFLAGS) -DPCIDSK_ENABLED -endif - -ifeq ($(HAVE_SQLITE),yes) -CXXFLAGS := $(CXXFLAGS) -DSQLITE_ENABLED -endif - -ifeq ($(HAVE_LIBKML),yes) -CXXFLAGS := $(CXXFLAGS) -DLIBKML_ENABLED -endif - -ifeq ($(HAVE_TEIGHA),yes) -CXXFLAGS := $(CXXFLAGS) -DDWG_ENABLED -DDGNV8_ENABLED -endif - -ifeq ($(HAVE_IDB),yes) -CXXFLAGS := $(CXXFLAGS) -DIDB_ENABLED -endif - -ifeq ($(HAVE_SOSI),yes) -CXXFLAGS := $(CXXFLAGS) -DSOSI_ENABLED -endif - -ifeq ($(HAVE_FREEXL),yes) -CXXFLAGS := $(CXXFLAGS) -DXLS_ENABLED -endif - -ifeq ($(HAVE_MONGOCXXV3),yes) -CXXFLAGS := $(CXXFLAGS) -DMONGODBV3_ENABLED -endif - -CPPFLAGS := -iquote .. -iquote ../.. $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ): ../../../GDALmake.opt ../../ogr_swq.h diff --git a/ogr/ogrsf_frmts/generic/makefile.vc b/ogr/ogrsf_frmts/generic/makefile.vc deleted file mode 100644 index 18927162c8d6..000000000000 --- a/ogr/ogrsf_frmts/generic/makefile.vc +++ /dev/null @@ -1,157 +0,0 @@ - -OBJ = ogrsfdriverregistrar.obj ogrlayer.obj ogr_gensql.obj \ - ogrdatasource.obj ogrsfdriver.obj ogrregisterall.obj \ - ogr_attrind.obj ogr_miattrind.obj ogrlayerdecorator.obj \ - ogrwarpedlayer.obj ogrunionlayer.obj ogrlayerpool.obj \ - ogrmutexedlayer.obj ogrmutexeddatasource.obj \ - ogremulatedtransaction.obj ogreditablelayer.obj \ - ograrrowarrayhelper.obj - - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -!IFDEF INCLUDE_OGR_FRMTS - -BASEFORMATS = -DSHAPE_ENABLED -DMITAB_ENABLED -DNTF_ENABLED -DSDTS_ENABLED -DTIGER_ENABLED -DS57_ENABLED -DDGN_ENABLED -DVRT_ENABLED -DAVC_ENABLED -DMEM_ENABLED -DCSV_ENABLED -DGML_ENABLED -DGMT_ENABLED -DKML_ENABLED -DGEOJSON_ENABLED -DGPX_ENABLED -DGEOCONCEPT_ENABLED -DGEORSS_ENABLED -DDXF_ENABLED -DPGDUMP_ENABLED -DGPSBABEL_ENABLED -DPDS_ENABLED -DEDIGEO_ENABLED -DSVG_ENABLED -DIDRISI_ENABLED -DSXF_ENABLED -DOPENFILEGDB_ENABLED -DWASP_ENABLED -DSELAFIN_ENABLED -DJML_ENABLED -DVDV_ENABLED -DCAD_ENABLED -DMVT_ENABLED -DFLATGEOBUF_ENABLED -DMAPML_ENABLED - -EXTRAFLAGS = -I.. -I..\.. $(OGDIDEF) $(OCIDEF) $(PGDEF) \ - $(ODBCDEF) $(SQLITEDEF) $(MYSQLDEF) $(ILIDEF) $(DWGDEF) \ - $(BASEFORMATS) $(IDBDEF) $(NASDEF) \ - $(LIBKMLDEF) $(WFSDEF) $(SOSIDEF) \ - $(FGDBDEF) $(XLSDEF) $(ODSDEF) $(XLSXDEF) $(LVBAGDEF) \ - $(ELASTICDEF) $(GPKGDEF) $(OSMDEF) $(VFKDEF) $(CARTODEF) $(AMIGOCLOUDDEF) $(PLSCENESDEF) $(CSWDEF) $(MONGODBV3DEF) \ - $(GMLASDEF) $(NGWDEF) - -!IFDEF OGDIDIR -OGDIDEF = -DOGDI_ENABLED -!ENDIF - -!IFDEF ODBC_SUPPORTED -ODBCDEF = -DODBC_ENABLED -DPGEO_ENABLED -DMSSQLSPATIAL_ENABLED -!ENDIF - -!IFDEF PG_LIB -!IFNDEF PG_PLUGIN -PGDEF = -DPG_ENABLED -!ENDIF -!ENDIF - -!IFDEF MYSQL_LIB -MYSQLDEF = -DMYSQL_ENABLED -!ENDIF - -!IFDEF SQLITE_LIB -SQLITEDEF = -DSQLITE_ENABLED -!ENDIF - -!IFDEF OCI_LIB -!IFNDEF OCI_PLUGIN -OCIDEF = -DOCI_ENABLED -!ENDIF -!ENDIF - -!IFDEF ILI_ENABLED -ILIDEF = -DILI_ENABLED -!ENDIF - -!IFDEF XERCES_INCLUDE -GMLASDEF = -DGMLAS_ENABLED -!ENDIF - -!IFDEF TD_LIBS -!IF "$(TD_PLUGIN)" != "YES" -DWGDEF = -DDWG_ENABLED -DDGNV8_ENABLED -!ENDIF -!ENDIF - -!IFDEF INFORMIXDIR -IDBDEF = -DIDB_ENABLED -!ENDIF - -!IFDEF NAS_ENABLED -NASDEF = -DNAS_ENABLED -!ENDIF - -!IFDEF LIBKML_DIR -!IFNDEF LIBKML_PLUGIN -LIBKMLDEF = -DLIBKML_ENABLED -!ENDIF -!ENDIF - -!IFDEF CURL_LIB -WFSDEF = -DWFS_ENABLED -CSWDEF = -DCSW_ENABLED -!ENDIF - -!IFDEF SOSI_ENABLED -SOSIDEF = -DSOSI_ENABLED -!ENDIF - -!IFDEF FGDB_LIB -!IF "$(FGDB_PLUGIN)" != "YES" -FGDBDEF = -DFGDB_ENABLED -!ENDIF -!ENDIF - -!IFDEF FREEXL_LIBS -XLSDEF = -DXLS_ENABLED -!ENDIF - -!IFDEF EXPAT_INCLUDE -ODSDEF = -DODS_ENABLED -!ENDIF - -!IFDEF EXPAT_INCLUDE -XLSXDEF = -DXLSX_ENABLED -!ENDIF - -!IFDEF EXPAT_INCLUDE -LVBAGDEF = -DLVBAG_ENABLED -!ENDIF - -!IFDEF CURL_LIB -ELASTICDEF = -DELASTIC_ENABLED -!ENDIF - -!IFDEF SQLITE_LIB -GPKGDEF = -DGPKG_ENABLED -OSMDEF = -DOSM_ENABLED -VFKDEF = -DVFK_ENABLED -!ENDIF - -!IFDEF CURL_LIB -CARTODEF = -DCARTO_ENABLED -!ENDIF - -!IFDEF CURL_LIB -!IF "$(AMIGOCLOUD_PLUGIN)" != "YES" -AMIGOCLOUDDEF = -DAMIGOCLOUD_ENABLED -!ENDIF -!ENDIF - -!IFDEF CURL_LIB -PLSCENESDEF = -DPLSCENES_ENABLED -!ENDIF - -!IFDEF CURL_LIB -NGWDEF = -DNGW_ENABLED -!ENDIF - -!IFDEF MONGOCXXV3_CFLAGS -!IF "$(MONGODBV3_PLUGIN)" != "YES" -MONGODBV3DEF = -DMONGODBV3_ENABLED -!ENDIF -!ENDIF - -!ELSE - -EXTRAFLAGS = -I.. -I..\.. - -!ENDIF - -default: $(OBJ) - -clean: - -del *.obj *.pdb diff --git a/ogr/ogrsf_frmts/geoconcept/GNUmakefile b/ogr/ogrsf_frmts/geoconcept/GNUmakefile deleted file mode 100644 index 1c73b2178ad8..000000000000 --- a/ogr/ogrsf_frmts/geoconcept/GNUmakefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../../../GDALmake.opt - -OBJ = geoconcept.o geoconcept_syscoord.o \ - ogrgeoconceptdriver.o ogrgeoconceptdatasource.o ogrgeoconceptlayer.o - -CPPFLAGS := -DUSE_CPL -iquote .. -iquote ../.. $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) diff --git a/ogr/ogrsf_frmts/geoconcept/makefile.vc b/ogr/ogrsf_frmts/geoconcept/makefile.vc deleted file mode 100644 index 9e7fa65e4328..000000000000 --- a/ogr/ogrsf_frmts/geoconcept/makefile.vc +++ /dev/null @@ -1,13 +0,0 @@ -OBJ = geoconcept.obj geoconcept_syscoord.obj \ - ogrgeoconceptdriver.obj \ - ogrgeoconceptdatasource.obj ogrgeoconceptlayer.obj -EXTRAFLAGS = -I.. -I..\.. -DUSE_CPL /wd4706 - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - -clean: - -del *.obj *.pdb diff --git a/ogr/ogrsf_frmts/geojson/GNUmakefile b/ogr/ogrsf_frmts/geojson/GNUmakefile deleted file mode 100644 index 629fcb752a36..000000000000 --- a/ogr/ogrsf_frmts/geojson/GNUmakefile +++ /dev/null @@ -1,33 +0,0 @@ -# $Id$ -# -# Makefile to build OGR GeoJSON driver -# -include ../../../GDALmake.opt - -ifeq ($(LIBJSONC_SETTING),internal) -SUBDIRS-yes := libjson -endif - -OBJ = \ - ogrgeojsondriver.o \ - ogrgeojsondatasource.o \ - ogrgeojsonlayer.o \ - ogrgeojsonwritelayer.o \ - ogrgeojsonutils.o \ - ogrgeojsonreader.o \ - ogrgeojsonwriter.o \ - ogresrijsondriver.o \ - ogresrijsonreader.o \ - ogrtopojsondriver.o \ - ogrtopojsonreader.o \ - ogrgeojsonseqdriver.o - -CPPFLAGS := $(JSON_INCLUDE) -iquote . -iquote .. -iquote ../.. $(CPPFLAGS) - -default: $(foreach d,$(SUBDIRS-yes),$(d)-target) $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: $(foreach d,$(SUBDIRS-yes),$(d)-clean) - rm -f *.o $(O_OBJ) - rm -f *~ - -$(O_OBJ): ogr_geojson.h ogrgeojsonreader.h diff --git a/ogr/ogrsf_frmts/geojson/libjson/GNUmakefile b/ogr/ogrsf_frmts/geojson/libjson/GNUmakefile deleted file mode 100644 index e946928efdc5..000000000000 --- a/ogr/ogrsf_frmts/geojson/libjson/GNUmakefile +++ /dev/null @@ -1,34 +0,0 @@ -# $Id$ -# -# Makefile building json-c library (http://oss.metaparadigm.com/json-c/) -# -include ../../../../GDALmake.opt - -OBJ = \ - arraylist.o \ - debug.o \ - json_object.o \ - json_tokener.o \ - json_util.o \ - linkhash.o \ - printbuf.o \ - json_object_iterator.o \ - json_c_version.o \ - random_seed.o \ - strerror_override.o - -O_OBJ = $(foreach file,$(OBJ),../../o/$(file)) - -CPPFLAGS := $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -# -D_XOPEN_SOURCE=500 to enable strdup() definition in C11 mode (should be 700 on OSX) -CPPFLAGS := -D_XOPEN_SOURCE=700 $(CPPFLAGS) - -../../o/%.$(OBJ_EXT): %.c - $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< - -clean: - rm -f *.o $(O_OBJ) - rm -f *~ diff --git a/ogr/ogrsf_frmts/geojson/libjson/makefile.vc b/ogr/ogrsf_frmts/geojson/libjson/makefile.vc deleted file mode 100644 index 400f22032402..000000000000 --- a/ogr/ogrsf_frmts/geojson/libjson/makefile.vc +++ /dev/null @@ -1,30 +0,0 @@ -# $Id$ -# -# Makefile building json-c library (http://oss.metaparadigm.com/json-c/) -# - -OBJ = \ - arraylist.obj \ - debug.obj \ - json_object.obj \ - json_tokener.obj \ - json_util.obj \ - linkhash.obj \ - printbuf.obj \ - json_object_iterator.obj \ - json_c_version.obj \ - random_seed.obj \ - strerror_override.obj - -GDAL_ROOT = ..\..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -# disable warning C4306: 'type cast' : conversion from 'int' to 'void *' of greater size -EXTRAFLAGS = -I.. -I..\.. -I..\..\.. $(SOFTWARNFLAGS) /wd4306 - -default: $(OBJ) - -clean: - -del *.lib - -del *.obj *.pdb diff --git a/ogr/ogrsf_frmts/geojson/makefile.vc b/ogr/ogrsf_frmts/geojson/makefile.vc deleted file mode 100644 index f8197c7dea06..000000000000 --- a/ogr/ogrsf_frmts/geojson/makefile.vc +++ /dev/null @@ -1,40 +0,0 @@ -# $Id$ -# -# Makefile to build OGR GeoJSON driver -# -GDAL_ROOT = ..\..\.. - -GEOJSON_OBJ = \ - ogrgeojsondriver.obj \ - ogrgeojsondatasource.obj \ - ogrgeojsonlayer.obj \ - ogrgeojsonwritelayer.obj \ - ogrgeojsonutils.obj \ - ogrgeojsonreader.obj \ - ogrgeojsonwriter.obj \ - ogresrijsondriver.obj \ - ogresrijsonreader.obj \ - ogrtopojsondriver.obj \ - ogrtopojsonreader.obj \ - ogrgeojsonseqdriver.obj - -EXTRAFLAGS = -I. -I.. -I..\.. -Ilibjson - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -# TODO: Do we want to include GeoJSON driver by default -# or if user asks for it? Now it is on by default. - -OBJ = $(GEOJSON_OBJ) - -default: $(OBJ) - cd libjson - $(MAKE) /f makefile.vc - cd .. - -clean: - cd libjson - $(MAKE) /f makefile.vc clean - cd .. - -del *.lib - -del *.obj *.pdb diff --git a/ogr/ogrsf_frmts/georss/GNUmakefile b/ogr/ogrsf_frmts/georss/GNUmakefile deleted file mode 100644 index ce80b043f523..000000000000 --- a/ogr/ogrsf_frmts/georss/GNUmakefile +++ /dev/null @@ -1,19 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogrgeorssdriver.o ogrgeorssdatasource.o ogrgeorsslayer.o - -ifeq ($(HAVE_EXPAT),yes) -CPPFLAGS += -DHAVE_EXPAT -endif - -CPPFLAGS := -iquote .. -iquote ../.. $(EXPAT_INCLUDE) $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ): ogr_georss.h - diff --git a/ogr/ogrsf_frmts/georss/makefile.vc b/ogr/ogrsf_frmts/georss/makefile.vc deleted file mode 100644 index c70aec74dc8a..000000000000 --- a/ogr/ogrsf_frmts/georss/makefile.vc +++ /dev/null @@ -1,18 +0,0 @@ - -OBJ = ogrgeorssdriver.obj ogrgeorssdatasource.obj ogrgeorsslayer.obj - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -!IFDEF EXPAT_DIR -EXTRAFLAGS = -I.. -I..\.. $(EXPAT_INCLUDE) -DHAVE_EXPAT=1 -!ELSE -EXTRAFLAGS = -I.. -I..\.. -!ENDIF - -default: $(OBJ) - -clean: - -del *.obj *.pdb - diff --git a/ogr/ogrsf_frmts/gml/GNUmakefile b/ogr/ogrsf_frmts/gml/GNUmakefile deleted file mode 100644 index b7dee1444298..000000000000 --- a/ogr/ogrsf_frmts/gml/GNUmakefile +++ /dev/null @@ -1,42 +0,0 @@ - - -include ../../../GDALmake.opt - -CORE_OBJ = gmlpropertydefn.o gmlfeatureclass.o gmlfeature.o gmlreader.o \ - parsexsd.o resolvexlinks.o hugefileresolver.o gmlutils.o \ - gmlreadstate.o gmlhandler.o gfstemplate.o gmlregistry.o - -OGR_OBJ = ogrgmldriver.o ogrgmldatasource.o ogrgmllayer.o - -OBJ = $(CORE_OBJ) $(OGR_OBJ) - -CPPFLAGS := -iquote .. -iquote ../.. $(XERCES_INCLUDE) $(EXPAT_INCLUDE) $(SQLITE_INC) $(CPPFLAGS) -#CFLAGS := $(filter-out -Wall,$(CFLAGS)) - -ifeq ($(HAVE_XERCES),yes) -CPPFLAGS += -DHAVE_XERCES -endif - -ifeq ($(HAVE_EXPAT),yes) -CPPFLAGS += -DHAVE_EXPAT -endif - -ifeq ($(HAVE_SQLITE),yes) -CPPFLAGS += -DHAVE_SQLITE -endif - -# By default, XML validation is disabled. Uncomment the following line to -# enable XML schema validation in the parser. -#CPPFLAGS += -DOGR_GML_VALIDATION=1 - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o gmlview $(O_OBJ) - -gmlview: gmlview.cpp $(CORE_OBJ:.o=.$(OBJ_EXT)) - $(CXX) $(CPPFLAGS) $(CFLAGS) $(LNK_FLAGS) \ - gmlview.cpp $(CORE_OBJ:.o=.$(OBJ_EXT)) $(GDAL_LIB) $(LIBS) \ - -o gmlview - -$(O_OBJ): ogr_gml.h gmlreader.h gmlreaderp.h diff --git a/ogr/ogrsf_frmts/gml/makefile.vc b/ogr/ogrsf_frmts/gml/makefile.vc deleted file mode 100644 index cd916a6ffbde..000000000000 --- a/ogr/ogrsf_frmts/gml/makefile.vc +++ /dev/null @@ -1,46 +0,0 @@ - -LL_OBJ = gmlpropertydefn.obj gmlfeatureclass.obj gmlfeature.obj \ - gmlreader.obj parsexsd.obj resolvexlinks.obj hugefileresolver.obj gmlutils.obj \ - gmlreadstate.obj gmlhandler.obj gfstemplate.obj gmlregistry.obj -OGR_OBJ = ogrgmldriver.obj ogrgmldatasource.obj ogrgmllayer.obj - -OBJ = $(LL_OBJ) $(OGR_OBJ) - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -EXTRAFLAGS = -I.. -I..\.. $(XERCES_EXTRAFLAGS) $(EXPAT_EXTRAFLAGS) $(SQLITE_EXTRAFLAGS) - -# By default, XML validation is disabled. Uncomment the following line to -# enable XML schema validation in the parser. -#OGR_GML_VALIDATION = -DOGR_GML_VALIDATION=1 - -!IFDEF XERCES_DIR -XERCES_EXTRAFLAGS = $(XERCES_INCLUDE) -DHAVE_XERCES $(OGR_GML_VALIDATION) -!ENDIF - -!IFDEF EXPAT_DIR -EXPAT_EXTRAFLAGS = $(EXPAT_INCLUDE) -DHAVE_EXPAT -!ENDIF - -!IFDEF SQLITE_INC -SQLITE_EXTRAFLAGS = $(SQLITE_INC) -DHAVE_SQLITE -!ENDIF - -# By default, XML validation is disabled. Uncomment the following line to -# enable XML schema validation in the parser. -#ALL_C_FLAGS := -DOGR_GML_VALIDATION=1 $(ALL_C_FLAGS) - - -default: $(OBJ) - -clean: - -del *.lib - -del *.obj *.pdb - -gmlview.exe: $(LL_OBJ) gmlview.obj - cl /Zi gmlview.obj $(LL_OBJ) \ - ../../ogr.lib ../ogrsf_frmts.lib ../ogrsf_frmts_sup.lib \ - $(GDAL_ROOT)/port/cpl.lib $(XERCES_LIB) $(LIBS) - diff --git a/ogr/ogrsf_frmts/gmlas/GNUmakefile b/ogr/ogrsf_frmts/gmlas/GNUmakefile deleted file mode 100644 index 73079e6600e9..000000000000 --- a/ogr/ogrsf_frmts/gmlas/GNUmakefile +++ /dev/null @@ -1,17 +0,0 @@ - -include ../../../GDALmake.opt - -OBJ = ogrgmlasdriver.o ogrgmlasdatasource.o ogrgmlaslayer.o \ - ogrgmlasreader.o ogrgmlasschemaanalyzer.o ogrgmlasfeatureclass.o \ - ogrgmlasxsdcache.o ogrgmlasconf.o ogrgmlasxpatchmatcher.o \ - ogrgmlasxlinkresolver.o ogrgmlaswriter.o ogrgmlasutils.o - -CPPFLAGS := -iquote ../mem -iquote ../geojson $(JSON_INCLUDE) -iquote .. -iquote ../.. -iquote ../pgdump -DHAVE_XERCES=1 \ - $(XERCES_INCLUDE) $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ): ogr_gmlas.h ogr_gmlas_consts.h diff --git a/ogr/ogrsf_frmts/gmlas/makefile.vc b/ogr/ogrsf_frmts/gmlas/makefile.vc deleted file mode 100644 index 3d9bf33ed5ee..000000000000 --- a/ogr/ogrsf_frmts/gmlas/makefile.vc +++ /dev/null @@ -1,18 +0,0 @@ - -OBJ = ogrgmlasdriver.obj ogrgmlasdatasource.obj ogrgmlaslayer.obj \ - ogrgmlasreader.obj ogrgmlasschemaanalyzer.obj ogrgmlasfeatureclass.obj \ - ogrgmlasxsdcache.obj ogrgmlasconf.obj ogrgmlasxpatchmatcher.obj \ - ogrgmlasxlinkresolver.obj ogrgmlaswriter.obj ogrgmlasutils.obj - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -EXTRAFLAGS = -I.. -I..\.. -I..\mem -I..\geojson -I..\geojson\libjson -I..\pgdump $(XERCES_INCLUDE) -DHAVE_XERCES=1 $(EXPAT_EXTRAFLAGS) - -default: $(OBJ) - -clean: - -del *.lib - -del *.obj *.pdb - diff --git a/ogr/ogrsf_frmts/gmt/GNUmakefile b/ogr/ogrsf_frmts/gmt/GNUmakefile deleted file mode 100644 index ded565d062c2..000000000000 --- a/ogr/ogrsf_frmts/gmt/GNUmakefile +++ /dev/null @@ -1,11 +0,0 @@ - -include ../../../GDALmake.opt - -OBJ = ogrgmtdriver.o ogrgmtdatasource.o ogrgmtlayer.o - -CPPFLAGS := -iquote .. -iquote ../.. $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) diff --git a/ogr/ogrsf_frmts/gmt/makefile.vc b/ogr/ogrsf_frmts/gmt/makefile.vc deleted file mode 100644 index 04f15a41e78d..000000000000 --- a/ogr/ogrsf_frmts/gmt/makefile.vc +++ /dev/null @@ -1,16 +0,0 @@ - -OBJ = ogrgmtdriver.obj ogrgmtdatasource.obj ogrgmtlayer.obj \ - -EXTRAFLAGS = -I.. -I..\.. - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - -clean: - -del *.obj *.pdb - - - diff --git a/ogr/ogrsf_frmts/gpkg/GNUmakefile b/ogr/ogrsf_frmts/gpkg/GNUmakefile deleted file mode 100644 index 3f1882ca4763..000000000000 --- a/ogr/ogrsf_frmts/gpkg/GNUmakefile +++ /dev/null @@ -1,22 +0,0 @@ - -include ../../../GDALmake.opt - -OBJ = ogrgeopackagedriver.o ogrgeopackagedatasource.o ogrgeopackagelayer.o \ - ogrgeopackagetablelayer.o ogrgeopackageselectlayer.o ogrgeopackageutility.o \ - gdalgeopackagerasterband.o - -ifeq ($(SQLITE_HAS_COLUMN_METADATA),yes) -CPPFLAGS += -DSQLITE_HAS_COLUMN_METADATA -endif - -CPPFLAGS := -iquote .. -iquote ../sqlite -iquote ../generic -iquote ../../../frmts/mem -iquote ../../../frmts $(SQLITE_INC) $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ): ogr_geopackage.h ogrgeopackageutility.h gpkgmbtilescommon.h ../sqlite/ogrsqlitebase.h - - diff --git a/ogr/ogrsf_frmts/gpkg/makefile.vc b/ogr/ogrsf_frmts/gpkg/makefile.vc deleted file mode 100644 index 9245fd5accb2..000000000000 --- a/ogr/ogrsf_frmts/gpkg/makefile.vc +++ /dev/null @@ -1,22 +0,0 @@ - -OBJ = ogrgeopackagedriver.obj ogrgeopackagedatasource.obj \ - ogrgeopackagelayer.obj ogrgeopackagetablelayer.obj ogrgeopackageselectlayer.obj ogrgeopackageutility.obj \ - gdalgeopackagerasterband.obj - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -EXTRAFLAGS = -I.. -I..\.. -I..\sqlite -I..\generic -I..\..\..\frmts\mem -I..\..\..\frmts $(SQLITE_INC) $(SQLITE_HAS_COLUMN_METADATA_EXTRAFLAGS) - -!IFDEF SQLITE_HAS_COLUMN_METADATA -SQLITE_HAS_COLUMN_METADATA_EXTRAFLAGS = -DSQLITE_HAS_COLUMN_METADATA -!ENDIF - -default: $(OBJ) - -clean: - -del *.lib - -del *.obj *.pdb - -del *.exe - diff --git a/ogr/ogrsf_frmts/gpsbabel/GNUmakefile b/ogr/ogrsf_frmts/gpsbabel/GNUmakefile deleted file mode 100644 index c346a15c36d3..000000000000 --- a/ogr/ogrsf_frmts/gpsbabel/GNUmakefile +++ /dev/null @@ -1,14 +0,0 @@ - -include ../../../GDALmake.opt - -OBJ = ogrgpsbabeldriver.o ogrgpsbabeldatasource.o ogrgpsbabelwritedatasource.o - -CPPFLAGS := -iquote .. -iquote ../.. $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ): ogr_gpsbabel.h - diff --git a/ogr/ogrsf_frmts/gpsbabel/makefile.vc b/ogr/ogrsf_frmts/gpsbabel/makefile.vc deleted file mode 100644 index fc3a1b798822..000000000000 --- a/ogr/ogrsf_frmts/gpsbabel/makefile.vc +++ /dev/null @@ -1,16 +0,0 @@ - -OBJ = ogrgpsbabeldriver.obj ogrgpsbabeldatasource.obj ogrgpsbabelwritedatasource.obj - -EXTRAFLAGS = -I.. -I..\.. - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - -clean: - -del *.obj *.pdb - - - diff --git a/ogr/ogrsf_frmts/gpx/GNUmakefile b/ogr/ogrsf_frmts/gpx/GNUmakefile deleted file mode 100644 index 21eed607d08b..000000000000 --- a/ogr/ogrsf_frmts/gpx/GNUmakefile +++ /dev/null @@ -1,19 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogrgpxdriver.o ogrgpxdatasource.o ogrgpxlayer.o - -ifeq ($(HAVE_EXPAT),yes) -CPPFLAGS += -DHAVE_EXPAT -endif - -CPPFLAGS := -iquote .. -iquote ../.. $(EXPAT_INCLUDE) $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ): ogr_gpx.h - diff --git a/ogr/ogrsf_frmts/gpx/makefile.vc b/ogr/ogrsf_frmts/gpx/makefile.vc deleted file mode 100644 index 64849b49b68b..000000000000 --- a/ogr/ogrsf_frmts/gpx/makefile.vc +++ /dev/null @@ -1,18 +0,0 @@ - -OBJ = ogrgpxdriver.obj ogrgpxdatasource.obj ogrgpxlayer.obj - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -!IFDEF EXPAT_DIR -EXTRAFLAGS = -I.. -I..\.. $(EXPAT_INCLUDE) -DHAVE_EXPAT=1 -!ELSE -EXTRAFLAGS = -I.. -I..\.. -!ENDIF - -default: $(OBJ) - -clean: - -del *.obj *.pdb - diff --git a/ogr/ogrsf_frmts/hana/GNUmakefile b/ogr/ogrsf_frmts/hana/GNUmakefile deleted file mode 100644 index 7fd05ca77527..000000000000 --- a/ogr/ogrsf_frmts/hana/GNUmakefile +++ /dev/null @@ -1,27 +0,0 @@ -# $Id$ -# -# Makefile to build OGR SAP HANA driver -# - -include ../../../GDALmake.opt - -OBJ = ogrhanadriver.o ogrhanadatasource.o ogrhanautils.o \ - ogrhanatablelayer.o ogrhanalayer.o ogrhanaresultlayer.o \ - ogrhanafeaturereader.o ogrhanafeaturewriter.o - -CPPFLAGS := -I.. -I../.. $(ODBCCPP_INC) -DODBC_STATIC $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ): ogr_hana.h ogrhanautils.h ogrhanafeaturereader.h ogrhanafeaturewriter.h - -PLUGIN_SO = ogr_HANA.$(SO_EXT) - -plugin: $(PLUGIN_SO) - -$(PLUGIN_SO): $(OBJ) - $(LD_SHARED) $(LNK_FLAGS) $(OBJ) $(CONFIG_LIBS_INS) $(LIBS) \ - -o $(PLUGIN_SO) diff --git a/ogr/ogrsf_frmts/idb/GNUmakefile b/ogr/ogrsf_frmts/idb/GNUmakefile deleted file mode 100644 index 74f7acc999e2..000000000000 --- a/ogr/ogrsf_frmts/idb/GNUmakefile +++ /dev/null @@ -1,15 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogridbdatasource.o ogridblayer.o ogridbdriver.o \ - ogridbtablelayer.o ogridbselectlayer.o - -IDB_DEFS = -DIT_DLLIB -DIT_DO_NOT_SIMULATE_BOOL - -CPPFLAGS := -iquote .. -iquote ../.. $(IDB_INC) $(IDB_DEFS) $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) diff --git a/ogr/ogrsf_frmts/idb/makefile.vc b/ogr/ogrsf_frmts/idb/makefile.vc deleted file mode 100644 index 5263f8d12dd5..000000000000 --- a/ogr/ogrsf_frmts/idb/makefile.vc +++ /dev/null @@ -1,16 +0,0 @@ - -OBJ = ogridbdriver.obj ogridbdatasource.obj ogridblayer.obj \ - ogridbtablelayer.obj ogridbselectlayer.obj - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -EXTRAFLAGS = -I.. -I..\.. $(IDB_INC) - -default: $(OBJ) - -clean: - -del *.lib - -del *.obj *.pdb - -del *.exe diff --git a/ogr/ogrsf_frmts/idrisi/GNUmakefile b/ogr/ogrsf_frmts/idrisi/GNUmakefile deleted file mode 100644 index d6b46e6ebc5d..000000000000 --- a/ogr/ogrsf_frmts/idrisi/GNUmakefile +++ /dev/null @@ -1,14 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogridrisidriver.o ogridrisidatasource.o ogridrisilayer.o - -CPPFLAGS := -iquote .. -iquote ../.. -iquote ../../../frmts/idrisi $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ): ogr_idrisi.h \ No newline at end of file diff --git a/ogr/ogrsf_frmts/idrisi/makefile.vc b/ogr/ogrsf_frmts/idrisi/makefile.vc deleted file mode 100644 index 76cbeadf623a..000000000000 --- a/ogr/ogrsf_frmts/idrisi/makefile.vc +++ /dev/null @@ -1,15 +0,0 @@ - -OBJ = ogridrisidriver.obj ogridrisidatasource.obj ogridrisilayer.obj -EXTRAFLAGS = -I.. -I..\.. -I..\..\..\frmts\idrisi - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - -clean: - -del *.obj *.pdb - - - diff --git a/ogr/ogrsf_frmts/ili/GNUmakefile b/ogr/ogrsf_frmts/ili/GNUmakefile deleted file mode 100644 index 8eeb4ba56669..000000000000 --- a/ogr/ogrsf_frmts/ili/GNUmakefile +++ /dev/null @@ -1,21 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogrili1driver.o ogrili1datasource.o ogrili1layer.o \ - ogrili2driver.o ogrili2datasource.o ogrili2layer.o \ - ili1reader.o ili2reader.o ili2handler.o \ - imdreader.o - -ifeq ($(HAVE_GEOS),yes) -CPPFLAGS := -DHAVE_GEOS=1 $(GEOS_CFLAGS) $(CPPFLAGS) -endif - -CPPFLAGS := -iquote .. -iquote ../.. -DHAVE_XERCES $(XERCES_INCLUDE) $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ): ogr_ili1.h ogr_ili2.h imdreader.h ili1reader.h ili1readerp.h ili2reader.h ili2readerp.h diff --git a/ogr/ogrsf_frmts/ili/makefile.vc b/ogr/ogrsf_frmts/ili/makefile.vc deleted file mode 100644 index 1f3ac01dd660..000000000000 --- a/ogr/ogrsf_frmts/ili/makefile.vc +++ /dev/null @@ -1,17 +0,0 @@ - -OBJ = ili1reader.obj ili2reader.obj ili2handler.obj \ - ogrili1driver.obj ogrili1datasource.obj \ - ogrili1layer.obj ogrili2driver.obj ogrili2datasource.obj \ - ogrili2layer.obj imdreader.obj - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -EXTRAFLAGS = -I. -Iiom -I.. -I..\.. -DHAVE_XERCES $(XERCES_INCLUDE) $(GEOS_CFLAGS) - -default: $(OBJ) - -clean: - -del *.obj *.pdb - diff --git a/ogr/ogrsf_frmts/jml/GNUmakefile b/ogr/ogrsf_frmts/jml/GNUmakefile deleted file mode 100644 index e9911fb53c40..000000000000 --- a/ogr/ogrsf_frmts/jml/GNUmakefile +++ /dev/null @@ -1,19 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogrjmldataset.o ogrjmllayer.o ogrjmlwriterlayer.o - -ifeq ($(HAVE_EXPAT),yes) -CPPFLAGS += -DHAVE_EXPAT -endif - -CPPFLAGS := -iquote .. -iquote ../.. $(EXPAT_INCLUDE) $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ): ogr_jml.h - diff --git a/ogr/ogrsf_frmts/jml/makefile.vc b/ogr/ogrsf_frmts/jml/makefile.vc deleted file mode 100644 index b5662c7237b5..000000000000 --- a/ogr/ogrsf_frmts/jml/makefile.vc +++ /dev/null @@ -1,18 +0,0 @@ - -OBJ = ogrjmldataset.obj ogrjmllayer.obj ogrjmlwriterlayer.obj - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -!IFDEF EXPAT_DIR -EXTRAFLAGS = -I.. -I..\.. $(EXPAT_INCLUDE) -DHAVE_EXPAT=1 -!ELSE -EXTRAFLAGS = -I.. -I..\.. -!ENDIF - -default: $(OBJ) - -clean: - -del *.obj *.pdb - diff --git a/ogr/ogrsf_frmts/kml/GNUmakefile b/ogr/ogrsf_frmts/kml/GNUmakefile deleted file mode 100644 index 5836d1593ee3..000000000000 --- a/ogr/ogrsf_frmts/kml/GNUmakefile +++ /dev/null @@ -1,25 +0,0 @@ - - -include ../../../GDALmake.opt - -CORE_OBJ = ogr2kmlgeometry.o - -OGR_OBJ = ogrkmldriver.o ogrkmldatasource.o ogrkmllayer.o - -OBJ = $(CORE_OBJ) $(OGR_OBJ) - -ifeq ($(HAVE_EXPAT),yes) -OGR_OBJ += kml.o kmlnode.o kmlvector.o -CPPFLAGS += -DHAVE_EXPAT -endif - -CPPFLAGS := -iquote . $(CPPFLAGS) $(EXPAT_INCLUDE) - -#CFLAGS := $(filter-out -Wall,$(CFLAGS)) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o kmlview $(O_OBJ) - -$(O_OBJ): kml.h kmlnode.h kmlutility.h kmlvector.h ogr_kml.h diff --git a/ogr/ogrsf_frmts/kml/makefile.vc b/ogr/ogrsf_frmts/kml/makefile.vc deleted file mode 100644 index dd3b276381d4..000000000000 --- a/ogr/ogrsf_frmts/kml/makefile.vc +++ /dev/null @@ -1,22 +0,0 @@ - -EXPAT_OBJ = kml.obj kmlvector.obj kmlnode.obj -OGR_OBJ = ogrkmldriver.obj ogrkmldatasource.obj ogrkmllayer.obj \ - ogr2kmlgeometry.obj - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -!IFDEF EXPAT_DIR -OBJ = $(EXPAT_OBJ) $(OGR_OBJ) -EXTRAFLAGS = -I.. -I..\.. $(EXPAT_INCLUDE) -DHAVE_EXPAT=1 -!ELSE -OBJ = $(OGR_OBJ) -EXTRAFLAGS = -I.. -I..\.. -!ENDIF - -default: $(OBJ) - -clean: - -del *.lib - -del *.obj *.pdb diff --git a/ogr/ogrsf_frmts/libkml/GNUmakefile b/ogr/ogrsf_frmts/libkml/GNUmakefile deleted file mode 100644 index 45805c193389..000000000000 --- a/ogr/ogrsf_frmts/libkml/GNUmakefile +++ /dev/null @@ -1,29 +0,0 @@ - - -include ../../../GDALmake.opt - -CORE_OBJ = ogrlibkmlgeometry.o \ - ogrlibkmlfield.o \ - ogrlibkmlfeature.o \ - ogrlibkmlfeaturestyle.o \ - ogrlibkmlstyle.o - -OGR_OBJ = ogrlibkmldriver.o ogrlibkmldatasource.o ogrlibkmllayer.o - -OBJ = $(CORE_OBJ) $(OGR_OBJ) - -CPPFLAGS := -iquote . $(CPPFLAGS) $(LIBKML_INCLUDE) - -#CFLAGS := $(filter-out -Wall,$(CFLAGS)) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ): ogrlibkmlgeometry.h \ - ogrlibkmlfield.h \ - ogrlibkmlfeature.h \ - ogrlibkmlfeaturestyle.h \ - ogrlibkmlstyle.h \ - ogr_libkml.h diff --git a/ogr/ogrsf_frmts/libkml/makefile.vc b/ogr/ogrsf_frmts/libkml/makefile.vc deleted file mode 100644 index ef654bf5ccc0..000000000000 --- a/ogr/ogrsf_frmts/libkml/makefile.vc +++ /dev/null @@ -1,37 +0,0 @@ -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -CORE_OBJ = ogrlibkmlgeometry.obj \ - ogrlibkmlfield.obj \ - ogrlibkmlfeature.obj \ - ogrlibkmlfeaturestyle.obj \ - ogrlibkmlstyle.obj - -PLUGIN_DLL = ogr_LIBKML.dll - -OGR_OBJ = ogrlibkmldriver.obj \ - ogrlibkmldatasource.obj \ - ogrlibkmllayer.obj - -OBJ = $(CORE_OBJ) $(OGR_OBJ) - -EXTRAFLAGS = -I.. -I..\.. $(LIBKML_INCLUDE) - -default: $(OBJ) - -clean: - -del *.lib - -del *.obj *.pdb - -del *.dll - -plugin: $(PLUGIN_DLL) - -$(PLUGIN_DLL): $(OBJ) - link /dll $(LDEBUG) /out:$(PLUGIN_DLL) $(OBJ) /LTCG \ - $(GDALLIB) $(LIBKML_LIBS) - -plugin-install: - -mkdir $(PLUGINDIR) - $(INSTALL) $(PLUGIN_DLL) $(PLUGINDIR) - diff --git a/ogr/ogrsf_frmts/lvbag/GNUmakefile b/ogr/ogrsf_frmts/lvbag/GNUmakefile deleted file mode 100644 index 0b4e93526a84..000000000000 --- a/ogr/ogrsf_frmts/lvbag/GNUmakefile +++ /dev/null @@ -1,22 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogrlvbagdriver.o ogrlvbagdatasource.o ogrlvbaglayer.o - -ifeq ($(HAVE_EXPAT),yes) -CPPFLAGS += -DHAVE_EXPAT -endif - -ifeq ($(HAVE_GEOS),yes) -CPPFLAGS += -DHAVE_GEOS $(GEOS_CFLAGS) -endif - -CPPFLAGS := -iquote .. -iquote ../.. -iquote ../generic $(EXPAT_INCLUDE) $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ): ogr_lvbag.h diff --git a/ogr/ogrsf_frmts/lvbag/makefile.vc b/ogr/ogrsf_frmts/lvbag/makefile.vc deleted file mode 100644 index f490c87ac249..000000000000 --- a/ogr/ogrsf_frmts/lvbag/makefile.vc +++ /dev/null @@ -1,18 +0,0 @@ - -OBJ = ogrlvbagdriver.obj ogrlvbagdatasource.obj ogrlvbaglayer.obj - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -!IFDEF EXPAT_DIR -EXTRAFLAGS = -I.. -I..\.. -I..\generic $(EXPAT_INCLUDE) $(GEOS_CFLAGS) -DHAVE_EXPAT=1 -!ELSE -EXTRAFLAGS = -I.. -I..\.. -I..\generic $(GEOS_CFLAGS) -!ENDIF - -default: $(OBJ) - -clean: - -del *.obj *.pdb - diff --git a/ogr/ogrsf_frmts/makefile.vc b/ogr/ogrsf_frmts/makefile.vc deleted file mode 100644 index d7ac4a41aed7..000000000000 --- a/ogr/ogrsf_frmts/makefile.vc +++ /dev/null @@ -1,276 +0,0 @@ -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -!IFDEF INCLUDE_OGR_FRMTS - -DIRLIST = generic geojson shape ntf sdts tiger s57 dgn mitab gml \ - avc mem vrt csv gmt kml gpx \ - geoconcept georss dxf pgdump gpsbabel \ - pds edigeo svg idrisi \ - sxf openfilegdb wasp selafin jml vdv mvt flatgeobuf mapml \ - $(OGDIDIR) $(OCIDIR) $(PG_DIR) $(DWGDIR) \ - $(ODBCDIR) $(SQLITE_DIR) $(MYSQL_DIR) $(ILI_DIR) \ - $(IDB_DIR) $(NAS_DIR) \ - $(LIBKMLDIR) $(WFSDIR) $(SOSIDIR) \ - $(FGDB_DIR) $(XLSDIR) $(ODSDIR) $(XLSXDIR) $(LVBAGDIR) \ - $(ELASTICDIR) $(GPKGDIR) $(OSMDIR) $(VFKDIR) $(CARTODIR) $(AMIGOCLOUD_DIR) \ - $(PLSCENESDIR) $(CSWDIR) $(MONGODBV3DIR) $(GMLAS_DIR) $(CAD_DIR) $(NGW_DIR) - -PLUGINDIRLIST = \ - $(PLUGIN_DWG_DIR) \ - $(PLUGIN_PG_DIR) \ - $(PLUGIN_SOSI_DIR) \ - $(PLUGIN_FGDB_DIR) \ - $(PLUGIN_AMIGOCLOUD_DIR) \ - $(PLUGIN_OCIDIR) \ - $(PLUGIN_LIBKMLDIR) \ - $(PLUGIN_MONGODBV3DIR) \ - $(PLUGIN_MSSPATIALDIR) - -!IFDEF OGDIDIR -OGDIDIR = ogdi -OGDIOBJ = ogdi\*.obj -!ENDIF - -!IFDEF ODBC_SUPPORTED -ODBCDIR = odbc pgeo mssqlspatial -ODBCOBJ = odbc\*.obj pgeo\*.obj mssqlspatial\*.obj -!ENDIF - -!IFDEF SQLNCLI_LIB -PLUGIN_MSSPATIALDIR = mssqlspatial -!ENDIF - -!IFDEF SQLITE_LIB -SQLITE_DIR = sqlite -SQLITE_OBJ = sqlite\*.obj -!ENDIF - -!IFDEF OCI_LIB -!IF "$(OCI_PLUGIN)" != "YES" -OCIDIR = oci -OCIOBJ = oci\*.obj -!ELSE -PLUGIN_OCIDIR = oci -!ENDIF -!ENDIF - -!IFDEF PG_INC_DIR -!IF "$(PG_PLUGIN)" != "YES" -PG_DIR = pg -PG_OBJ = pg\*.obj -!ELSE -PLUGIN_PG_DIR = pg -!ENDIF -!ENDIF - -!IFDEF TD_LIBS -!IF "$(TD_PLUGIN)" != "YES" -DWGDIR = dwg -DWG_OBJ = dwg\*.obj -!ELSE -PLUGIN_DWG_DIR = dwg -!ENDIF -!ENDIF - -!IFDEF FGDB_LIB -!IF "$(FGDB_PLUGIN)" != "YES" -FGDB_DIR = filegdb -FGDB_OBJ = filegdb\*.obj -!ELSE -PLUGIN_FGDB_DIR = filegdb -!ENDIF -!ENDIF - - -!IFDEF MYSQL_INC_DIR -MYSQL_DIR = mysql -MYSQL_OBJ = mysql\*.obj -!ENDIF - -!IFDEF ILI_ENABLED -ILI_DIR = ili -ILI_OBJ = ili\*.obj ili\iom\*.obj -!ENDIF - -!IFDEF NAS_ENABLED -NAS_DIR = nas -NAS_OBJ = nas\*.obj -!ENDIF - -!IFDEF XERCES_INCLUDE -GMLAS_DIR = gmlas -GMLAS_OBJ = gmlas\*.obj -!ENDIF - -!IFDEF INFORMIXDIR -IDB_DIR = idb -IDB_OBJ = idb\*.obj -!ENDIF - -!IFDEF LIBKML_DIR -!IF "$(LIBKML_PLUGIN)" != "YES" -LIBKMLDIR = libkml -LIBKMLOBJ = libkml\*.obj -!ELSE -PLUGIN_LIBKMLDIR = libkml -!ENDIF -!ENDIF - -!IFDEF CURL_LIB -WFSDIR = wfs -WFS_OBJ = wfs\*.obj -CSWDIR = csw -CSW_OBJ = csw\*.obj -!ENDIF - -!IFDEF SOSI_INC_DIR -!IF "$(SOSI_PLUGIN)" != "YES" -SOSIDIR = sosi -SOSI_OBJ = sosi\*.obj -!ELSE -PLUGIN_SOSI_DIR = sosi -!ENDIF -!ENDIF - -!IFDEF FREEXL_LIBS -XLSDIR = xls -XLS_OBJ = xls\*.obj -!ENDIF - -!IFDEF EXPAT_INCLUDE -ODSDIR = ods -ODS_OBJ = ods\*.obj -!ENDIF - -!IFDEF EXPAT_INCLUDE -XLSXDIR = xlsx -XLSX_OBJ = xlsx\*.obj -!ENDIF - -!IFDEF EXPAT_INCLUDE -LVBAGDIR = lvbag -LVBAG_OBJ = lvbag\*.obj -!ENDIF - -!IFDEF CURL_LIB -ELASTICDIR = elastic -ELASTIC_OBJ = elastic\*.obj -!ENDIF - -!IFDEF SQLITE_LIB -GPKGDIR = gpkg -GPKG_OBJ = gpkg\*.obj -OSMDIR = osm -OSM_OBJ = osm\*.obj -VFKDIR = vfk -VFK_OBJ = vfk\*.obj -!ENDIF - -!IFDEF CURL_LIB -CARTODIR = carto -CARTO_OBJ = carto\*.obj -!ENDIF - -!IFDEF CURL_LIB -!IF "$(AMIGOCLOUD_PLUGIN)" != "YES" -AMIGOCLOUD_DIR = amigocloud -AMIGOCLOUD_OBJ = amigocloud\*.obj -!ELSE -PLUGIN_AMIGOCLOUD_DIR = amigocloud -!ENDIF -!ENDIF - -!IFDEF CURL_LIB -PLSCENESDIR = plscenes -PLSCENES_OBJ = plscenes\*.obj -!ENDIF - -!IFDEF MONGOCXXV3_CFLAGS -!IF "$(MONGODBV3_PLUGIN)" != "YES" -MONGODBV3DIR = mongodbv3 -MONGODBV3OBJ = mongodbv3\*.obj -!ELSE -PLUGIN_MONGODBV3DIR = mongodbv3 -!ENDIF -!ENDIF - -!IFDEF CURL_LIB -NGW_DIR = ngw -NGW_OBJ = ngw\*.obj -!ENDIF - -CAD_DIR = cad -CAD_OBJ = cad\*.obj cad\libopencad\*.obj cad\libopencad\dwg\*.obj - -!ELSE - -DIRLIST = generic mitab - -!ENDIF - -default: - for %d in ( $(DIRLIST) ) do \ - cd %d \ - && $(MAKE) /f makefile.vc \ - && cd .. \ - || exit 1 - - lib /out:ogrsf_frmts.lib generic\*.obj shape\*.obj ntf\*.obj \ - sdts\*.obj s57\*.obj tiger\*.obj gml\*.obj \ - mitab\*.obj dgn\*.obj avc\*.obj mem\*.obj \ - vrt\*.obj csv\*.obj kml\*.obj \ - gmt\*.obj geoconcept\*.obj \ - geojson\*.obj geojson\libjson\*.obj \ - gpx\*.obj georss\*.obj \ - dxf\*.obj pgdump\*.obj gpsbabel\*.obj \ - pds\*.obj \ - edigeo\*.obj svg\*.obj idrisi\*.obj \ - sxf\*.obj \ - openfilegdb\*.obj wasp\*.obj selafin\*.obj jml\*.obj \ - vdv\*.obj mvt\*.obj flatgeobuf\*.obj mapml\*.obj \ - $(OGDIOBJ) $(ODBCOBJ) $(SQLITE_OBJ) \ - $(OCIOBJ) $(PG_OBJ) $(MYSQL_OBJ) \ - $(ILI_OBJ) $(DWG_OBJ) $(FGDB_OBJ) $(IDB_OBJ) \ - $(NAS_OBJ) $(LIBKMLOBJ) $(WFS_OBJ) \ - $(SOSI_OBJ) $(XLS_OBJ) $(ODS_OBJ) $(XLSX_OBJ) $(LVBAG_OBJ) \ - $(ELASTIC_OBJ) $(GPKG_OBJ) $(OSM_OBJ) $(VFK_OBJ) $(CARTO_OBJ) $(AMIGOCLOUD_OBJ) $(PLSCENES_OBJ) \ - $(CSW_OBJ) $(MONGODBV3OBJ) $(GMLAS_OBJ) $(CAD_OBJ) $(NGW_OBJ) - lib /out:ogrsf_frmts_sup.lib \ - ..\..\frmts\iso8211\*.obj \ - ..\..\frmts\sdts\sdtsattrreader.obj \ - ..\..\frmts\sdts\sdtscatd.obj \ - ..\..\frmts\sdts\sdtsiref.obj \ - ..\..\frmts\sdts\sdtslib.obj \ - ..\..\frmts\sdts\sdtslinereader.obj \ - ..\..\frmts\sdts\sdtspointreader.obj \ - ..\..\frmts\sdts\sdtspolygonreader.obj \ - ..\..\frmts\sdts\sdtsrasterreader.obj \ - ..\..\frmts\sdts\sdtstransfer.obj \ - ..\..\frmts\sdts\sdtsindexedreader.obj \ - ..\..\frmts\sdts\sdtsxref.obj - -plugindirs: - @echo plugins: $(PLUGINDIRLIST) - -for %d in ( $(PLUGINDIRLIST) ) do \ - cd %d \ - && $(MAKE) /f makefile.vc plugin \ - && cd .. \ - || exit 1 - -clean: - -del ogrsf_frmts.lib - -del ogrsf_frmts_sup.lib - for %d in ( $(DIRLIST) $(PLUGINDIRLIST) ) do \ - cd %d \ - && $(MAKE) /f makefile.vc clean \ - && cd .. \ - || exit 1 - -plugins-install: - -for %d in ( $(PLUGINDIRLIST) ) do \ - cd %d \ - && $(MAKE) /f makefile.vc plugin-install \ - && cd .. \ - || exit 1 diff --git a/ogr/ogrsf_frmts/mapml/GNUmakefile b/ogr/ogrsf_frmts/mapml/GNUmakefile deleted file mode 100644 index cedafbf7e673..000000000000 --- a/ogr/ogrsf_frmts/mapml/GNUmakefile +++ /dev/null @@ -1,12 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogrmapmldataset.o - -CPPFLAGS := -iquote .. -iquote ../.. $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) diff --git a/ogr/ogrsf_frmts/mapml/makefile.vc b/ogr/ogrsf_frmts/mapml/makefile.vc deleted file mode 100644 index c2387cd8f6a8..000000000000 --- a/ogr/ogrsf_frmts/mapml/makefile.vc +++ /dev/null @@ -1,15 +0,0 @@ - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -OBJ = ogrmapmldataset.obj -EXTRAFLAGS = -I.. -I..\.. - -default: $(OBJ) - -clean: - -del *.obj *.pdb - - - diff --git a/ogr/ogrsf_frmts/mem/GNUmakefile b/ogr/ogrsf_frmts/mem/GNUmakefile deleted file mode 100644 index 5c72d326095e..000000000000 --- a/ogr/ogrsf_frmts/mem/GNUmakefile +++ /dev/null @@ -1,14 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogrmemdriver.o ogrmemdatasource.o ogrmemlayer.o - -CPPFLAGS := -iquote .. -iquote ../.. $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -$(O_OBJ): ogr_mem.h - -clean: - rm -f *.o $(O_OBJ) diff --git a/ogr/ogrsf_frmts/mem/makefile.vc b/ogr/ogrsf_frmts/mem/makefile.vc deleted file mode 100644 index f9b807bc4014..000000000000 --- a/ogr/ogrsf_frmts/mem/makefile.vc +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = ogrmemdriver.obj ogrmemdatasource.obj ogrmemlayer.obj -EXTRAFLAGS = -I.. -I..\.. - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - -clean: - -del *.obj *.pdb - diff --git a/ogr/ogrsf_frmts/mitab/GNUmakefile b/ogr/ogrsf_frmts/mitab/GNUmakefile deleted file mode 100644 index 296ba2fd375b..000000000000 --- a/ogr/ogrsf_frmts/mitab/GNUmakefile +++ /dev/null @@ -1,30 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = mitab_rawbinblock.o mitab_mapheaderblock.o \ - mitab_mapindexblock.o mitab_mapobjectblock.o \ - mitab_mapcoordblock.o mitab_feature.o mitab_feature_mif.o \ - mitab_mapfile.o mitab_idfile.o mitab_datfile.o \ - mitab_tabfile.o mitab_miffile.o mitab_utils.o \ - mitab_imapinfofile.o mitab_middatafile.o mitab_bounds.o \ - mitab_maptoolblock.o mitab_tooldef.o mitab_coordsys.o \ - mitab_spatialref.o mitab_ogr_driver.o mitab_indfile.o \ - mitab_tabview.o mitab_ogr_datasource.o mitab_geometry.o \ - mitab_tabseamless.o - -CPPFLAGS := -iquote .. -iquote ../.. $(CPPFLAGS) -DOGR \ - -DMITAB_USE_OFTDATETIME - -CXXFLAGS := $(WARN_EFFCPLUSPLUS) $(WARN_OLD_STYLE_CAST) $(CXXFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ): mitab.h mitab_priv.h mitab_ogr_driver.h - -update: - copymatch.sh ~/pkg/mitab *.TXT - copymatch.sh ~/pkg/mitab/mitab *.cpp *.h diff --git a/ogr/ogrsf_frmts/mitab/makefile.vc b/ogr/ogrsf_frmts/mitab/makefile.vc deleted file mode 100644 index dac73212161d..000000000000 --- a/ogr/ogrsf_frmts/mitab/makefile.vc +++ /dev/null @@ -1,32 +0,0 @@ -# -# makefile.vc - MapInfo TAB Read/Write library makefile -# -# To use the makefile: -# - Open a DOS prompt window -# - Run the VCVARS32.BAT script to initialize the VC++ environment variables -# - Start the build with: nmake /f makefile.vc -# -# $Id$ -# - -OBJ = mitab_rawbinblock.obj mitab_mapheaderblock.obj \ - mitab_mapindexblock.obj mitab_indfile.obj \ - mitab_tabview.obj mitab_bounds.obj \ - mitab_mapobjectblock.obj mitab_mapcoordblock.obj \ - mitab_feature.obj mitab_feature_mif.obj \ - mitab_mapfile.obj mitab_idfile.obj mitab_datfile.obj \ - mitab_tabfile.obj mitab_miffile.obj \ - mitab_utils.obj mitab_imapinfofile.obj mitab_middatafile.obj \ - mitab_maptoolblock.obj mitab_coordsys.obj \ - mitab_tooldef.obj mitab_spatialref.obj mitab_ogr_driver.obj \ - mitab_ogr_datasource.obj mitab_geometry.obj \ - mitab_tabseamless.obj - -EXTRAFLAGS = -I.. -I..\.. -DOGR -DMITAB_USE_OFTDATETIME -GDAL_ROOT = ..\..\.. -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - -clean: - -del *.obj *.pdb diff --git a/ogr/ogrsf_frmts/mongodbv3/GNUmakefile b/ogr/ogrsf_frmts/mongodbv3/GNUmakefile deleted file mode 100644 index 89202c45f56c..000000000000 --- a/ogr/ogrsf_frmts/mongodbv3/GNUmakefile +++ /dev/null @@ -1,15 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogrmongodbv3driver.o - -# -foperator-names needed for mongocxx headers... -CXXFLAGS := $(subst -fno-operator-names,,${CXXFLAGS}) - -CPPFLAGS := -iquote ../generic $(MONGOCXXV3_CFLAGS) $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) diff --git a/ogr/ogrsf_frmts/mongodbv3/makefile.vc b/ogr/ogrsf_frmts/mongodbv3/makefile.vc deleted file mode 100644 index 82fefee5a746..000000000000 --- a/ogr/ogrsf_frmts/mongodbv3/makefile.vc +++ /dev/null @@ -1,32 +0,0 @@ -OBJ = ogrmongodbv3driver.obj -EXTRAFLAGS = -I.. -I..\generic -I..\.. $(MONGOCXXV3_CFLAGS) -I$(BOOST_INC) - -GDAL_ROOT = ..\..\.. - -PLUGIN_DLL = ogr_MongoDBv3.dll - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - -all: default - -clean: - -del *.obj - -del *.dll - -del *.exp - -del *.lib - -del *.manifest - -del *.pdb - -del *.tlh - -plugin: $(PLUGIN_DLL) - -$(PLUGIN_DLL): $(OBJ) - link /dll $(LDEBUG) /out:$(PLUGIN_DLL) $(OBJ) $(GDALLIB) $(MONGOCXXV3_LIBS) wsock32.lib - if exist $(PLUGIN_DLL).manifest mt -manifest $(PLUGIN_DLL).manifest -outputresource:$(PLUGIN_DLL);2 - - -plugin-install: - -mkdir $(PLUGINDIR) - $(INSTALL) $(PLUGIN_DLL) $(PLUGINDIR) diff --git a/ogr/ogrsf_frmts/mssqlspatial/GNUmakefile b/ogr/ogrsf_frmts/mssqlspatial/GNUmakefile deleted file mode 100644 index aa9d6a5f4a1e..000000000000 --- a/ogr/ogrsf_frmts/mssqlspatial/GNUmakefile +++ /dev/null @@ -1,12 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogrmssqlspatialdatasource.o ogrmssqlspatiallayer.o ogrmssqlspatialtablelayer.o ogrmssqlspatialselectlayer.o ogrmssqlspatialdriver.o ogrmssqlgeometryparser.o ogrmssqlgeometryvalidator.o ogrmssqlgeometrywriter.o - -CPPFLAGS := -iquote .. -iquote ../.. $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) diff --git a/ogr/ogrsf_frmts/mssqlspatial/makefile.vc b/ogr/ogrsf_frmts/mssqlspatial/makefile.vc deleted file mode 100644 index 7548a2ac0242..000000000000 --- a/ogr/ogrsf_frmts/mssqlspatial/makefile.vc +++ /dev/null @@ -1,43 +0,0 @@ -OBJ = \ - .\ogrmssqlgeometryparser.obj \ - .\ogrmssqlgeometryvalidator.obj \ - .\ogrmssqlgeometrywriter.obj \ - .\ogrmssqlspatialdatasource.obj \ - .\ogrmssqlspatialdriver.obj \ - .\ogrmssqlspatiallayer.obj \ - .\ogrmssqlspatialselectlayer.obj \ - .\ogrmssqlspatialtablelayer.obj - -PLUGINOBJ = $(OBJ:.\=plugin\) - -PLUGIN_DLL = ogr_MSSQLSpatial.dll - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -EXTRAFLAGS = -I.. -I..\.. $(SQLNCLI_INCLUDE) $(MSODBCSQL_INCLUDE) - -default: $(OBJ) - -{.}.cpp{plugin\}.obj: - -mkdir plugin - $(CPP) $(CPPFLAGS) /DMSSQL_BCP_SUPPORTED=1 /Fo$@ /c $< - -plugin: $(PLUGIN_DLL) - -$(PLUGIN_DLL): $(PLUGINOBJ) - link /dll /out:$(PLUGIN_DLL) $(PLUGINOBJ) $(GDALLIB) $(ODBCLIB) $(SQLNCLI_LIB) $(MSODBCSQL_LIB) $(LDEBUG) - if exist $(PLUGIN_DLL).manifest mt -manifest $(PLUGIN_DLL).manifest -outputresource:$(PLUGIN_DLL);2 - -clean: - -del *.lib - -del *.obj *.pdb *.exp - -del *.exe - -del *.dll - -del *.manifest - -del plugin\*.obj - -plugin-install: - -mkdir $(PLUGINDIR) - $(INSTALL) $(PLUGIN_DLL) $(PLUGINDIR) diff --git a/ogr/ogrsf_frmts/mvt/GNUmakefile b/ogr/ogrsf_frmts/mvt/GNUmakefile deleted file mode 100644 index 18aae453cc17..000000000000 --- a/ogr/ogrsf_frmts/mvt/GNUmakefile +++ /dev/null @@ -1,24 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogrmvtdataset.o mvtutils.o mvt_tile.o - -CPPFLAGS := -iquote .. -iquote ../.. -iquote ../osm $(CPPFLAGS) - -ifeq ($(HAVE_SQLITE),yes) -CPPFLAGS := $(CPPFLAGS) -DHAVE_SQLITE $(SQLITE_INC) -endif - -ifeq ($(HAVE_GEOS),yes) -CPPFLAGS := -DHAVE_GEOS=1 $(GEOS_CFLAGS) $(CPPFLAGS) -endif - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) mvt_tile_test$(EXE) - -mvt_tile_test$(EXE): mvt_tile_test.$(OBJ_EXT) - $(LD) $(LDFLAGS) mvt_tile_test.$(OBJ_EXT) $(CONFIG_LIBS) -o mvt_tile_test$(EXE) - diff --git a/ogr/ogrsf_frmts/mvt/makefile.vc b/ogr/ogrsf_frmts/mvt/makefile.vc deleted file mode 100644 index a5bcbc4fee27..000000000000 --- a/ogr/ogrsf_frmts/mvt/makefile.vc +++ /dev/null @@ -1,19 +0,0 @@ - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -OBJ = ogrmvtdataset.obj mvtutils.obj mvt_tile.obj -EXTRAFLAGS = -I.. -I..\.. -I..\osm $(SQLITEDEF) $(GEOS_CFLAGS) - -!IFDEF SQLITE_LIB -SQLITEDEF = -DHAVE_SQLITE $(SQLITE_INC) -!ENDIF - -default: $(OBJ) - -clean: - -del *.obj *.pdb - - - diff --git a/ogr/ogrsf_frmts/mysql/GNUmakefile b/ogr/ogrsf_frmts/mysql/GNUmakefile deleted file mode 100644 index e63b9e6837b3..000000000000 --- a/ogr/ogrsf_frmts/mysql/GNUmakefile +++ /dev/null @@ -1,15 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogrmysqldriver.o ogrmysqldatasource.o \ - ogrmysqltablelayer.o ogrmysqllayer.o ogrmysqlresultlayer.o - -CPPFLAGS := -iquote .. -iquote ../.. $(MYSQL_INC) $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ): ogr_mysql.h \ No newline at end of file diff --git a/ogr/ogrsf_frmts/mysql/makefile.vc b/ogr/ogrsf_frmts/mysql/makefile.vc deleted file mode 100644 index 700757d2fa2d..000000000000 --- a/ogr/ogrsf_frmts/mysql/makefile.vc +++ /dev/null @@ -1,19 +0,0 @@ - -OBJ = ogrmysqldriver.obj ogrmysqldatasource.obj ogrmysqllayer.obj \ - ogrmysqltablelayer.obj ogrmysqlresultlayer.obj - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -EXTRAFLAGS = -I.. -I..\.. -I$(MYSQL_INC_DIR) - -# Visual Studio 2015 has timespec structure, so we should prevent my_global.h (in mysql 5.7.12 e.g) from redefining it -EXTRAFLAGS = $(EXTRAFLAGS) -DHAVE_STRUCT_TIMESPEC - -default: $(OBJ) - -clean: - -del *.lib - -del *.obj *.pdb - -del *.exe diff --git a/ogr/ogrsf_frmts/nas/GNUmakefile b/ogr/ogrsf_frmts/nas/GNUmakefile deleted file mode 100644 index a1e395f461cd..000000000000 --- a/ogr/ogrsf_frmts/nas/GNUmakefile +++ /dev/null @@ -1,26 +0,0 @@ - -include ../../../GDALmake.opt - -OBJ = ogrnasdriver.o ogrnasdatasource.o ogrnaslayer.o \ - nashandler.o nasreader.o ogrnasrelationlayer.o - -CPPFLAGS := -iquote ../gml -iquote .. -iquote ../.. -DHAVE_XERCES=1 \ - $(XERCES_INCLUDE) $(CPPFLAGS) - -# To satisfy One Definition Rule, we have to define HAVE_EXPAT if it is used -# by the GML driver so that the GMLHandler and GMLReader classes have the same -# size -ifeq ($(HAVE_EXPAT),yes) -CPPFLAGS += -DHAVE_EXPAT -endif - -# By default, XML validation is disabled. Uncomment the following line to -# enable XML schema validation in the parser. -#CPPFLAGS += -DOGR_GML_VALIDATION=1 - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ): ogr_nas.h nasreaderp.h ../gml/gmlreader.h ../gml/gmlreaderp.h diff --git a/ogr/ogrsf_frmts/nas/makefile.vc b/ogr/ogrsf_frmts/nas/makefile.vc deleted file mode 100644 index bb1f9d0ad4e3..000000000000 --- a/ogr/ogrsf_frmts/nas/makefile.vc +++ /dev/null @@ -1,26 +0,0 @@ - -OBJ = ogrnasdriver.obj ogrnasdatasource.obj ogrnaslayer.obj \ - nashandler.obj nasreader.obj \ - ogrnasrelationlayer.obj - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -!IFDEF XERCES_DIR -EXTRAFLAGS = -I.. -I..\.. -I..\gml $(XERCES_INCLUDE) -DHAVE_XERCES=1 $(EXPAT_EXTRAFLAGS) -!ENDIF - -# To satisfy One Definition Rule, we have to define HAVE_EXPAT if it is used -# by the GML driver so that the GMLHandler and GMLReader classes have the same -# size -!IFDEF EXPAT_DIR -EXPAT_EXTRAFLAGS = $(EXPAT_INCLUDE) -DHAVE_EXPAT -!ENDIF - -default: $(OBJ) - -clean: - -del *.lib - -del *.obj *.pdb - diff --git a/ogr/ogrsf_frmts/ngw/GNUmakefile b/ogr/ogrsf_frmts/ngw/GNUmakefile deleted file mode 100644 index 5cfe3e0de1c6..000000000000 --- a/ogr/ogrsf_frmts/ngw/GNUmakefile +++ /dev/null @@ -1,18 +0,0 @@ - -include ../../../GDALmake.opt - -OBJ := \ - ogrngwdriver.o \ - gdalngwdataset.o \ - ogrngwlayer.o \ - ngw_api.o - -CPPFLAGS := -iquote . -iquote .. -iquote ../.. $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - rm -f *~ - -$(O_OBJ): ogr_ngw.h diff --git a/ogr/ogrsf_frmts/ngw/makefile.vc b/ogr/ogrsf_frmts/ngw/makefile.vc deleted file mode 100644 index 892d26d1a999..000000000000 --- a/ogr/ogrsf_frmts/ngw/makefile.vc +++ /dev/null @@ -1,13 +0,0 @@ - -OBJ = ogrngwdriver.obj gdalngwdataset.obj ogrngwlayer.obj ngw_api.obj - -EXTRAFLAGS = -I.. -I..\.. - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - -clean: - -del *.obj *.pdb diff --git a/ogr/ogrsf_frmts/ntf/GNUmakefile b/ogr/ogrsf_frmts/ntf/GNUmakefile deleted file mode 100644 index c1adaec23a93..000000000000 --- a/ogr/ogrsf_frmts/ntf/GNUmakefile +++ /dev/null @@ -1,20 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ntffilereader.o ntfrecord.o ogrntfdatasource.o \ - ogrntfdriver.o ogrntflayer.o ntf_estlayers.o \ - ogrntffeatureclasslayer.o ntf_generic.o ntf_raster.o \ - ntf_codelist.o ntfstroke.o - -CPPFLAGS := -iquote .. -iquote ../.. $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -ntfdump$(EXE): ntfdump.$(OBJ_EXT) - $(LD) $(LDFLAGS) ntfdump.$(OBJ_EXT) $(CONFIG_LIBS) -o ntfdump$(EXE) - - diff --git a/ogr/ogrsf_frmts/ntf/makefile.vc b/ogr/ogrsf_frmts/ntf/makefile.vc deleted file mode 100644 index 83d1d1c168a6..000000000000 --- a/ogr/ogrsf_frmts/ntf/makefile.vc +++ /dev/null @@ -1,19 +0,0 @@ - -OBJ = ntf_estlayers.obj ntffilereader.obj ntfrecord.obj \ - ogrntfdatasource.obj ogrntfdriver.obj ogrntflayer.obj \ - ogrntffeatureclasslayer.obj ntf_generic.obj ntf_raster.obj \ - ntf_codelist.obj ntfstroke.obj - -EXTRAFLAGS = -I.. -I..\.. - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - -clean: - -del *.obj *.pdb - - - diff --git a/ogr/ogrsf_frmts/oci/GNUmakefile b/ogr/ogrsf_frmts/oci/GNUmakefile deleted file mode 100644 index 4de72a6064ef..000000000000 --- a/ogr/ogrsf_frmts/oci/GNUmakefile +++ /dev/null @@ -1,29 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = oci_utils.o ogrocisession.o ogrocistatement.o \ - ogrocidriver.o ogrocidatasource.o ogrocilayer.o \ - ogrocitablelayer.o ogrociselectlayer.o ogrocistringbuf.o \ - ogrociwritablelayer.o ogrociloaderlayer.o ogrocistroke.o - -CPPFLAGS := $(GDAL_INCLUDE) $(OCI_INCLUDE) $(XTRA_OPT) $(CPPFLAGS) -fPIC - -PLUGIN_SO = ogr_OCI.so - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) $(PLUGIN_SO) - -$(O_OBJ): ogr_oci.h - -fastload: fastload.cpp - $(CXX) $(CPPFLAGS) $(CFLAGS) fastload.cpp -L../../.. -lgdal.1.1 \ - -o fastload - -plugin: $(PLUGIN_SO) - -$(PLUGIN_SO): $(OBJ) - $(LD_SHARED) $(LNK_FLAGS) $(OBJ) $(CONFIG_LIBS_INS) $(LIBS) \ - -o $(PLUGIN_SO) diff --git a/ogr/ogrsf_frmts/oci/makefile.vc b/ogr/ogrsf_frmts/oci/makefile.vc deleted file mode 100644 index d7e5b26318a0..000000000000 --- a/ogr/ogrsf_frmts/oci/makefile.vc +++ /dev/null @@ -1,48 +0,0 @@ - -LL_OBJ = ogrocisession.obj ogrocistatement.obj -OGR_OBJ = ogrocidriver.obj ogrocidatasource.obj ogrocilayer.obj \ - ogrocitablelayer.obj ogrociselectlayer.obj ogrocistringbuf.obj\ - ogrociwritablelayer.obj ogrociloaderlayer.obj \ - ogrocistroke.obj - -PLUGIN_DLL = ogr_OCI.dll - -OBJ = $(LL_OBJ) $(OGR_OBJ) - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - - -EXTRAFLAGS = -I.. -I..\.. $(OCI_INCLUDE) - -default: $(OBJ) - -clean: - -del *.lib - -del *.obj *.pdb - -del *.exe - -del *.dll - -plugin: $(PLUGIN_DLL) - -$(PLUGIN_DLL): $(OBJ) - link /dll $(LDEBUG) /out:$(PLUGIN_DLL) $(OBJ) \ - $(GDALLIB) $(OCI_LIB) - if exist ogr_OCI.dll.manifest mt -manifest ogr_OCI.dll.manifest \ - -outputresource:ogr_OCI.dll;2 - -ocitest.exe: $(LL_OBJ) ocitest.obj - cl /Zi ocitest.obj $(LL_OBJ) \ - ../../ogr.lib ../ogrsf_frmts.lib ../ogrsf_frmts_sup.lib \ - $(GDAL_ROOT)/port/cpl.lib $(OCI_LIB) $(LIBS) - -fastload.exe: $(LL_OBJ) fastload.obj - cl /Zi fastload.obj $(LL_OBJ) \ - ../../ogr.lib ../ogrsf_frmts.lib ../ogrsf_frmts_sup.lib \ - $(GDAL_ROOT)/port/cpl.lib $(OCI_LIB) $(LIBS) - - -plugin-install: - -mkdir $(PLUGINDIR) - $(INSTALL) $(PLUGIN_DLL) $(PLUGINDIR) diff --git a/ogr/ogrsf_frmts/odbc/GNUmakefile b/ogr/ogrsf_frmts/odbc/GNUmakefile deleted file mode 100644 index 40658c5364c7..000000000000 --- a/ogr/ogrsf_frmts/odbc/GNUmakefile +++ /dev/null @@ -1,13 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogrodbcdatasource.o ogrodbclayer.o ogrodbcdriver.o \ - ogrodbctablelayer.o ogrodbcselectlayer.o - -CPPFLAGS := -iquote .. -iquote ../.. $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) diff --git a/ogr/ogrsf_frmts/odbc/makefile.vc b/ogr/ogrsf_frmts/odbc/makefile.vc deleted file mode 100644 index 5157ff50f909..000000000000 --- a/ogr/ogrsf_frmts/odbc/makefile.vc +++ /dev/null @@ -1,14 +0,0 @@ - -OBJ = ogrodbcdriver.obj ogrodbcdatasource.obj ogrodbclayer.obj \ - ogrodbctablelayer.obj ogrodbcselectlayer.obj - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -EXTRAFLAGS = -I.. -I..\.. - -default: $(OBJ) - -clean: - -del *.obj *.pdb diff --git a/ogr/ogrsf_frmts/ods/GNUmakefile b/ogr/ogrsf_frmts/ods/GNUmakefile deleted file mode 100644 index 7777d49c4143..000000000000 --- a/ogr/ogrsf_frmts/ods/GNUmakefile +++ /dev/null @@ -1,33 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogrodsdriver.o ogrodsdatasource.o ods_formula.o ods_formula_node.o - -ifeq ($(HAVE_EXPAT),yes) -CPPFLAGS += -DHAVE_EXPAT -endif - -CPPFLAGS := -iquote .. -iquote ../.. -iquote ../mem $(EXPAT_INCLUDE) $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) testparser$(EXE) - -$(O_OBJ): ogr_ods.h ods_formula.h ods_formula_parser.hpp ../mem/ogr_mem.h - -# The sed substitution below workarounds a bug with gcc 4.1 -O2 (checked on 64bit platforms) -# that produces buggy compiled code. -# Seen on gcc 4.1.2-27ubuntu1 (Ubuntu 10.04) (not the default compiler) and gcc-4.1.2-48.el5 (CentOS 5.5) -# (default compiler...) -# The memset isn't necessary at all with a non-buggy compiler, but I've found -# that it helps gcc 4.1 generating correct code here... -# The sed with yyerrorlab shut up MSVC warnings about unreachable code -parser: - bison -p ods_formula -d -oods_formula_parser.cpp ods_formula_parser.y - sed "s/yytype_int16 yyssa\[YYINITDEPTH\];/yytype_int16 yyssa[YYINITDEPTH]; \/\* workaround bug with gcc 4.1 -O2 \*\/ memset(yyssa, 0, sizeof(yyssa));/" < ods_formula_parser.cpp | sed "s/\*yyssp = yystate/\*yyssp = (yytype_int16)yystate/" | sed "s/yyerrorlab:/#if 0\nyyerrorlab:/" | sed "s/yyerrlab1:/#endif\nyyerrlab1:/" | sed "s/YY_INITIAL_VALUE (static YYSTYPE yyval_default;)//" | sed "s/YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);/YYSTYPE yylval = nullptr;/" > ods_formula_parser.cpp.tmp - mv ods_formula_parser.cpp.tmp ods_formula_parser.cpp - -testparser$(EXE): testparser.$(OBJ_EXT) - $(LD) $(LDFLAGS) testparser.$(OBJ_EXT) $(CONFIG_LIBS) -o testparser$(EXE) diff --git a/ogr/ogrsf_frmts/ods/makefile.vc b/ogr/ogrsf_frmts/ods/makefile.vc deleted file mode 100644 index edb53b37badc..000000000000 --- a/ogr/ogrsf_frmts/ods/makefile.vc +++ /dev/null @@ -1,20 +0,0 @@ - -OBJ = ogrodsdriver.obj ogrodsdatasource.obj ods_formula.obj ods_formula_node.obj - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -!IFDEF EXPAT_DIR -EXTRAFLAGS = -I.. -I..\.. -I..\mem $(EXPAT_INCLUDE) -DHAVE_EXPAT=1 -!ELSE -EXTRAFLAGS = -I.. -I..\.. -I..\mem -!ENDIF - -default: $(OBJ) - -clean: - -del *.obj *.pdb - - - diff --git a/ogr/ogrsf_frmts/ogdi/GNUmakefile b/ogr/ogrsf_frmts/ogdi/GNUmakefile deleted file mode 100644 index 209bfa7548df..000000000000 --- a/ogr/ogrsf_frmts/ogdi/GNUmakefile +++ /dev/null @@ -1,14 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogrogdidriver.o ogrogdidatasource.o ogrogdilayer.o - -CPPFLAGS := $(OGDI_INCLUDE) $(PROJ_INCLUDE) $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -$(O_OBJ): ogrogdi.h - -clean: - rm -f *.o $(O_OBJ) diff --git a/ogr/ogrsf_frmts/ogdi/makefile.vc b/ogr/ogrsf_frmts/ogdi/makefile.vc deleted file mode 100644 index 3d67a3a12c85..000000000000 --- a/ogr/ogrsf_frmts/ogdi/makefile.vc +++ /dev/null @@ -1,18 +0,0 @@ - -OBJ = ogrogdidriver.obj ogrogdidatasource.obj ogrogdilayer.obj - -EXTRAFLAGS = -I.. -I..\.. \ - -I$(OGDI_INCLUDE) -I$(OGDIDIR)/include/win32 \ - -I$(OGDIDIR)/proj -DWIN32 -D_WINDOWS - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - -clean: - -del *.obj *.pdb - - - diff --git a/ogr/ogrsf_frmts/openfilegdb/GNUmakefile b/ogr/ogrsf_frmts/openfilegdb/GNUmakefile deleted file mode 100644 index ae582fdf6b4e..000000000000 --- a/ogr/ogrsf_frmts/openfilegdb/GNUmakefile +++ /dev/null @@ -1,18 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogropenfilegdbdriver.o \ - ogropenfilegdbdatasource.o ogropenfilegdbdatasource_write.o \ - ogropenfilegdblayer.o ogropenfilegdblayer_write.o \ - filegdbtable.o filegdbtable_write.o filegdbindex.o filegdbindex_write.o \ - filegdbtable_write_fields.o filegdbtable_freelist.o - -CPPFLAGS := -iquote .. -iquote ../.. -iquote ../mem $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ): ogr_openfilegdb.h filegdbtable.h filegdbtable_priv.h filegdb_fielddomain.h ../../ogr_swq.h ../mem/ogr_mem.h diff --git a/ogr/ogrsf_frmts/openfilegdb/makefile.vc b/ogr/ogrsf_frmts/openfilegdb/makefile.vc deleted file mode 100644 index 7fd261c0372c..000000000000 --- a/ogr/ogrsf_frmts/openfilegdb/makefile.vc +++ /dev/null @@ -1,17 +0,0 @@ - -OBJ = ogropenfilegdbdriver.obj \ - ogropenfilegdbdatasource.obj ogropenfilegdbdatasource_write.obj \ - ogropenfilegdblayer.obj ogropenfilegdblayer_write.obj \ - filegdbtable.obj filegdbtable_write.obj filegdbindex.obj filegdbindex_write.obj \ - filegdbtable_write_fields.obj filegdbtable_freelist.obj - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -EXTRAFLAGS = -I.. -I..\.. -I..\mem - -default: $(OBJ) - -clean: - -del *.obj *.pdb diff --git a/ogr/ogrsf_frmts/osm/GNUmakefile b/ogr/ogrsf_frmts/osm/GNUmakefile deleted file mode 100644 index a27fd7c4b3bc..000000000000 --- a/ogr/ogrsf_frmts/osm/GNUmakefile +++ /dev/null @@ -1,21 +0,0 @@ -include ../../../GDALmake.opt - -OBJ := ogrosmdriver.o ogrosmdatasource.o ogrosmlayer.o osm_parser.o - -CPPFLAGS := -iquote .. -iquote ../.. -iquote ../sqlite -iquote ../generic $(EXPAT_INCLUDE) $(SQLITE_INC) $(CPPFLAGS) - -ifeq ($(HAVE_EXPAT),yes) -CPPFLAGS += -DHAVE_EXPAT -endif - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -all: default osm2osm$(EXE) - -clean: - rm -f *.o $(O_OBJ) osm2osm$(EXE) - -$(O_OBJ): ogr_osm.h gpb.h osm_parser.h - -osm2osm$(EXE): osm2osm.$(OBJ_EXT) - $(LD) $(LDFLAGS) osm2osm.$(OBJ_EXT) $(CONFIG_LIBS) -o osm2osm$(EXE) diff --git a/ogr/ogrsf_frmts/osm/makefile.vc b/ogr/ogrsf_frmts/osm/makefile.vc deleted file mode 100644 index c844f0629769..000000000000 --- a/ogr/ogrsf_frmts/osm/makefile.vc +++ /dev/null @@ -1,18 +0,0 @@ - -OBJ = ogrosmdriver.obj ogrosmdatasource.obj ogrosmlayer.obj osm_parser.obj - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -!IFDEF EXPAT_DIR -EXTRAFLAGS = -I.. -I..\.. -I..\sqlite -I..\generic $(SQLITE_INC) -DHAVE_SQLITE $(EXPAT_INCLUDE) -DHAVE_EXPAT=1 -!ELSE -EXTRAFLAGS = -I.. -I..\.. -I..\sqlite -I..\generic $(SQLITE_INC) -DHAVE_SQLITE -!ENDIF - -default: $(OBJ) - -clean: - -del *.obj *.pdb - diff --git a/ogr/ogrsf_frmts/pds/GNUmakefile b/ogr/ogrsf_frmts/pds/GNUmakefile deleted file mode 100644 index 013128d461d4..000000000000 --- a/ogr/ogrsf_frmts/pds/GNUmakefile +++ /dev/null @@ -1,14 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogrpdsdriver.o ogrpdsdatasource.o ogrpdslayer.o - -CPPFLAGS := -iquote .. -iquote ../.. -iquote ../../../frmts/pds $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ): ogr_pds.h \ No newline at end of file diff --git a/ogr/ogrsf_frmts/pds/makefile.vc b/ogr/ogrsf_frmts/pds/makefile.vc deleted file mode 100644 index 2080d6f03f5c..000000000000 --- a/ogr/ogrsf_frmts/pds/makefile.vc +++ /dev/null @@ -1,15 +0,0 @@ - -OBJ = ogrpdsdriver.obj ogrpdsdatasource.obj ogrpdslayer.obj -EXTRAFLAGS = -I.. -I..\.. -I$(GDAL_ROOT)/frmts/pds - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - -clean: - -del *.obj *.pdb - - - diff --git a/ogr/ogrsf_frmts/pg/GNUmakefile b/ogr/ogrsf_frmts/pg/GNUmakefile deleted file mode 100644 index a07937333ce6..000000000000 --- a/ogr/ogrsf_frmts/pg/GNUmakefile +++ /dev/null @@ -1,25 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogrpgdriver.o ogrpgdatasource.o ogrpglayer.o ogrpgtablelayer.o\ - ogrpgresultlayer.o ogrpgutility.o - -CPPFLAGS := $(PG_INC) -iquote ../pgdump $(CPPFLAGS) - -CXXFLAGS := $(WARN_EFFCPLUSPLUS) $(WARN_OLD_STYLE_CAST) $(CXXFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ): ogr_pg.h ogrpgutility.h - -PLUGIN_SO = ogr_PG.$(SO_EXT) - -plugin: $(PLUGIN_SO) - -$(PLUGIN_SO): $(OBJ) - $(LD_SHARED) $(LNK_FLAGS) $(OBJ) $(CONFIG_LIBS_INS) $(LIBS) \ - -o $(PLUGIN_SO) diff --git a/ogr/ogrsf_frmts/pg/makefile.vc b/ogr/ogrsf_frmts/pg/makefile.vc deleted file mode 100644 index 446b6f09188a..000000000000 --- a/ogr/ogrsf_frmts/pg/makefile.vc +++ /dev/null @@ -1,30 +0,0 @@ - -OBJ = ogrpgdriver.obj ogrpgdatasource.obj ogrpglayer.obj \ - ogrpgtablelayer.obj ogrpgresultlayer.obj ogrpgutility.obj - -PLUGIN_DLL = ogr_PG.dll - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -EXTRAFLAGS = -I.. -I..\.. -I..\pgdump -I$(PG_INC_DIR) - -default: $(OBJ) - -plugin: $(PLUGIN_DLL) - -$(PLUGIN_DLL): $(OBJ) - link /dll /out:$(PLUGIN_DLL) $(OBJ) $(GDALLIB) $(PG_LIB) - if exist $(PLUGIN_DLL).manifest mt -manifest $(PLUGIN_DLL).manifest -outputresource:$(PLUGIN_DLL);2 - -clean: - -del *.lib - -del *.obj *.pdb *.exp - -del *.exe - -del *.dll - -del *.manifest - -plugin-install: - -mkdir $(PLUGINDIR) - $(INSTALL) $(PLUGIN_DLL) $(PLUGINDIR) diff --git a/ogr/ogrsf_frmts/pgdump/GNUmakefile b/ogr/ogrsf_frmts/pgdump/GNUmakefile deleted file mode 100644 index d06e4b8c36f1..000000000000 --- a/ogr/ogrsf_frmts/pgdump/GNUmakefile +++ /dev/null @@ -1,14 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogrpgdumpdriver.o ogrpgdumpdatasource.o ogrpgdumplayer.o - -CPPFLAGS := -iquote .. -iquote ../.. $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ): ogr_pgdump.h \ No newline at end of file diff --git a/ogr/ogrsf_frmts/pgdump/makefile.vc b/ogr/ogrsf_frmts/pgdump/makefile.vc deleted file mode 100644 index 3c9f06b6cb98..000000000000 --- a/ogr/ogrsf_frmts/pgdump/makefile.vc +++ /dev/null @@ -1,15 +0,0 @@ - -OBJ = ogrpgdumpdriver.obj ogrpgdumpdatasource.obj ogrpgdumplayer.obj -EXTRAFLAGS = -I.. -I..\.. - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - -clean: - -del *.obj *.pdb - - - diff --git a/ogr/ogrsf_frmts/pgeo/GNUmakefile b/ogr/ogrsf_frmts/pgeo/GNUmakefile deleted file mode 100644 index 99a7af0f723e..000000000000 --- a/ogr/ogrsf_frmts/pgeo/GNUmakefile +++ /dev/null @@ -1,13 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogrpgeodatasource.o ogrpgeolayer.o ogrpgeodriver.o \ - ogrpgeotablelayer.o ogrpgeoselectlayer.o - -CPPFLAGS := -iquote .. -iquote ../openfilegdb -iquote ../.. $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) diff --git a/ogr/ogrsf_frmts/pgeo/makefile.vc b/ogr/ogrsf_frmts/pgeo/makefile.vc deleted file mode 100644 index d667cb151ec4..000000000000 --- a/ogr/ogrsf_frmts/pgeo/makefile.vc +++ /dev/null @@ -1,14 +0,0 @@ - -OBJ = ogrpgeodriver.obj ogrpgeodatasource.obj ogrpgeolayer.obj \ - ogrpgeotablelayer.obj ogrpgeoselectlayer.obj - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -EXTRAFLAGS = -I.. -I..\.. -I..\openfilegdb - -default: $(OBJ) - -clean: - -del *.obj *.pdb diff --git a/ogr/ogrsf_frmts/plscenes/GNUmakefile b/ogr/ogrsf_frmts/plscenes/GNUmakefile deleted file mode 100644 index c4f1ff72c8a1..000000000000 --- a/ogr/ogrsf_frmts/plscenes/GNUmakefile +++ /dev/null @@ -1,15 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogrplscenesdriver.o \ - ogrplscenesdatav1layer.o ogrplscenesdatav1dataset.o - -CPPFLAGS := $(JSON_INCLUDE) -iquote .. -iquote ../.. -iquote ../geojson $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ): ogr_plscenes.h ../../ogr_swq.h ../geojson/ogrgeojsonreader.h diff --git a/ogr/ogrsf_frmts/plscenes/makefile.vc b/ogr/ogrsf_frmts/plscenes/makefile.vc deleted file mode 100644 index dcdbf55c098a..000000000000 --- a/ogr/ogrsf_frmts/plscenes/makefile.vc +++ /dev/null @@ -1,17 +0,0 @@ - -OBJ = ogrplscenesdriver.obj \ - ogrplscenesdatav1layer.obj ogrplscenesdatav1dataset.obj - -EXTRAFLAGS = -I.. -I..\.. -I..\geojson -I..\geojson\libjson - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - -clean: - -del *.obj *.pdb - - - diff --git a/ogr/ogrsf_frmts/s57/GNUmakefile b/ogr/ogrsf_frmts/s57/GNUmakefile deleted file mode 100644 index 224708e17387..000000000000 --- a/ogr/ogrsf_frmts/s57/GNUmakefile +++ /dev/null @@ -1,25 +0,0 @@ - - -ISODIR = ../../../frmts/iso8211 -ISOLIB = $(ISODIR)/libiso8211.a - -include ../../../GDALmake.opt - -OBJ = ogrs57driver.o ogrs57datasource.o ogrs57layer.o \ - s57reader.o s57writer.o ddfrecordindex.o \ - s57classregistrar.o s57filecollector.o \ - s57featuredefns.o - -CPPFLAGS := -iquote .. -iquote ../.. -iquote $(ISODIR) $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o s57dump$(EXE) $(O_OBJ) - -all: default s57dump$(EXE) - -$(O_OBJ): s57.h ogr_s57.h - -s57dump$(EXE): s57dump.$(OBJ_EXT) - $(LD) $(LDFLAGS) s57dump.$(OBJ_EXT) $(CONFIG_LIBS) -o s57dump$(EXE) diff --git a/ogr/ogrsf_frmts/s57/makefile.vc b/ogr/ogrsf_frmts/s57/makefile.vc deleted file mode 100644 index ceace882c5ea..000000000000 --- a/ogr/ogrsf_frmts/s57/makefile.vc +++ /dev/null @@ -1,19 +0,0 @@ - -OBJ = ogrs57driver.obj ogrs57datasource.obj ogrs57layer.obj \ - s57classregistrar.obj s57reader.obj ddfrecordindex.obj \ - s57featuredefns.obj s57filecollector.obj s57writer.obj - - -EXTRAFLAGS = -I.. -I..\.. -I$(GDAL_ROOT)/frmts/iso8211 - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - -clean: - -del *.obj *.pdb - - - diff --git a/ogr/ogrsf_frmts/sdts/GNUmakefile b/ogr/ogrsf_frmts/sdts/GNUmakefile deleted file mode 100644 index 5e3d0a618e99..000000000000 --- a/ogr/ogrsf_frmts/sdts/GNUmakefile +++ /dev/null @@ -1,37 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogrsdtsdriver.o ogrsdtsdatasource.o ogrsdtslayer.o - -FRMTSLIB = ../ogr.a - -ISODIR = ../../../frmts/iso8211 -ISOLIB = $(ISODIR)/libiso8211.a - -SDTSDIR = ../../../frmts/sdts -SDTSLIB = $(SDTSDIR)/libsdts_al.a - -CPPFLAGS := -iquote .. -iquote ../.. -iquote $(SDTSDIR) -iquote $(ISODIR) $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -$(O_OBJ): $(SDTSDIR)/sdts_al.h - -clean: - rm -f *.o *-marker $(O_OBJ) - -install-libs: isolib-marker sdtslib-marker - @echo Done adding ISO8211 and SDTS libraries into $(FRMTSLIB) - -isolib-marker: $(ISOLIB) - ./install-libs.sh $(ISOLIB) $(FRMTSLIB) - touch isolib-marker - -sdtslib-marker: $(SDTSLIB) - ./install-libs.sh $(SDTSLIB) $(FRMTSLIB) - touch sdtslib-marker - -libs: - (cd ../../../frmts/iso8211; $(MAKE)) - (cd ../../../frmts/sdts; $(MAKE)) diff --git a/ogr/ogrsf_frmts/sdts/makefile.vc b/ogr/ogrsf_frmts/sdts/makefile.vc deleted file mode 100644 index 723b4ff33852..000000000000 --- a/ogr/ogrsf_frmts/sdts/makefile.vc +++ /dev/null @@ -1,19 +0,0 @@ - -OBJ = ogrsdtsdatasource.obj \ - ogrsdtsdriver.obj \ - ogrsdtslayer.obj - -EXTRAFLAGS = -I.. -I..\.. -I$(GDAL_ROOT)/frmts/sdts \ - -I$(GDAL_ROOT)/frmts/iso8211 - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - -clean: - -del *.obj *.pdb - - - diff --git a/ogr/ogrsf_frmts/selafin/GNUmakefile b/ogr/ogrsf_frmts/selafin/GNUmakefile deleted file mode 100644 index 2049859b3b3c..000000000000 --- a/ogr/ogrsf_frmts/selafin/GNUmakefile +++ /dev/null @@ -1,18 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogrselafindriver.o ogrselafindatasource.o ogrselafinlayer.o io_selafin.o - -CPPFLAGS := -iquote .. -iquote ../.. $(CPPFLAGS) - -# To pass -Wextra -Werror, enable this next line: -# CPPFLAGS += -Wno-missing-field-initializers - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ): ogr_selafin.h io_selafin.h - diff --git a/ogr/ogrsf_frmts/selafin/makefile.vc b/ogr/ogrsf_frmts/selafin/makefile.vc deleted file mode 100644 index d3eb50dc653e..000000000000 --- a/ogr/ogrsf_frmts/selafin/makefile.vc +++ /dev/null @@ -1,15 +0,0 @@ - -OBJ = ogrselafindriver.obj ogrselafindatasource.obj ogrselafinlayer.obj io_selafin.obj -EXTRAFLAGS = -I.. -I..\.. - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - -clean: - -del *.obj *.pdb - - - diff --git a/ogr/ogrsf_frmts/shape/GNUmakefile b/ogr/ogrsf_frmts/shape/GNUmakefile deleted file mode 100644 index 599e70da2af8..000000000000 --- a/ogr/ogrsf_frmts/shape/GNUmakefile +++ /dev/null @@ -1,36 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = shape2ogr.o shpopen_wrapper.o dbfopen_wrapper.o shptree_wrapper.o sbnsearch_wrapper.o shp_vsi.o \ - ogrshapedriver.o ogrshapedatasource.o ogrshapelayer.o - -CPPFLAGS := -DSAOffset=vsi_l_offset -DUSE_CPL \ - -iquote .. -iquote ../.. -iquote ../generic $(CPPFLAGS) - -ifeq ($(RENAME_INTERNAL_SHAPELIB_SYMBOLS),yes) -CPPFLAGS := $(CPPFLAGS) -DRENAME_INTERNAL_SHAPELIB_SYMBOLS -DSHPAPI_CALL= -endif - -CXXFLAGS := $(WARN_EFFCPLUSPLUS) $(WARN_OLD_STYLE_CAST) $(CXXFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -$(OBJ) $(O_OBJ): ogrshape.h shapefil.h shpopen.c dbfopen.c shptree.c sbnsearch.c - -clean: - rm -f *.o $(O_OBJ) - -import: - @if test ! -d ~/shapelib ; then \ - echo reimport requires shapelib checked out as ~/shapelib ; \ - exit 1; \ - fi - - copymatch.sh ~/shapelib *.c *.h - - @echo - @echo 'Now do something like:' - @echo '% svn commit -m "updated to shapelib CVS"' - @echo - diff --git a/ogr/ogrsf_frmts/shape/makefile.vc b/ogr/ogrsf_frmts/shape/makefile.vc deleted file mode 100644 index b330920fd1d9..000000000000 --- a/ogr/ogrsf_frmts/shape/makefile.vc +++ /dev/null @@ -1,18 +0,0 @@ - -OBJ = shape2ogr.obj shpopen.obj dbfopen.obj ogrshapedriver.obj \ - ogrshapedatasource.obj ogrshapelayer.obj shptree.obj sbnsearch.obj \ - shp_vsi.obj -EXTRAFLAGS = -I.. -I..\.. -I..\generic /DSHAPELIB_DLLEXPORT \ - -DUSE_CPL -DSAOffset=vsi_l_offset - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - -clean: - -del *.obj *.pdb - - - diff --git a/ogr/ogrsf_frmts/sosi/GNUmakefile b/ogr/ogrsf_frmts/sosi/GNUmakefile deleted file mode 100644 index e00d363a9f2d..000000000000 --- a/ogr/ogrsf_frmts/sosi/GNUmakefile +++ /dev/null @@ -1,15 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogrsosidriver.o ogrsosidatasource.o ogrsosilayer.o ogrsosidatatypes.o - -CPPFLAGS :=-DLINUX -DUNIX -iquote .. -iquote ../.. $(SOSI_INC) $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ): ogr_sosi.h - diff --git a/ogr/ogrsf_frmts/sosi/makefile.vc b/ogr/ogrsf_frmts/sosi/makefile.vc deleted file mode 100644 index 6044617b2da5..000000000000 --- a/ogr/ogrsf_frmts/sosi/makefile.vc +++ /dev/null @@ -1,30 +0,0 @@ - -OBJ = ogrsosidriver.obj ogrsosidatasource.obj \ - ogrsosilayer.obj fyba_melding.obj ogrsosidatatypes.obj - -PLUGIN_DLL = ogr_SOSI.dll - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -EXTRAFLAGS = -I.. -I..\.. -I$(SOSI_INC_DIR) - -default: $(OBJ) - -plugin: $(PLUGIN_DLL) - -$(PLUGIN_DLL): $(OBJ) - link /dll /out:$(PLUGIN_DLL) $(OBJ) $(GDALLIB) $(SOSI_LIBS) - if exist $(PLUGIN_DLL).manifest mt -manifest $(PLUGIN_DLL).manifest -outputresource:$(PLUGIN_DLL);2 - -clean: - -del *.lib - -del *.obj *.pdb *.exp - -del *.dll - -del *.manifest - -plugin-install: - -mkdir $(PLUGINDIR) - $(INSTALL) $(PLUGIN_DLL) $(PLUGINDIR) - diff --git a/ogr/ogrsf_frmts/sqlite/GNUmakefile b/ogr/ogrsf_frmts/sqlite/GNUmakefile deleted file mode 100644 index a2c7e8d068b4..000000000000 --- a/ogr/ogrsf_frmts/sqlite/GNUmakefile +++ /dev/null @@ -1,51 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogrsqlitedatasource.o ogrsqlitelayer.o ogrsqlitedriver.o \ - ogrsqlitetablelayer.o ogrsqliteviewlayer.o ogrsqliteselectlayer.o ogrsqlitesinglefeaturelayer.o \ - ogrsqlitevfs.o ogrsqlitevirtualogr.o ogrsqliteexecutesql.o ogrsqliteapiroutines.o \ - rasterlite2.o ogrsqliteutility.o - -ifeq ($(HAVE_SPATIALITE),yes) -CPPFLAGS += -DHAVE_SPATIALITE -endif - -ifeq ($(HAVE_SPATIALITE),dlopen) -CPPFLAGS += -DHAVE_SPATIALITE -DSPATIALITE_DLOPEN -DSPATIALITE_412_OR_LATER -DSPATIALITE_SONAME=\"$(SPATIALITE_SONAME)\" -endif - -ifeq ($(SPATIALITE_412_OR_LATER),yes) -CPPFLAGS += -DSPATIALITE_412_OR_LATER -endif - -ifeq ($(HAVE_PCRE),yes) -CPPFLAGS += -DHAVE_PCRE -endif - -ifeq ($(HAVE_PCRE2),yes) -CPPFLAGS += -DHAVE_PCRE2 -endif - -ifeq ($(SQLITE_HAS_COLUMN_METADATA),yes) -CPPFLAGS += -DSQLITE_HAS_COLUMN_METADATA -endif - -ifeq ($(HAVE_RASTERLITE2),yes) -CPPFLAGS += -DHAVE_RASTERLITE2 $(RASTERLITE2_CFLAGS) -endif - -# We may lie by defining SQLITE_HAS_NON_DEPRECATED_AUTO_EXTENSION with MacOS SQLite3. The correct check is done for CMake builds -CPPFLAGS := -iquote .. $(SQLITE_INC) $(SPATIALITE_INC) $(PROJ_INCLUDE) $(PROJ_FLAGS) $(CPPFLAGS) -DSQLITE_HAS_NON_DEPRECATED_AUTO_EXTENSION -DOGR_SQLITE_ALLOW_LOAD_EXTENSIONS - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -all: default test_load_virtual_ogr$(EXE) - -clean: - rm -f *.o $(O_OBJ) test_load_virtual_ogr$(EXE) - -$(O_OBJ): ogr_sqlite.h ogrsqlitebase.h ogrsqlitevirtualogr.h ogrsqliteexecutesql.h ogrsqliteregexp.h ogrsqlitesqlfunctions.h ogrsqliteregexp.cpp ogrsqlitesqlfunctions.cpp - -test_load_virtual_ogr$(EXE): test_load_virtual_ogr.$(OBJ_EXT) - $(LD) $(LDFLAGS) test_load_virtual_ogr.$(OBJ_EXT) -lsqlite3 -o test_load_virtual_ogr$(EXE) diff --git a/ogr/ogrsf_frmts/sqlite/makefile.vc b/ogr/ogrsf_frmts/sqlite/makefile.vc deleted file mode 100644 index 10ed94bf54d4..000000000000 --- a/ogr/ogrsf_frmts/sqlite/makefile.vc +++ /dev/null @@ -1,38 +0,0 @@ - -OBJ = ogrsqlitedriver.obj ogrsqlitedatasource.obj \ - ogrsqlitelayer.obj ogrsqlitetablelayer.obj ogrsqliteviewlayer.obj \ - ogrsqliteselectlayer.obj ogrsqlitesinglefeaturelayer.obj \ - ogrsqlitevfs.obj ogrsqlitevirtualogr.obj ogrsqliteexecutesql.obj \ - rasterlite2.obj ogrsqliteutility.obj - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -EXTRAFLAGS = -I.. -I..\.. $(PROJ_FLAGS) $(PROJ_INCLUDE) $(SQLITE_INC) $(PCRE_EXTRAFLAGS) $(SQLITE_HAS_COLUMN_METADATA_EXTRAFLAGS) $(SPATIALITE_412_OR_LATER_EXTRAFLAGS) -DSQLITE_HAS_NON_DEPRECATED_AUTO_EXTENSION -DOGR_SQLITE_ALLOW_LOAD_EXTENSIONS - -!IFDEF PCRE2_INC -PCRE_EXTRAFLAGS = $(PCRE2_INC) -!ELSEIFDEF PCRE_INC -PCRE_EXTRAFLAGS = $(PCRE_INC) -!ENDIF - -!IFDEF SQLITE_HAS_COLUMN_METADATA -SQLITE_HAS_COLUMN_METADATA_EXTRAFLAGS = -DSQLITE_HAS_COLUMN_METADATA -!ENDIF - -!IFDEF SPATIALITE_412_OR_LATER -SPATIALITE_412_OR_LATER_EXTRAFLAGS = -DSPATIALITE_412_OR_LATER -!ENDIF - -default: $(OBJ) - -clean: - -del *.lib - -del *.obj *.pdb - -del *.exe - -test_load_virtual_ogr.exe: test_load_virtual_ogr.obj - $(CC) $(CFLAGS) test_load_virtual_ogr.obj $(SQLITE_LIB) /link $(LINKER_FLAGS) - if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 - del test_load_virtual_ogr.obj diff --git a/ogr/ogrsf_frmts/svg/GNUmakefile b/ogr/ogrsf_frmts/svg/GNUmakefile deleted file mode 100644 index de9f8d13e5b8..000000000000 --- a/ogr/ogrsf_frmts/svg/GNUmakefile +++ /dev/null @@ -1,19 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogrsvgdriver.o ogrsvgdatasource.o ogrsvglayer.o - -ifeq ($(HAVE_EXPAT),yes) -CPPFLAGS += -DHAVE_EXPAT -endif - -CPPFLAGS := -iquote .. -iquote ../.. $(EXPAT_INCLUDE) $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ): ogr_svg.h - diff --git a/ogr/ogrsf_frmts/svg/makefile.vc b/ogr/ogrsf_frmts/svg/makefile.vc deleted file mode 100644 index 26b101a21086..000000000000 --- a/ogr/ogrsf_frmts/svg/makefile.vc +++ /dev/null @@ -1,18 +0,0 @@ - -OBJ = ogrsvgdriver.obj ogrsvgdatasource.obj ogrsvglayer.obj - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -!IFDEF EXPAT_DIR -EXTRAFLAGS = -I.. -I..\.. $(EXPAT_INCLUDE) -DHAVE_EXPAT=1 -!ELSE -EXTRAFLAGS = -I.. -I..\.. -!ENDIF - -default: $(OBJ) - -clean: - -del *.obj *.pdb - diff --git a/ogr/ogrsf_frmts/sxf/GNUmakefile b/ogr/ogrsf_frmts/sxf/GNUmakefile deleted file mode 100644 index 8ba1be2ea5c1..000000000000 --- a/ogr/ogrsf_frmts/sxf/GNUmakefile +++ /dev/null @@ -1,14 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogrsxfdriver.o ogrsxfdatasource.o ogrsxflayer.o - -CPPFLAGS := -iquote .. -iquote ../.. $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ): ogr_sxf.h \ No newline at end of file diff --git a/ogr/ogrsf_frmts/sxf/makefile.vc b/ogr/ogrsf_frmts/sxf/makefile.vc deleted file mode 100644 index 7a3c61702837..000000000000 --- a/ogr/ogrsf_frmts/sxf/makefile.vc +++ /dev/null @@ -1,15 +0,0 @@ - -OBJ = ogrsxfdriver.obj ogrsxfdatasource.obj ogrsxflayer.obj -EXTRAFLAGS = -I.. -I..\.. - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - -clean: - -del *.obj *.pdb - - - diff --git a/ogr/ogrsf_frmts/tiger/GNUmakefile b/ogr/ogrsf_frmts/tiger/GNUmakefile deleted file mode 100644 index f572a9f4dce5..000000000000 --- a/ogr/ogrsf_frmts/tiger/GNUmakefile +++ /dev/null @@ -1,37 +0,0 @@ -include ../../../GDALmake.opt - -OBJ = ogrtigerdriver.o \ - ogrtigerdatasource.o \ - ogrtigerlayer.o \ - tigerfilebase.o \ - tigercompletechain.o \ - tigeraltname.o \ - tigerfeatureids.o \ - tigerzipcodes.o \ - tigerlandmarks.o \ - tigerarealandmarks.o \ - tigerkeyfeatures.o \ - tigerpolygon.o \ - tigerpolygoncorrections.o \ - tigerentitynames.o \ - tigerpolygoneconomic.o \ - tigeridhistory.o \ - tigerpolychainlink.o \ - tigerpip.o \ - tigerspatialmetadata.o \ - tigertlidrange.o \ - tigerzerocellid.o \ - tigeroverunder.o \ - tigerzipplus4.o \ - tigerpoint.o - -CPPFLAGS := -iquote .. -iquote ../.. $(CPPFLAGS) - -LIBS := $(GDAL_LIB) $(LIBS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -$(O_OBJ): ogr_tiger.h - -clean: - rm -f *.o $(O_OBJ) diff --git a/ogr/ogrsf_frmts/tiger/makefile.vc b/ogr/ogrsf_frmts/tiger/makefile.vc deleted file mode 100644 index 903f6b32d218..000000000000 --- a/ogr/ogrsf_frmts/tiger/makefile.vc +++ /dev/null @@ -1,24 +0,0 @@ - -OBJ = ogrtigerdriver.obj ogrtigerdatasource.obj ogrtigerlayer.obj \ - tigercompletechain.obj tigerfilebase.obj \ - tigeraltname.obj tigerfeatureids.obj tigerzipcodes.obj \ - tigerlandmarks.obj tigerarealandmarks.obj tigerkeyfeatures.obj\ - tigerpolychainlink.obj tigerpolygon.obj tigerpip.obj \ - tigerentitynames.obj tigeridhistory.obj tigertlidrange.obj \ - tigerzipplus4.obj tigerpolygoncorrections.obj \ - tigerzerocellid.obj tigeroverunder.obj tigerpoint.obj \ - tigerpolygoneconomic.obj tigerspatialmetadata.obj - -EXTRAFLAGS = -I.. -I..\.. - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - -clean: - -del *.obj *.pdb - - - diff --git a/ogr/ogrsf_frmts/vdv/GNUmakefile b/ogr/ogrsf_frmts/vdv/GNUmakefile deleted file mode 100644 index e61c8fbbbc04..000000000000 --- a/ogr/ogrsf_frmts/vdv/GNUmakefile +++ /dev/null @@ -1,14 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogrvdvdatasource.o - -CPPFLAGS := -iquote .. -iquote ../.. $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ): ogr_vdv.h \ No newline at end of file diff --git a/ogr/ogrsf_frmts/vdv/makefile.vc b/ogr/ogrsf_frmts/vdv/makefile.vc deleted file mode 100644 index b6578affa7c5..000000000000 --- a/ogr/ogrsf_frmts/vdv/makefile.vc +++ /dev/null @@ -1,15 +0,0 @@ - -OBJ = ogrvdvdatasource.obj -EXTRAFLAGS = -I.. -I..\.. - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - -clean: - -del *.obj *.pdb - - - diff --git a/ogr/ogrsf_frmts/vfk/GNUmakefile b/ogr/ogrsf_frmts/vfk/GNUmakefile deleted file mode 100644 index 379ad8d6d93d..000000000000 --- a/ogr/ogrsf_frmts/vfk/GNUmakefile +++ /dev/null @@ -1,21 +0,0 @@ - -include ../../../GDALmake.opt - -CORE_OBJ = vfkreader.o vfkreadersqlite.o \ - vfkdatablock.o vfkdatablocksqlite.o \ - vfkpropertydefn.o \ - vfkfeature.o vfkfeaturesqlite.o \ - vfkproperty.o - -OGR_OBJ = ogrvfkdriver.o ogrvfkdatasource.o ogrvfklayer.o - -OBJ = $(CORE_OBJ) $(OGR_OBJ) - -CPPFLAGS := -iquote .. -iquote ../.. $(SQLITE_INC) $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ): ogr_vfk.h vfkreader.h vfkreaderp.h diff --git a/ogr/ogrsf_frmts/vfk/makefile.vc b/ogr/ogrsf_frmts/vfk/makefile.vc deleted file mode 100644 index 83e257899497..000000000000 --- a/ogr/ogrsf_frmts/vfk/makefile.vc +++ /dev/null @@ -1,20 +0,0 @@ -CORE_OBJ = vfkreader.obj vfkreadersqlite.obj \ - vfkdatablock.obj vfkdatablocksqlite.obj \ - vfkpropertydefn.obj \ - vfkfeature.obj vfkfeaturesqlite.obj \ - vfkproperty.obj - -OGR_OBJ = ogrvfkdriver.obj ogrvfkdatasource.obj ogrvfklayer.obj - -OBJ = $(CORE_OBJ) $(OGR_OBJ) - -EXTRAFLAGS = -I.. -I..\.. $(SQLITE_INC) -DHAVE_SQLITE - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - -clean: - -del *.obj *.pdb diff --git a/ogr/ogrsf_frmts/vrt/GNUmakefile b/ogr/ogrsf_frmts/vrt/GNUmakefile deleted file mode 100644 index bcc5209d0eec..000000000000 --- a/ogr/ogrsf_frmts/vrt/GNUmakefile +++ /dev/null @@ -1,14 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogrvrtdatasource.o ogrvrtlayer.o ogrvrtdriver.o - -CPPFLAGS := -iquote .. -iquote ../.. -iquote ../generic $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ): ogr_vrt.h ../generic/ogrwarpedlayer.h ../generic/ogrunionlayer.h diff --git a/ogr/ogrsf_frmts/vrt/makefile.vc b/ogr/ogrsf_frmts/vrt/makefile.vc deleted file mode 100644 index 1027bcd53829..000000000000 --- a/ogr/ogrsf_frmts/vrt/makefile.vc +++ /dev/null @@ -1,15 +0,0 @@ - -OBJ = ogrvrtdriver.obj ogrvrtdatasource.obj ogrvrtlayer.obj - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -EXTRAFLAGS = -I.. -I..\.. -I..\generic - -default: $(OBJ) - -clean: - -del *.lib - -del *.obj *.pdb - -del *.exe diff --git a/ogr/ogrsf_frmts/wasp/GNUmakefile b/ogr/ogrsf_frmts/wasp/GNUmakefile deleted file mode 100644 index 373b477ef1f0..000000000000 --- a/ogr/ogrsf_frmts/wasp/GNUmakefile +++ /dev/null @@ -1,14 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogrwaspdriver.o ogrwaspdatasource.o ogrwasplayer.o - -CPPFLAGS := -iquote .. -iquote ../.. $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ:.o=.$(OBJ_EXT)): ogrwasp.h diff --git a/ogr/ogrsf_frmts/wasp/makefile.vc b/ogr/ogrsf_frmts/wasp/makefile.vc deleted file mode 100644 index 83ba113b8bc5..000000000000 --- a/ogr/ogrsf_frmts/wasp/makefile.vc +++ /dev/null @@ -1,15 +0,0 @@ - -OBJ = ogrwaspdriver.obj ogrwaspdatasource.obj ogrwasplayer.obj -EXTRAFLAGS = -I.. -I..\.. - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - -clean: - -del *.obj *.pdb - - - diff --git a/ogr/ogrsf_frmts/wfs/GNUmakefile b/ogr/ogrsf_frmts/wfs/GNUmakefile deleted file mode 100644 index b7ec5b04f17b..000000000000 --- a/ogr/ogrsf_frmts/wfs/GNUmakefile +++ /dev/null @@ -1,14 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogrwfsdriver.o ogrwfsdatasource.o ogrwfslayer.o ogrwfsfilter.o ogrwfsjoinlayer.o ogroapifdriver.o - -CPPFLAGS := -iquote .. -iquote ../.. -iquote ../gml $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ): ogr_wfs.h ../../ogr_swq.h ../gml/gmlreader.h ../gml/parsexsd.h diff --git a/ogr/ogrsf_frmts/wfs/makefile.vc b/ogr/ogrsf_frmts/wfs/makefile.vc deleted file mode 100644 index c10e48182abe..000000000000 --- a/ogr/ogrsf_frmts/wfs/makefile.vc +++ /dev/null @@ -1,15 +0,0 @@ - -OBJ = ogrwfsdriver.obj ogrwfsdatasource.obj ogrwfslayer.obj ogrwfsfilter.obj ogrwfsjoinlayer.obj ogroapifdriver.obj -EXTRAFLAGS = -I.. -I..\.. -I..\gml - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - -clean: - -del *.obj *.pdb - - - diff --git a/ogr/ogrsf_frmts/xls/GNUmakefile b/ogr/ogrsf_frmts/xls/GNUmakefile deleted file mode 100644 index ca7aad7920ca..000000000000 --- a/ogr/ogrsf_frmts/xls/GNUmakefile +++ /dev/null @@ -1,14 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogrxlsdriver.o ogrxlsdatasource.o ogrxlslayer.o - -CPPFLAGS := -iquote .. -iquote ../.. $(FREEXL_INCLUDE) $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ): ogr_xls.h \ No newline at end of file diff --git a/ogr/ogrsf_frmts/xls/makefile.vc b/ogr/ogrsf_frmts/xls/makefile.vc deleted file mode 100644 index cb0229f76683..000000000000 --- a/ogr/ogrsf_frmts/xls/makefile.vc +++ /dev/null @@ -1,15 +0,0 @@ - -OBJ = ogrxlsdriver.obj ogrxlsdatasource.obj ogrxlslayer.obj -EXTRAFLAGS = -I.. -I..\.. $(FREEXL_CFLAGS) - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - -clean: - -del *.obj *.pdb - - - diff --git a/ogr/ogrsf_frmts/xlsx/GNUmakefile b/ogr/ogrsf_frmts/xlsx/GNUmakefile deleted file mode 100644 index 26790b08f847..000000000000 --- a/ogr/ogrsf_frmts/xlsx/GNUmakefile +++ /dev/null @@ -1,18 +0,0 @@ - - -include ../../../GDALmake.opt - -OBJ = ogrxlsxdriver.o ogrxlsxdatasource.o - -ifeq ($(HAVE_EXPAT),yes) -CPPFLAGS += -DHAVE_EXPAT -endif - -CPPFLAGS := -iquote .. -iquote ../.. -iquote ../mem $(EXPAT_INCLUDE) $(CPPFLAGS) - -default: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o $(O_OBJ) - -$(O_OBJ): ogr_xlsx.h ../mem/ogr_mem.h \ No newline at end of file diff --git a/ogr/ogrsf_frmts/xlsx/makefile.vc b/ogr/ogrsf_frmts/xlsx/makefile.vc deleted file mode 100644 index 6d15dd1ce3ec..000000000000 --- a/ogr/ogrsf_frmts/xlsx/makefile.vc +++ /dev/null @@ -1,20 +0,0 @@ - -OBJ = ogrxlsxdriver.obj ogrxlsxdatasource.obj - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -!IFDEF EXPAT_DIR -EXTRAFLAGS = -I.. -I..\.. -I..\mem $(EXPAT_INCLUDE) -DHAVE_EXPAT=1 -!ELSE -EXTRAFLAGS = -I.. -I..\.. -I..\mem -!ENDIF - -default: $(OBJ) - -clean: - -del *.obj *.pdb - - - diff --git a/port/GNUmakefile b/port/GNUmakefile deleted file mode 100644 index 36f11fad12b1..000000000000 --- a/port/GNUmakefile +++ /dev/null @@ -1,149 +0,0 @@ -# -# CPL (Common Portability Library) makefile -# -ifneq ($(wildcard ../GDALmake.op?),) -include ../GDALmake.opt -else -include GDALmake.opt -endif - -XTRA_OPT= - -ifeq ($(LIBZ_SETTING),internal) -XTRA_OPT := $(XTRA_OPT) -I../frmts/zlib -endif - -ifeq ($(HAVE_BLOSC),yes) -XTRA_OPT := $(XTRA_OPT) -DHAVE_BLOSC -endif - -ifeq ($(LIBLZMA_SETTING),yes) -XTRA_OPT := $(XTRA_OPT) -DHAVE_LZMA -endif - -ifeq ($(ZSTD_SETTING),yes) -XTRA_OPT := $(XTRA_OPT) -DHAVE_ZSTD -endif - -ifeq ($(HAVE_LZ4),yes) -XTRA_OPT := $(XTRA_OPT) -DHAVE_LZ4 -endif - -CPPFLAGS := $(CPPFLAGS) $(CURL_INC) $(JSON_INCLUDE) $(XTRA_OPT) -DINST_DATA=\"$(INST_DATA)\" -DSYSCONFDIR=\"$(sysconfdir)\" - -CXXFLAGS := $(WARN_EFFCPLUSPLUS) $(WARN_OLD_STYLE_CAST) $(CXXFLAGS) - -OBJ = cpl_conv.o cpl_error.o cpl_string.o cplgetsymbol.o cplstringlist.o \ - cpl_strtod.o cpl_path.o cpl_csv.o cpl_findfile.o cpl_minixml.o \ - cpl_multiproc.o cpl_list.o cpl_getexecpath.o cplstring.o \ - cpl_vsil_win32.o cpl_vsisimple.o cpl_vsil.o cpl_vsi_mem.o \ - cpl_vsil_unix_stdio_64.o cpl_http.o cpl_hash_set.o cplkeywordparser.o \ - cpl_recode.o cpl_recode_iconv.o cpl_recode_stub.o cpl_quad_tree.o \ - cpl_atomic_ops.o cpl_vsil_subfile.o cpl_time.o \ - cpl_vsil_stdout.o cpl_vsil_sparsefile.o cpl_vsil_abstract_archive.o \ - cpl_vsil_tar.o cpl_vsil_stdin.o cpl_vsil_buffered_reader.o \ - cpl_base64.o cpl_vsil_curl.o cpl_vsil_curl_streaming.o \ - cpl_vsil_s3.o cpl_vsil_gs.o cpl_vsil_az.o cpl_vsil_adls.o cpl_vsil_oss.o \ - cpl_vsil_swift.o cpl_vsil_webhdfs.o \ - cpl_vsil_cache.o cpl_xml_validate.o cpl_spawn.o \ - cpl_google_oauth2.o cpl_progress.o cpl_virtualmem.o cpl_worker_thread_pool.o \ - cpl_sha1.o cpl_aws.o cpl_aws_win32.cpp cpl_vsi_error.o cpl_cpu_features.o \ - cpl_google_cloud.o cpl_azure.o cpl_alibaba_oss.o cpl_json_streaming_parser.o \ - cpl_json.o cpl_md5.o cpl_swift.o cpl_vsil_plugin.o \ - cpl_vsil_hdfs.o cpl_userfaultfd.o cpl_json_streaming_writer.o \ - cpl_vax.o cpl_vsil_uploadonclose.o cpl_compressor.o cpl_float.o - -ifeq ($(ODBC_SETTING),yes) -OBJ := $(OBJ) cpl_odbc.o -endif - - -ifeq ($(CURL_SETTING),yes) -CPPFLAGS := $(CPPFLAGS) -DHAVE_CURL -endif - -ifneq ($(LIBZ_SETTING),no) -OBJ := $(OBJ) cpl_vsil_gzip.o cpl_minizip_ioapi.o \ - cpl_minizip_unzip.o cpl_minizip_zip.o -CPPFLAGS := $(CPPFLAGS) -DHAVE_LIBZ -endif - -ifeq ($(HAVE_LIBXML2),yes) -CPPFLAGS := $(CPPFLAGS) $(LIBXML2_INC) -DHAVE_LIBXML2 -endif - -ifeq ($(HAVE_CRYPTOPP),yes) -CPPFLAGS := $(CPPFLAGS) -DHAVE_CRYPTOPP -endif - -ifeq ($(USE_ONLY_CRYPTODLL_ALG),yes) -CPPFLAGS := $(CPPFLAGS) -DUSE_ONLY_CRYPTODLL_ALG -endif - -ifeq ($(HAVE_OPENSSL_CRYPTO),yes) -CPPFLAGS := $(CPPFLAGS) -DHAVE_OPENSSL_CRYPTO -endif - -ifeq ($(HDFS_ENABLED),yes) -CPPFLAGS := $(CPPFLAGS) $(HDFS_INC) -DHDFS_ENABLED -endif - -ifeq ($(ENABLE_UFFD),yes) -CPPFLAGS := $(CPPFLAGS) -DENABLE_UFFD -endif - -ifeq ($(LIBDEFLATE_SETTING),yes) -CPPFLAGS := $(CPPFLAGS) -DHAVE_LIBDEFLATE -endif - -default: $(OBJ:.o=.$(OBJ_EXT)) cpl_sha256.$(OBJ_EXT) cpl_vsil_crypt.$(OBJ_EXT) - -# cpl_sha256.cpp and cpl_vsil_crypt.cpp uses cryptocpp headers which make use of -# unsigned integer overflow arithmetic. -CXXFLAGS_NO_SANITIZE_UIO := $(subst -fsanitize=unsigned-integer-overflow,,${CXXFLAGS}) - -cpl_sha256.$(OBJ_EXT): cpl_sha256.cpp - $(CXX) $(GDAL_INCLUDE) $(CXXFLAGS_NO_SANITIZE_UIO) $(CPPFLAGS) -c -o $@ $< - -cpl_vsil_crypt.$(OBJ_EXT): cpl_vsil_crypt.cpp - $(CXX) $(GDAL_INCLUDE) $(CXXFLAGS_NO_SANITIZE_UIO) $(CPPFLAGS) -c -o $@ $< - - -$(OBJ): cpl_vsi_virtual.h cpl_vsil_curl_class.h - -clean: - $(RM) *.o $(O_OBJ) - -INST_H_FILES = \ - cpl_atomic_ops.h \ - cpl_config_extras.h \ - cpl_conv.h \ - cpl_csv.h \ - cpl_error.h \ - cpl_hash_set.h \ - cpl_http.h \ - cpl_json.h \ - cplkeywordparser.h \ - cpl_list.h \ - cpl_minixml.h \ - cpl_minizip_ioapi.h \ - cpl_minizip_unzip.h \ - cpl_minizip_zip.h \ - cpl_multiproc.h \ - cpl_odbc.h \ - cpl_port.h \ - cpl_progress.h \ - cpl_quad_tree.h \ - cpl_spawn.h \ - cpl_string.h \ - cpl_time.h \ - cpl_virtualmem.h \ - cpl_vsi.h \ - cpl_vsi_error.h \ - cpl_vsi_virtual.h \ - gdal_csv.h \ - cpl_auto_close.h \ - cpl_compressor.h - -install: - for f in $(INST_H_FILES) ; do $(INSTALL_DATA) $$f $(DESTDIR)$(INST_INCLUDE) ; done diff --git a/port/makefile.vc b/port/makefile.vc deleted file mode 100644 index cc8e1c4cbe24..000000000000 --- a/port/makefile.vc +++ /dev/null @@ -1,182 +0,0 @@ -# -# CPL (Common Portability Library) makefile for MSVC -# - -OBJ = cpl_conv.obj \ - cpl_error.obj \ - cpl_string.obj \ - cplstring.obj \ - cplstringlist.obj \ - cpl_strtod.obj \ - cpl_vsisimple.obj \ - cplgetsymbol.obj \ - cpl_path.obj \ - cpl_csv.obj \ - cpl_findfile.obj \ - cpl_vsil_win32.obj \ - cpl_minixml.obj \ - cpl_multiproc.obj \ - cpl_list.obj \ - cpl_getexecpath.obj \ - cpl_vsil.obj \ - cpl_vsi_mem.obj \ - cpl_http.obj \ - cpl_hash_set.obj \ - cplkeywordparser.obj \ - cpl_recode.obj \ - cpl_recode_iconv.obj \ - cpl_recode_stub.obj \ - cpl_quad_tree.obj \ - cpl_vsil_gzip.obj \ - cpl_minizip_ioapi.obj \ - cpl_minizip_unzip.obj \ - cpl_minizip_zip.obj \ - cpl_vsil_subfile.obj \ - cpl_atomic_ops.obj \ - cpl_time.obj \ - cpl_vsil_stdout.obj \ - cpl_vsil_sparsefile.obj \ - cpl_vsil_abstract_archive.obj \ - cpl_vsil_tar.obj \ - cpl_vsil_curl.obj \ - cpl_vsil_s3.obj \ - cpl_vsil_gs.obj \ - cpl_vsil_az.obj \ - cpl_vsil_adls.obj \ - cpl_vsil_oss.obj \ - cpl_vsil_plugin.obj \ - cpl_vsil_swift.obj \ - cpl_vsil_webhdfs.obj \ - cpl_vsil_hdfs.obj \ - cpl_vsil_curl_streaming.obj \ - cpl_vsil_stdin.obj \ - cpl_vsil_buffered_reader.obj \ - cpl_vsil_cache.obj \ - cpl_base64.obj \ - cpl_xml_validate.obj \ - cpl_spawn.obj \ - cpl_google_oauth2.obj \ - cpl_progress.obj \ - cpl_virtualmem.obj \ - cpl_worker_thread_pool.obj \ - cpl_vsil_crypt.obj \ - cpl_sha1.obj \ - cpl_sha256.obj \ - cpl_aws.obj \ - cpl_aws_win32.obj \ - cpl_vsi_error.obj \ - cpl_cpu_features.obj \ - cpl_google_cloud.obj \ - cpl_azure.obj \ - cpl_alibaba_oss.obj \ - cpl_json_streaming_parser.obj \ - cpl_json_streaming_writer.obj \ - cpl_json.obj \ - cpl_md5.obj \ - cpl_swift.obj \ - cpl_vax.obj \ - cpl_vsil_uploadonclose.obj \ - cpl_compressor.obj \ - cpl_float.obj \ - $(ODBC_OBJ) - -LIB = cpl.lib - -GDAL_ROOT = .. - -!INCLUDE ..\nmake.opt - -!IFDEF ZLIB_EXTERNAL_LIB -EXTRAFLAGS = $(ZLIB_INC) -!ELSE -EXTRAFLAGS = -I..\frmts\zlib -!ENDIF - -EXTRAFLAGS = $(EXTRAFLAGS) -DHAVE_LIBZ -I..\ogr\ogrsf_frmts\geojson\libjson - -!IFDEF LIBICONV_INCLUDE -EXTRAFLAGS = $(EXTRAFLAGS) -DHAVE_ICONV $(LIBICONV_CFLAGS) $(LIBICONV_INCLUDE) -!ENDIF - -!IFDEF CURL_INC -EXTRAFLAGS = $(EXTRAFLAGS) -DHAVE_CURL $(CURL_CFLAGS) $(CURL_INC) -!ENDIF - -!IFDEF LIBXML2_INC -EXTRAFLAGS = $(EXTRAFLAGS) -DHAVE_LIBXML2 $(LIBXML2_INC) -!ENDIF - -!IFDEF CRYPTOPP_INC -EXTRAFLAGS = $(EXTRAFLAGS) -DHAVE_CRYPTOPP $(CRYPTOPP_INC) -!ENDIF - -!IFDEF USE_ONLY_CRYPTODLL_ALG -EXTRAFLAGS = $(EXTRAFLAGS) -DUSE_ONLY_CRYPTODLL_ALG -!ENDIF - -!IFDEF OPENSSL_INC -EXTRAFLAGS = $(EXTRAFLAGS) -DHAVE_OPENSSL_CRYPTO $(OPENSSL_INC) -!ENDIF - -!IFDEF LIBDEFLATE_CFLAGS -EXTRAFLAGS = $(EXTRAFLAGS) $(LIBDEFLATE_CFLAGS) -DHAVE_LIBDEFLATE -!ENDIF - -!IFDEF BLOSC_CFLAGS -EXTRAFLAGS = $(EXTRAFLAGS) $(BLOSC_CFLAGS) -DHAVE_BLOSC -!ENDIF - -!IFDEF LZMA_CFLAGS -EXTRAFLAGS = $(EXTRAFLAGS) $(LZMA_CFLAGS) -DHAVE_LZMA -!ENDIF - -!IFDEF ZSTD_CFLAGS -EXTRAFLAGS = $(EXTRAFLAGS) $(ZSTD_CFLAGS) -DHAVE_ZSTD -!ENDIF - -!IFDEF LZ4_CFLAGS -EXTRAFLAGS = $(EXTRAFLAGS) $(LZ4_CFLAGS) -DHAVE_LZ4 -!ENDIF - -!IFDEF ODBC_SUPPORTED -ODBC_OBJ = cpl_odbc.obj -!ENDIF - -!IF "$(HAVE_ATLBASE_H)" == "YES" -EXTRAFLAGS = $(EXTRAFLAGS) -DHAVE_ATLBASE_H=1 -!ENDIF - -default: prev_dllbuild cpl_config.h $(LIB) - -$(LIB): $(OBJ) - lib /out:cpl.lib *.obj - -clean: - -del *.obj *.lib cpl_config.h dllbuild.prev - -# This "mechanism" updates a temporary dllbuild.prev file with the $(DLLBUILD) setting, but only -# when dllbuild.prev doesn't exist or doesn't match the current $(DLLBUILD) setting. -# -# The upside to this is that repeated builds with the same setting won't cause cpl_config.h to be -# regenerated, which should prevent unnecessary recompilation. -# -# It has to be done in a temporary/inline batch script because normal NMAKE commands apparently -# don't have extensions enabled which apparently prevents setting a variable from file contents. -prev_dllbuild: - call < dllbuild.prev -SET /P PREV_DLLBUILD= dllbuild.prev -<< - -cpl_config.h: dllbuild.prev \ - cpl_config.h.vc.begin \ - cpl_config.h.vc.common \ - cpl_config.h.vc.no_dll \ - cpl_config.h.vc.end - type cpl_config.h.vc.begin > cpl_config.h - type cpl_config.h.vc.common >> cpl_config.h - IF NOT "$(DLLBUILD)"=="1" \ - type cpl_config.h.vc.no_dll >> cpl_config.h - type cpl_config.h.vc.end >> cpl_config.h diff --git a/scripts/GNUmakefile b/scripts/GNUmakefile deleted file mode 100644 index 990425548317..000000000000 --- a/scripts/GNUmakefile +++ /dev/null @@ -1,20 +0,0 @@ -include ../GDALmake.opt - -PROGRAMS := gdal2tiles.py gdal2xyz.py gdaladdo gdalbuildvrt gdal_calc.py \ - gdalchksum.py gdalcompare.py gdal-config gdal_contour gdaldem \ - gdal_edit.py gdalenhance gdal_fillnodata.py gdal_grid \ - gdalident.py gdalimport.py gdallocationinfo gdalmanage \ - gdal_merge.py gdalmove.py gdal_polygonize.py gdal_proximity.py \ - gdal_rasterize gdal_retile.py gdal_sieve.py \ - gdalsrsinfo gdaltindex gdaltransform gdal_translate gdalwarp \ - ogr2ogr ogrinfo ogrlineref ogrmerge.py ogrtindex gdal_viewshed gdal_create - -completion: - PATH=$(GDAL_ROOT)/swig/python/gdal-utils/scripts:$(GDAL_ROOT)/apps:$(PATH) python completionFinder.py gdal-bash-completion.sh - -install: - $(INSTALL_DIR) $(DESTDIR)$(INST_BASH_COMPLETION) ; \ - $(INSTALL_DATA) gdal-bash-completion.sh $(DESTDIR)$(INST_BASH_COMPLETION)/gdalinfo; \ - for p in $(PROGRAMS); do \ - ln -rs $(DESTDIR)$(INST_BASH_COMPLETION)/gdalinfo $(DESTDIR)$(INST_BASH_COMPLETION)/$$p; \ - done diff --git a/submake.bat b/submake.bat deleted file mode 100644 index a604d11109e3..000000000000 --- a/submake.bat +++ /dev/null @@ -1,5 +0,0 @@ -@echo off -cd %1 -nmake /NOLOGO /f makefile.vc %2 -if ERRORLEVEL 1 exit 1 -cd .. diff --git a/swig/GNUmakefile b/swig/GNUmakefile deleted file mode 100644 index 6cda83c18e1a..000000000000 --- a/swig/GNUmakefile +++ /dev/null @@ -1,32 +0,0 @@ - -include ../GDALmake.opt - -# The BINDINGS variable in GDALmake.opt contains a list of language -# bindings to be built and installed by default. - -# The ALL_BINDINGS variable defines all the possible bindings. It's used -# in the dist and clean definitions. -ALL_BINDINGS = python csharp java - -default: generate - -# The dist target should generate all the wrapper files for all supported -# language bindings. This should be called by the top level distribution -# maker script prior to bundling up the source. It eliminates the installer -# from having the proper version of swig installed. -dist: generate - -clean: - for dir in ${BINDINGS}; do (cd $$dir; $(MAKE) clean) || exit; done - -veryclean: - for dir in ${ALL_BINDINGS}; do (cd $$dir; $(MAKE) veryclean) || exit; done - -generate: - for dir in ${ALL_BINDINGS}; do (cd $$dir; $(MAKE) generate) || exit; done - -build: - for dir in ${BINDINGS}; do (cd $$dir; $(MAKE) build) || exit; done - -install: - for dir in ${BINDINGS}; do (cd $$dir; $(MAKE) install) || exit; done diff --git a/swig/SWIGmake.base b/swig/SWIGmake.base deleted file mode 100644 index e4f360a23d00..000000000000 --- a/swig/SWIGmake.base +++ /dev/null @@ -1,21 +0,0 @@ - -SWIG = swig -SWIGARGS = -Wall -I../include -I../include/$(BINDING) -I../include/$(BINDING)/docs - -WRAPPERS_WITHOUT_GNM = $(SWIGOUTPUTDIR)gdal_wrap.cpp $(SWIGOUTPUTDIR)gdalconst_wrap.c $(SWIGOUTPUTDIR)ogr_wrap.cpp $(SWIGOUTPUTDIR)osr_wrap.cpp -WRAPPERS = $(WRAPPERS_WITHOUT_GNM) $(SWIGOUTPUTDIR)gnm_wrap.cpp - -$(SWIGOUTPUTDIR)gdal_wrap.cpp: ../include/gdal.i ../include/MajorObject.i ../include/Driver.i ../include/Dataset.i ../include/Band.i ../include/ColorTable.i ../include/cpl.i ../include/$(BINDING)/gdal_$(BINDING).i ../include/$(BINDING)/typemaps_$(BINDING).i $(SWIG_INCLUDES) - $(SWIG) $(SWIGARGS) $(SWIGDEFINES) $(SWIG_GDAL_WRAP) -I$(GDAL_ROOT) -c++ -$(BINDING) -o $@ ../include/gdal.i - -$(SWIGOUTPUTDIR)gdalconst_wrap.c: ../include/gdalconst.i $(SWIG_INCLUDES) - $(SWIG) $(SWIGARGS) $(SWIGDEFINES) $(SWIG_GDALCONST_WRAP) -I$(GDAL_ROOT) -$(BINDING) -o $@ ../include/gdalconst.i - -$(SWIGOUTPUTDIR)ogr_wrap.cpp: ../include/ogr.i ../include/$(BINDING)/ogr_$(BINDING).i ../include/$(BINDING)/typemaps_$(BINDING).i $(SWIG_INCLUDES) - $(SWIG) $(SWIGARGS) $(SWIGDEFINES) $(SWIG_OGR_WRAP) -I$(GDAL_ROOT) -c++ -$(BINDING) -o $@ ../include/ogr.i - -$(SWIGOUTPUTDIR)osr_wrap.cpp: ../include/osr.i ../include/$(BINDING)/osr_$(BINDING).i ../include/$(BINDING)/typemaps_$(BINDING).i $(SWIG_INCLUDES) - $(SWIG) $(SWIGARGS) $(SWIGDEFINES) $(SWIG_OSR_WRAP) -I$(GDAL_ROOT) -c++ -$(BINDING) -o $@ ../include/osr.i - -$(SWIGOUTPUTDIR)gnm_wrap.cpp: ../include/gnm.i ../include/$(BINDING)/gnm_$(BINDING).i ../include/$(BINDING)/typemaps_$(BINDING).i $(SWIG_INCLUDES) - $(SWIG) $(SWIGARGS) $(SWIGDEFINES) $(SWIG_GNM_WRAP) -I$(GDAL_ROOT) -c++ -$(BINDING) -o $@ ../include/gnm.i diff --git a/swig/csharp/GNUmakefile b/swig/csharp/GNUmakefile deleted file mode 100644 index bf1f49abf7c8..000000000000 --- a/swig/csharp/GNUmakefile +++ /dev/null @@ -1,105 +0,0 @@ - -include ../../GDALmake.opt -include csharp.opt - -all: build - -BINDING = csharp -include ../SWIGmake.base - -SWIGARGS = -DSWIG2_CSHARP -Wall -I../include -I../include/$(BINDING) - -LINK = $(LD_SHARED) -LINK_EXTRAFLAGS = -OBJ_EXT = o -ifeq ($(HAVE_LIBTOOL),yes) -LINK = $(LD) -LINK_EXTRAFLAGS = -rpath $(INST_LIB) -no-undefined -version-info $(LIBGDAL_CURRENT):$(LIBGDAL_REVISION):$(LIBGDAL_AGE) -OBJ_EXT = lo -endif - -SUPPRESSW = -Wno-missing-prototypes -Wno-missing-declarations -Wno-deprecated-declarations -Wno-unused-parameter -Wno-unused-function - -CSHARP_MODULES = libgdalcsharp.$(SO_EXT) libogrcsharp.$(SO_EXT) libgdalconstcsharp.$(SO_EXT) libosrcsharp.$(SO_EXT) -CSHARP_OBJECTS = gdalconst_wrap.$(OBJ_EXT) gdal_wrap.$(OBJ_EXT) osr_wrap.$(OBJ_EXT) ogr_wrap.$(OBJ_EXT) - -CSC = mcs - -SWIG_GDAL_WRAP = -namespace OSGeo.GDAL -dllimport gdal_wrap -outdir gdal -SWIG_GDALCONST_WRAP = -namespace OSGeo.GDAL -dllimport gdalconst_wrap -outdir const -SWIG_OGR_WRAP = -namespace OSGeo.OGR -dllimport ogr_wrap -outdir ogr -SWIG_OSR_WRAP = -namespace OSGeo.OSR -dllimport osr_wrap -outdir osr - -clean: - -rm -f ${CSHARP_MODULES} *.$(OBJ_EXT) *.config *.dll *.mdb *.exe *.config - -veryclean: clean - -rm -f -R const/*.cs gdal/*.cs osr/*.cs ogr/*.cs *.c *.cpp Data - -build: ${CSHARP_OBJECTS} samples - -sign: - sn -k gdal.snk - -install: - @echo "No installation to be done" - -generate: ${WRAPPERS} - -$(CSHARP_MODULES): lib%csharp.$(SO_EXT): %_wrap.$(OBJ_EXT) - $(LINK) $(LDFLAGS) $(CONFIG_LIBS) $< -o $@ $(GDAL_SLIB_LINK) $(LINK_EXTRAFLAGS) - rm -rf $*_csharp.dll.config - echo "" >> $*_csharp.dll.config - echo "" >> $*_csharp.dll.config - echo "" >> $*_csharp.dll.config - -%.$(OBJ_EXT): %.cpp - $(CXX) $(CFLAGS) $(SUPPRESSW) $(GDAL_INCLUDE) -c $< - -%.$(OBJ_EXT): %.c - $(CC) $(CFLAGS) $(SUPPRESSW) $(GDAL_INCLUDE) -c $< - -osr_csharp.dll: libosrcsharp.$(SO_EXT) - $(CSC) /unsafe /debug:full /target:library /out:osr_csharp.dll osr/*.cs AssemblyInfo.cs - -ogr_csharp.dll: libogrcsharp.$(SO_EXT) osr_csharp.dll - $(CSC) /unsafe /debug:full /target:library /out:ogr_csharp.dll /r:osr_csharp.dll ogr/*.cs AssemblyInfo.cs - -gdal_csharp.dll: libgdalcsharp.$(SO_EXT) ogr_csharp.dll - $(CSC) /unsafe /debug:full /target:library /out:gdal_csharp.dll /r:ogr_csharp.dll /r:osr_csharp.dll gdal/*.cs AssemblyInfo.cs - -gdalconst_csharp.dll: libgdalconstcsharp.$(SO_EXT) - $(CSC) /unsafe /debug:full /target:library /out:gdalconst_csharp.dll const/*.cs AssemblyInfo.cs - -samples: gdalconst_csharp.dll gdal_csharp.dll ogr_csharp.dll osr_csharp.dll - $(CSC) /r:ogr_csharp.dll /r:osr_csharp.dll /out:ogrinfo.exe apps/ogrinfo.cs - $(CSC) /r:ogr_csharp.dll /r:osr_csharp.dll /out:createdata.exe apps/createdata.cs - $(CSC) /r:osr_csharp.dll /out:OSRTransform.exe apps/OSRTransform.cs - $(CSC) /r:gdal_csharp.dll /r:System.Drawing.dll /out:GDALRead.exe apps/GDALRead.cs - $(CSC) /r:gdal_csharp.dll /r:System.Drawing.dll /out:GDALReadDirect.exe apps/GDALReadDirect.cs - $(CSC) /r:gdal_csharp.dll /r:System.Drawing.dll /out:GDALAdjustContrast.exe apps/GDALAdjustContrast.cs - $(CSC) /r:gdal_csharp.dll /r:System.Drawing.dll /out:GDALDatasetRasterIO.exe apps/GDALDatasetRasterIO.cs - $(CSC) /r:gdal_csharp.dll /out:GDALWrite.exe apps/GDALWrite.cs - $(CSC) /r:gdal_csharp.dll /out:GDALDatasetWrite.exe apps/GDALDatasetWrite.cs - $(CSC) /r:gdal_csharp.dll /out:GDALColorTable.exe apps/GDALColorTable.cs - $(CSC) /r:ogr_csharp.dll /out:WKT2WKB.exe apps/WKT2WKB.cs - $(CSC) /r:ogr_csharp.dll /out:OGRGEOS.exe apps/OGRGEOS.cs - $(CSC) /r:gdal_csharp.dll /out:ReadXML.exe apps/ReadXML.cs - $(CSC) /r:gdal_csharp.dll /r:osr_csharp.dll /out:GDALInfo.exe apps/GDALInfo.cs - $(CSC) /r:gdal_csharp.dll /out:GDALOverviews.exe apps/GDALOverviews.cs - $(CSC) /r:gdal_csharp.dll /out:GDALCreateCopy.exe apps/GDALCreateCopy.cs - $(CSC) /r:gdal_csharp.dll /out:GDALGetHistogram.exe apps/GDALGetHistogram.cs - -vagrant_safe_test: - LC_ALL=C mono createdata.exe Data pointlayer - LC_ALL=C mono ogrinfo.exe Data/pointlayer.shp - LC_ALL=C mono GDALWrite.exe Data/sample.tif - LC_ALL=C mono GDALDatasetWrite.exe Data/sample1.tif - LC_ALL=C mono GDALCreateCopy.exe Data/sample.tif Data/sample2.tif - LC_ALL=C mono GDALOverviews.exe Data/sample.tif NEAREST 2 4 - LC_ALL=C mono GDALInfo.exe Data/sample.tif - -test: vagrant_safe_test - LC_ALL=C mono OSRTransform.exe - -.PHONY: all clean veryclean generate interface build sign install gdal_csharp samples vagrant_safe_test test diff --git a/swig/csharp/const/makefile.vc b/swig/csharp/const/makefile.vc deleted file mode 100644 index 8b963eff4f8b..000000000000 --- a/swig/csharp/const/makefile.vc +++ /dev/null @@ -1,19 +0,0 @@ -OBJ = gdalconst_wrap.obj - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj .. - -clean: - -del *.obj - -del *.cs - -del *.c - -del *.csproj - -del *.json - -del *.dll - -del *.pdb - -rd /q /s obj - diff --git a/swig/csharp/csharp.opt b/swig/csharp/csharp.opt deleted file mode 100644 index e9fd45a0c7ef..000000000000 --- a/swig/csharp/csharp.opt +++ /dev/null @@ -1,15 +0,0 @@ -# -# csharp.opt - C# specific user defined options -# -# $Id$ -# - -#Uncomment the following line if you want to compile with MONO on windows -#MONO = YES - -#Comment the following line out if you want to link against the gdal dll -#CSHARP_STATIC_LINKAGE = YES - -#Uncomment these lines if we are targeting .NET standard/core -#NETSTANDARD = netstandard2.0 -#NETCORE = netcoreapp2.1 \ No newline at end of file diff --git a/swig/csharp/gdal/makefile.vc b/swig/csharp/gdal/makefile.vc deleted file mode 100644 index 218a3e63c968..000000000000 --- a/swig/csharp/gdal/makefile.vc +++ /dev/null @@ -1,19 +0,0 @@ -OBJ = gdal_wrap.obj - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj .. - -clean: - -del *.obj - -del *.cs - -del *.cpp - -del *.csproj - -del *.json - -del *.dll - -del *.pdb - -rd /q /s obj - diff --git a/swig/csharp/makefile.vc b/swig/csharp/makefile.vc deleted file mode 100644 index 142c83e7e976..000000000000 --- a/swig/csharp/makefile.vc +++ /dev/null @@ -1,349 +0,0 @@ -# -# makefile.vc - MSVC++ makefile for the C#/GDAL extension -# -# This VC++ makefile will build the GDAL C# interface assemblies -# -# To use the makefile: -# - Open a DOS prompt window -# - Run the VCVARS32.BAT script to initialize the VC++ environment variables -# - Start the build with: nmake /f makefile.vc -# -# $Id$ -# - -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -!INCLUDE csharp.opt - -GDAL_VERSION= \ -!INCLUDE $(GDAL_ROOT)\VERSION - -!IFDEF CSHARP_STATIC_LINKAGE -GDALLIB = $(GDAL_ROOT)\$(GDAL_LIB_NAME) -!ELSE -GDALLIB = $(GDAL_ROOT)\$(GDAL_LIB_NAME) -!ENDIF - -!IFDEF MONO -CSC = mcs -!ELSE -!IFNDEF NETSTANDARD -NETSTANDARD = netstandard2.0 -!ENDIF -!IFNDEF NETCORE -NETCORE = netcoreapp2.2 -!ENDIF -!IF $(MSVC_VER) >= 1400 -!IFDEF WIN64 -CSC = csc /platform:anycpu -DOTNET_RID = win-x64 -!ELSE -CSC = csc /platform:x86 -DOTNET_RID = win-x86 -!ENDIF -!ELSE -CSC = csc -!ENDIF -!ENDIF - -!IF "$(DEBUG)" == "1" -CSDEBUG = /debug:full -DOTNET_CONFIG = Debug -!ELSE -CSDEBUG = -DOTNET_CONFIG = Release -!ENDIF - -!IF $(MSVC_VER) >= 1600 -CSC = $(CSC) /define:CLR4 -!ENDIF - -OBJ = gdal_wrap.obj gdalconst_wrap.obj ogr_wrap.obj osr_wrap.obj - -.SUFFIXES: .cs .csproj - -all: ogr_dir gdal_dir osr_dir const_dir gdal_csharp samples - -template.csproj: -!IFDEF NETSTANDARD - echo ^ > $@ - echo ^ >> $@ - echo ^$(NETSTANDARD)^ >> $@ - echo ^AnyCPU^ >> $@ - echo ^$(GDAL_VERSION).0^ >> $@ - echo ^..\gdal.snk^ >> $@ - echo ^true^ >> $@ - echo ^true^ >> $@ - echo ^ >> $@ - echo ^ >> $@ -!ELSE - echo > $@ -!ENDIF - -{apps}.cs{apps}.csproj: -!IFDEF NETCORE - echo ^ > $@ - echo ^ >> $@ - echo ^Exe^ >> $@ - echo ^$(NETCORE)^ >> $@ - echo ^false^ >> $@ - echo ^$(GDAL_VERSION).0^ >> $@ - echo ^false^ >> $@ - echo ^ >> $@ - echo ^ >> $@ - echo ^ >> $@ - echo ^ >> $@ - echo ^ >> $@ -!ELSE - echo > $@ -!ENDIF - -gdal_csharp: template.csproj -!IFDEF NETSTANDARD - cd const - copy ..\template.csproj gdalconst_csharp.csproj - dotnet build -c $(DOTNET_CONFIG) -o "build" - cd .. - cd osr - copy ..\template.csproj osr_csharp.csproj - dotnet build -c $(DOTNET_CONFIG) -o "build" - cd .. - cd ogr - copy ..\template.csproj ogr_csharp.csproj - dotnet add reference ..\osr\osr_csharp.csproj - dotnet build -c $(DOTNET_CONFIG) -o "build" - cd .. - cd gdal - copy ..\template.csproj gdal_csharp.csproj - dotnet add reference ..\osr\osr_csharp.csproj ..\ogr\ogr_csharp.csproj - dotnet build -c $(DOTNET_CONFIG) -o "build" - cd .. -!ELSE - $(CSC) $(CSDEBUG) /unsafe /target:library /out:osr_csharp.dll osr\*.cs AssemblyInfo.cs - $(CSC) $(CSDEBUG) /unsafe /target:library /out:ogr_csharp.dll /r:osr_csharp.dll ogr\*.cs AssemblyInfo.cs - $(CSC) $(CSDEBUG) /unsafe /target:library /out:gdal_csharp.dll /r:ogr_csharp.dll /r:osr_csharp.dll gdal\*.cs AssemblyInfo.cs - $(CSC) $(CSDEBUG) /unsafe /target:library /out:gdalconst_csharp.dll const\*.cs AssemblyInfo.cs -!ENDIF - link /dll $(OGR_INCLUDE) $(BASE_INCLUDE) ogr_wrap.obj \ - $(EXTERNAL_LIBS) $(GDALLIB)\ - /out:ogr_wrap.dll $(LINKER_FLAGS) - if exist ogr_wrap.dll.manifest mt -manifest ogr_wrap.dll.manifest -outputresource:ogr_wrap.dll;2 - link /dll $(OGR_INCLUDE) $(BASE_INCLUDE) gdal_wrap.obj \ - $(EXTERNAL_LIBS) $(GDALLIB)\ - /out:gdal_wrap.dll $(LINKER_FLAGS) - if exist gdal_wrap.dll.manifest mt -manifest gdal_wrap.dll.manifest -outputresource:gdal_wrap.dll;2 - link /dll $(OGR_INCLUDE) $(BASE_INCLUDE) gdalconst_wrap.obj \ - $(EXTERNAL_LIBS) $(GDALLIB)\ - /out:gdalconst_wrap.dll $(LINKER_FLAGS) - if exist gdalconst_wrap.dll.manifest mt -manifest gdalconst_wrap.dll.manifest -outputresource:gdalconst_wrap.dll;2 - link /dll $(OGR_INCLUDE) $(BASE_INCLUDE) osr_wrap.obj \ - $(EXTERNAL_LIBS) $(GDALLIB)\ - /out:osr_wrap.dll $(LINKER_FLAGS) - if exist osr_wrap.dll.manifest mt -manifest osr_wrap.dll.manifest -outputresource:osr_wrap.dll;2 - -sign: - sn -k gdal.snk - -ogr_dir: - cd ogr - $(MAKE) /f makefile.vc - cd .. - -gdal_dir: - cd gdal - $(MAKE) /f makefile.vc - cd .. - -const_dir: - cd const - $(MAKE) /f makefile.vc - cd .. - -osr_dir: - cd osr - $(MAKE) /f makefile.vc - cd .. - -interface: - cd const - $(SWIG) -DSWIG2_CSHARP -csharp -namespace OSGeo.GDAL -dllimport gdalconst_wrap -o gdalconst_wrap.c ../../include/gdalconst.i - cd .. - cd gdal - $(SWIG) -DSWIG2_CSHARP -c++ -csharp -namespace OSGeo.GDAL -dllimport gdal_wrap -I../../include/csharp -o gdal_wrap.cpp ../../include/gdal.i - cd .. - cd osr - $(SWIG) -DSWIG2_CSHARP -c++ -csharp -namespace OSGeo.OSR -dllimport osr_wrap -I../../include/csharp -o osr_wrap.cpp ../../include/osr.i - cd .. - cd ogr - $(SWIG) -DSWIG2_CSHARP -c++ -csharp -namespace OSGeo.OGR -dllimport ogr_wrap -I../../include/csharp -o ogr_wrap.cpp ../../include/ogr.i - cd .. - -sampleprojects: apps/ogrinfo.csproj apps/createdata.csproj apps/OSRTransform.csproj apps/GDALRead.csproj apps/GDALReadDirect.csproj apps/GDALAdjustContrast.csproj apps/GDALDatasetRasterIO.csproj apps/GDALDatasetRasterIOEx.csproj apps/GDALWrite.csproj apps/GDALDatasetWrite.csproj apps/GDALColorTable.csproj apps/WKT2WKB.csproj apps/OGRGEOS.csproj apps/ReadXML.csproj apps/GDALInfo.csproj apps/GDALOverviews.csproj apps/GDALCreateCopy.csproj apps/GDALGetHistogram.csproj apps/VSIMem.csproj apps/GDALMemDataset.csproj apps/OGRLayerAlg.csproj apps/OGRFeatureEdit.csproj apps/GDALWarp.csproj apps/GetCRSInfo.csproj - -samples: sampleprojects -!IFDEF NETSTANDARD - cd apps - dotnet add ogrinfo.csproj reference ..\osr\osr_csharp.csproj - dotnet add ogrinfo.csproj reference ..\ogr\ogr_csharp.csproj - dotnet build -c $(DOTNET_CONFIG) -o "." -r $(DOTNET_RID) ogrinfo.csproj - dotnet add createdata.csproj reference ..\osr\osr_csharp.csproj - dotnet add createdata.csproj reference ..\ogr\ogr_csharp.csproj - dotnet build -c $(DOTNET_CONFIG) -o "." -r $(DOTNET_RID) createdata.csproj - dotnet add OSRTransform.csproj reference ..\osr\osr_csharp.csproj - dotnet build -c $(DOTNET_CONFIG) -o "." -r $(DOTNET_RID) OSRTransform.csproj - dotnet add GDALRead.csproj reference ..\gdal\gdal_csharp.csproj - dotnet add GDALRead.csproj package System.Drawing.Common -v 5.0.3 - dotnet build -c $(DOTNET_CONFIG) -o "." -r $(DOTNET_RID) GDALRead.csproj - dotnet add GDALReadDirect.csproj reference ..\gdal\gdal_csharp.csproj - dotnet add GDALReadDirect.csproj package System.Drawing.Common -v 5.0.3 - dotnet build -c $(DOTNET_CONFIG) -o "." -r $(DOTNET_RID) GDALReadDirect.csproj - dotnet add GDALAdjustContrast.csproj reference ..\gdal\gdal_csharp.csproj - dotnet add GDALAdjustContrast.csproj package System.Drawing.Common -v 5.0.3 - dotnet build -c $(DOTNET_CONFIG) -o "." -r $(DOTNET_RID) GDALAdjustContrast.csproj - dotnet add GDALDatasetRasterIO.csproj reference ..\gdal\gdal_csharp.csproj - dotnet add GDALDatasetRasterIO.csproj package System.Drawing.Common -v 5.0.3 - dotnet build -c $(DOTNET_CONFIG) -o "." -r $(DOTNET_RID) GDALDatasetRasterIO.csproj - dotnet add GDALDatasetRasterIOEx.csproj reference ..\gdal\gdal_csharp.csproj - dotnet add GDALDatasetRasterIOEx.csproj package System.Drawing.Common -v 5.0.3 - dotnet build -c $(DOTNET_CONFIG) -o "." -r $(DOTNET_RID) GDALDatasetRasterIOEx.csproj - dotnet add GDALWrite.csproj reference ..\gdal\gdal_csharp.csproj - dotnet build -c $(DOTNET_CONFIG) -o "." -r $(DOTNET_RID) GDALWrite.csproj - dotnet add GDALDatasetWrite.csproj reference ..\gdal\gdal_csharp.csproj - dotnet build -c $(DOTNET_CONFIG) -o "." -r $(DOTNET_RID) GDALDatasetWrite.csproj - dotnet add GDALColorTable.csproj reference ..\gdal\gdal_csharp.csproj - dotnet build -c $(DOTNET_CONFIG) -o "." -r $(DOTNET_RID) GDALColorTable.csproj - dotnet add WKT2WKB.csproj reference ..\ogr\ogr_csharp.csproj - dotnet build -c $(DOTNET_CONFIG) -o "." -r $(DOTNET_RID) WKT2WKB.csproj - dotnet add OGRGEOS.csproj reference ..\ogr\ogr_csharp.csproj - dotnet build -c $(DOTNET_CONFIG) -o "." -r $(DOTNET_RID) OGRGEOS.csproj - dotnet add ReadXML.csproj reference ..\gdal\gdal_csharp.csproj - dotnet build -c $(DOTNET_CONFIG) -o "." -r $(DOTNET_RID) ReadXML.csproj - dotnet add GDALInfo.csproj reference ..\ogr\ogr_csharp.csproj - dotnet add GDALInfo.csproj reference ..\gdal\gdal_csharp.csproj - dotnet build -c $(DOTNET_CONFIG) -o "." -r $(DOTNET_RID) GDALInfo.csproj - dotnet add GDALOverviews.csproj reference ..\gdal\gdal_csharp.csproj - dotnet build -c $(DOTNET_CONFIG) -o "." -r $(DOTNET_RID) GDALOverviews.csproj - dotnet add GDALCreateCopy.csproj reference ..\gdal\gdal_csharp.csproj - dotnet build -c $(DOTNET_CONFIG) -o "." -r $(DOTNET_RID) GDALCreateCopy.csproj - dotnet add GDALGetHistogram.csproj reference ..\gdal\gdal_csharp.csproj - dotnet build -c $(DOTNET_CONFIG) -o "." -r $(DOTNET_RID) GDALGetHistogram.csproj - dotnet add VSIMem.csproj reference ..\gdal\gdal_csharp.csproj - dotnet build -c $(DOTNET_CONFIG) -o "." -r $(DOTNET_RID) VSIMem.csproj - dotnet add GDALMemDataset.csproj reference ..\gdal\gdal_csharp.csproj - dotnet add GDALMemDataset.csproj package System.Drawing.Common -v 5.0.3 - dotnet build -c $(DOTNET_CONFIG) -o "." -r $(DOTNET_RID) GDALMemDataset.csproj - dotnet add OGRLayerAlg.csproj reference ..\osr\osr_csharp.csproj - dotnet add OGRLayerAlg.csproj reference ..\ogr\ogr_csharp.csproj - dotnet build -c $(DOTNET_CONFIG) -o "." -r $(DOTNET_RID) OGRLayerAlg.csproj - dotnet add OGRFeatureEdit.csproj reference ..\osr\osr_csharp.csproj - dotnet add OGRFeatureEdit.csproj reference ..\ogr\ogr_csharp.csproj - dotnet build -c $(DOTNET_CONFIG) -o "." -r $(DOTNET_RID) OGRFeatureEdit.csproj - dotnet add GDALWarp.csproj reference ..\gdal\gdal_csharp.csproj - dotnet build -c $(DOTNET_CONFIG) -o "." -r $(DOTNET_RID) GDALWarp.csproj - dotnet add GetCRSInfo.csproj reference ..\osr\osr_csharp.csproj - dotnet build -c $(DOTNET_CONFIG) -o "." -r $(DOTNET_RID) GetCRSInfo.csproj - -move /Y *.dll .. - -move /Y *.exe .. - -move /Y *.pdb .. - -move /Y *.json .. - -move /Y *.md .. - cd .. -!ELSE - $(CSC) $(CSDEBUG) /r:ogr_csharp.dll /r:osr_csharp.dll /out:ogrinfo.exe apps\ogrinfo.cs - $(CSC) $(CSDEBUG) /r:ogr_csharp.dll /r:osr_csharp.dll /out:createdata.exe apps\createdata.cs - $(CSC) $(CSDEBUG) /r:osr_csharp.dll /out:OSRTransform.exe apps\OSRTransform.cs - $(CSC) $(CSDEBUG) /r:gdal_csharp.dll /r:System.Drawing.dll /out:GDALRead.exe apps\GDALRead.cs - $(CSC) $(CSDEBUG) /r:gdal_csharp.dll /r:System.Drawing.dll /out:GDALReadDirect.exe apps\GDALReadDirect.cs - $(CSC) $(CSDEBUG) /r:gdal_csharp.dll /r:System.Drawing.dll /out:GDALAdjustContrast.exe apps\GDALAdjustContrast.cs - $(CSC) $(CSDEBUG) /r:gdal_csharp.dll /r:System.Drawing.dll /out:GDALDatasetRasterIO.exe apps\GDALDatasetRasterIO.cs - $(CSC) $(CSDEBUG) /r:gdal_csharp.dll /r:System.Drawing.dll /out:GDALDatasetRasterIOEx.exe apps\GDALDatasetRasterIOEx.cs - $(CSC) $(CSDEBUG) /r:gdal_csharp.dll /out:GDALWrite.exe apps\GDALWrite.cs - $(CSC) $(CSDEBUG) /r:gdal_csharp.dll /out:GDALDatasetWrite.exe apps\GDALDatasetWrite.cs - $(CSC) $(CSDEBUG) /r:gdal_csharp.dll /out:GDALColorTable.exe apps\GDALColorTable.cs - $(CSC) $(CSDEBUG) /r:ogr_csharp.dll /out:WKT2WKB.exe apps\WKT2WKB.cs - $(CSC) $(CSDEBUG) /r:ogr_csharp.dll /out:OGRGEOS.exe apps\OGRGEOS.cs - $(CSC) $(CSDEBUG) /r:gdal_csharp.dll /out:ReadXML.exe apps\ReadXML.cs - $(CSC) $(CSDEBUG) /r:gdal_csharp.dll /r:osr_csharp.dll /out:GDALInfo.exe apps\GDALInfo.cs - $(CSC) $(CSDEBUG) /r:gdal_csharp.dll /out:GDALOverviews.exe apps\GDALOverviews.cs - $(CSC) $(CSDEBUG) /r:gdal_csharp.dll /out:GDALCreateCopy.exe apps\GDALCreateCopy.cs - $(CSC) $(CSDEBUG) /r:gdal_csharp.dll /out:GDALGetHistogram.exe apps\GDALGetHistogram.cs - $(CSC) $(CSDEBUG) /r:gdal_csharp.dll /out:VSIMem.exe apps\VSIMem.cs - $(CSC) $(CSDEBUG) /r:gdal_csharp.dll /r:System.Drawing.dll /out:GDALMemDataset.exe apps\GDALMemDataset.cs - $(CSC) $(CSDEBUG) /r:ogr_csharp.dll /r:osr_csharp.dll /out:OGRLayerAlg.exe apps\OGRLayerAlg.cs - $(CSC) $(CSDEBUG) /r:ogr_csharp.dll /r:osr_csharp.dll /out:OGRFeatureEdit.exe apps\OGRFeatureEdit.cs - $(CSC) $(CSDEBUG) /r:gdal_csharp.dll /out:GDALWarp.exe apps\GDALWarp.cs - $(CSC) $(CSDEBUG) /r:osr_csharp.dll /out:GetCRSInfo.exe apps\GetCRSInfo.cs -!ENDIF - -test: -!IFDEF MONO - mono createdata.exe Data pointlayer - mono ogrinfo.exe Data/pointlayer.shp - mono OSRTransform.exe - mono GDALWrite.exe Data/sample.tif - mono GDALDatasetWrite.exe Data/sample1.tif - mono GDALCreateCopy.exe Data/sample.tif Data/sample2.tif - mono GDALOverviews.exe Data/sample.tif NEAREST 2 4 - mono GDALInfo.exe Data/sample.tif - mono GDALInfo.exe ../../autotest/gcore/data/byte.tif -!ELSE - createdata.exe Data pointlayer - ogrinfo.exe Data/pointlayer.shp - OSRTransform.exe - GDALWrite.exe Data/sample.tif - GDALDatasetWrite.exe Data/sample1.tif - GDALCreateCopy.exe Data/sample.tif Data/sample2.tif - GDALReadDirect.exe Data/sample.tif Data/sample.png - GDALOverviews.exe Data/sample.tif NEAREST 2 4 - GDALInfo.exe Data/sample.tif - GDALInfo.exe ../../autotest/gcore/data/byte.tif - ogrlayeralg.exe Intersection Data/pointlayer.shp pointlayer Data/pointlayer.shp pointlayer Data intersectionresult - ogrinfo.exe Data/intersectionresult.shp - gdalwarp.exe Data/testwarp.tif "-of GTiff -t_srs EPSG:32645 -overwrite" "../../autotest/gcore/data/byte.tif" - getcrsinfo.exe "EPSG" 20 - sn -vf osr_csharp.dll - sn -vf ogr_csharp.dll - sn -vf gdal_csharp.dll -!ENDIF - -clean: - cd gdal - $(MAKE) /f makefile.vc clean - cd .. - cd ogr - $(MAKE) /f makefile.vc clean - cd .. - cd const - $(MAKE) /f makefile.vc clean - cd .. - cd osr - $(MAKE) /f makefile.vc clean - cd .. - -del $(GDAL_LIB_NAME) - -del *.obj - -del *.exp - -del *.ilk - -del *.pdb - -del *.tlb - -del *.lib - -del *.mdb - -del *.exe - -del *.manifest - -del *.json - -rd /q /s Data - -del apps\*.csproj - -del *.dll - -del *.pdb - -del *.exe - -del *.json - -rd /q /s apps\obj - -del template.csproj - -del SOS_README.md - -install: - -mkdir $(GDAL_HOME)\csharp - xcopy /Y /R /F *_wrap.dll $(GDAL_HOME)\csharp - xcopy /Y /R /F *_csharp.dll $(GDAL_HOME)\csharp - diff --git a/swig/csharp/ogr/makefile.vc b/swig/csharp/ogr/makefile.vc deleted file mode 100644 index 7043851f5fbd..000000000000 --- a/swig/csharp/ogr/makefile.vc +++ /dev/null @@ -1,19 +0,0 @@ -OBJ = ogr_wrap.obj - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj .. - -clean: - -del *.obj - -del *.cs - -del *.cpp - -del *.csproj - -del *.json - -del *.dll - -del *.pdb - -rd /q /s obj - diff --git a/swig/csharp/osr/makefile.vc b/swig/csharp/osr/makefile.vc deleted file mode 100644 index 57fa3bbc3383..000000000000 --- a/swig/csharp/osr/makefile.vc +++ /dev/null @@ -1,19 +0,0 @@ -OBJ = osr_wrap.obj - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj .. - -clean: - -del *.obj - -del *.cs - -del *.cpp - -del *.csproj - -del *.json - -del *.dll - -del *.pdb - -rd /q /s obj - diff --git a/swig/java/GNUmakefile b/swig/java/GNUmakefile deleted file mode 100644 index 2d4d1bca749c..000000000000 --- a/swig/java/GNUmakefile +++ /dev/null @@ -1,126 +0,0 @@ -include ../../GDALmake.opt -include java.opt -CFLAGS += -DSWIG_NOARRAYS # use for Swig 2.0.4 and earlier - -all: build - -BINDING = java -include ../SWIGmake.base - -SHORT_NAME = $(subst _wrap,,$*) -SWIGARGS += -outdir "org/gdal/$(SHORT_NAME)" -package "org.gdal.$(SHORT_NAME)" - -# Run "make ANDROID=yes" for Android JNI -ifeq ($(ANDROID),yes) -SWIGARGS += -DSWIGANDROID -endif - -EXTRA_DIST = org - -LINK = $(LD_SHARED) -LINK_EXTRAFLAGS = -OBJ_EXT = o -ifeq ($(HAVE_LIBTOOL),yes) -LINK = $(LD) -LINK_EXTRAFLAGS = -rpath $(INST_LIB) -no-undefined -version-info $(LIBGDAL_CURRENT):$(LIBGDAL_REVISION):$(LIBGDAL_AGE) -OBJ_EXT = lo -endif - -makedir: - mkdir -p org/gdal/gdal - mkdir -p org/gdal/gdalconst - mkdir -p org/gdal/ogr - mkdir -p org/gdal/osr - mkdir -p org/gdal/gnm - -JAVA_MODULES = libgdalalljni.$(SO_EXT) -JAVA_OBJECTS = gdalconst_wrap.$(OBJ_EXT) gdal_wrap.$(OBJ_EXT) osr_wrap.$(OBJ_EXT) ogr_wrap.$(OBJ_EXT) gnm_wrap.$(OBJ_EXT) - -clean: - -rm -f ${JAVA_MODULES} - -rm -f *.$(OBJ_EXT) - -rm -f .libs/*.so - -rm -f .libs/*.dylib - -rm -f *.so - -rm -f *.dylib - - ant clean - -veryclean: clean - -rm -f ${WRAPPERS} - -rm -rf ${EXTRA_DIST}/* - -generate: makedir ${WRAPPERS} - -build: generate ${JAVA_OBJECTS} ${JAVA_MODULES} -ifeq ($(HAVE_LIBTOOL),yes) - - if [ -f ".libs/libgdalalljni.so" ] ; then \ - cp .libs/*.so . ; \ - fi - - echo "$(wildcard .libs/*.dylib)" - - if [ -f ".libs/libgdalalljni.dylib" ] ; then \ - cp .libs/*.dylib . ; \ - fi - -endif # HAVE_LIBTOOL=yes - ant - -install: build - if [ -f "libgdalalljni.so" ] ; then \ - for f in *.so; do $(INSTALL_LIB) $$f $(DESTDIR)$(INST_LIB) ; done ; \ - fi - - if [ -f "libgdalalljni.dylib" ] ; then \ - for f in *.dylib; do $(INSTALL_LIB) $$f $(DESTDIR)$(INST_LIB) ; done ; \ - fi - - ant maven ; \ - mkdir -p $(DESTDIR)${datarootdir}/java ; \ - echo $(DESTDIR)${datarootdir}/java ; \ - cp build/maven/* $(DESTDIR)${datarootdir}/java ; \ - - -JAVA_RUN = java -Djava.library.path=. -cp gdal.jar:build/apps - -test: - -rm -rf tmp_test - mkdir tmp_test - cp test_data/byte.tif tmp_test - ${JAVA_RUN} GDALOverviews tmp_test/byte.tif "NEAREST" 2 4 - ${JAVA_RUN} gdalinfo -checksum tmp_test/byte.tif - ${JAVA_RUN} ogr2ogr tmp_test/out.shp test_data/poly.shp -progress -overwrite - ${JAVA_RUN} ogrinfo -ro -al tmp_test/out.shp - ${JAVA_RUN} ogrinfo -ro -al tmp_test/out.shp -fid 1 - ${JAVA_RUN} ogr2ogr_new tmp_test/out2.shp test_data/poly.shp -progress -overwrite - ${JAVA_RUN} ogr2ogr_new tmp_test/out2.shp test_data/poly.shp -append - ${JAVA_RUN} ogrinfo -ro -al tmp_test/out2.shp - ${JAVA_RUN} OSRTransform - ${JAVA_RUN} gdalmajorobject - ${JAVA_RUN} GDALTestIO - ${JAVA_RUN} GDALContour -i 1 tmp_test/byte.tif tmp_test/contour.shp - ${JAVA_RUN} testgetpoints - ${JAVA_RUN} ogrtindex tmp_test/contour_index.shp tmp_test/contour.shp - ${JAVA_RUN} OSRTest - -ifdef INCLUDE_GDAL_LIB - LIB_GDAL=$(GDAL_LIB) -endif - -$(JAVA_MODULES): $(JAVA_OBJECTS) - $(LINK) $(LDFLAGS) $^ $(LIB_GDAL) $(CONFIG_LIBS) -o $@ $(LINK_EXTRAFLAGS) - -# Do not remove -fno-strict-aliasing while SWIG generates weird code in upcast methods -# See http://trac.osgeo.org/gdal/changeset/16006 -%.$(OBJ_EXT): %.cpp - $(CXX) -fno-strict-aliasing $(GDAL_INCLUDE) $(CFLAGS) $(CPPFLAGS) $(JAVA_INCLUDE) -c $< - -%.$(OBJ_EXT): %.cxx - $(CXX) -fno-strict-aliasing $(GDAL_INCLUDE) $(CFLAGS) $(CPPFLAGS) $(JAVA_INCLUDE) -c $< - -%.$(OBJ_EXT): %.c - $(CC) -fno-strict-aliasing $(GDAL_INCLUDE) $(CFLAGS) $(CPPFLAGS) $(JAVA_INCLUDE) -c $< - -.PHONY: all makedir clean veryclean generate build install test diff --git a/swig/java/const/makefile.vc b/swig/java/const/makefile.vc deleted file mode 100644 index 954d382286e4..000000000000 --- a/swig/java/const/makefile.vc +++ /dev/null @@ -1,18 +0,0 @@ -OBJ = gdalconst_wrap.obj - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt -CFLAGS=$(CFLAGS) -DSWIG_NOARRAYS # needed for Swig 2.0.4 and earlier - -default: $(OBJ) - xcopy /D /Y *.obj .. - -clean: - -del *.obj - -del *.cs - -del *.cpp - -.cpp.obj: - $(CC) $(CFLAGS) $(JAVA_INCLUDE) /c $*.cpp - diff --git a/swig/java/gdal/makefile.vc b/swig/java/gdal/makefile.vc deleted file mode 100644 index c17b5087247e..000000000000 --- a/swig/java/gdal/makefile.vc +++ /dev/null @@ -1,19 +0,0 @@ -OBJ = gdal_wrap.obj - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt -CFLAGS=$(CFLAGS) -DSWIG_NOARRAYS # needed for Swig 2.0.4 and earlier - -default: $(OBJ) - xcopy /D /Y *.obj .. - -clean: - -del *.obj - -del *.cs - -del *.cpp - -.cpp.obj: - $(CC) $(CFLAGS) $(JAVA_INCLUDE) /c $*.cpp - - diff --git a/swig/java/gnm/makefile.vc b/swig/java/gnm/makefile.vc deleted file mode 100644 index ca767ef53e6e..000000000000 --- a/swig/java/gnm/makefile.vc +++ /dev/null @@ -1,17 +0,0 @@ -OBJ = gnm_wrap.obj - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt -CFLAGS=$(CFLAGS) -DSWIG_NOARRAYS # needed for Swig 2.0.4 and earlier - -default: $(OBJ) - xcopy /D /Y *.obj .. - -clean: - -del *.obj - -del *.cs - -del *.cpp - -.cpp.obj: - $(CC) $(CFLAGS) $(JAVA_INCLUDE) /c $*.cpp diff --git a/swig/java/java.opt b/swig/java/java.opt deleted file mode 100644 index 6aba3e6c11d0..000000000000 --- a/swig/java/java.opt +++ /dev/null @@ -1,12 +0,0 @@ -# -# Java Stuff -#JAVA_HOME = "C:\Program Files\Java\jdk1.6.0_16" -#JAVA_HOME = /usr/lib/jvm/java-6-openjdk/ -#JAVA_HOME = /usr/lib/jvm/java-7-openjdk-amd64/ -JAVADOC=$(JAVA_HOME)/bin/javadoc -JAVAC=$(JAVA_HOME)/bin/javac -JAVA=$(JAVA_HOME)/bin/java -JAR=$(JAVA_HOME)/bin/jar -JAVA_INCLUDE=-I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux - - diff --git a/swig/java/makefile.vc b/swig/java/makefile.vc deleted file mode 100644 index dd7cba488638..000000000000 --- a/swig/java/makefile.vc +++ /dev/null @@ -1,94 +0,0 @@ -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -!IF "$(DLLBUILD)" == "1" -GDALLIB = $(GDAL_ROOT)\$(GDAL_LIB_NAME) -!ELSE -GDALLIB = $(GDAL_ROOT)\$(GDAL_LIB_NAME) $(EXTERNAL_LIBS) -!ENDIF - -JAVA_RUN = $(JAVA) -Djava.library.path=. -cp gdal.jar;build\apps - -OBJ = gdal_wrap.obj gdalconst_wrap.obj ogr_wrap.obj osr_wrap.obj gnm_wrap.obj - -all: jniall - set JAVA_HOME="$(JAVA_HOME)" - $(ANT_HOME)\bin\ant - -install: - -mkdir $(GDAL_HOME)\java\jar - -mkdir $(GDAL_HOME)\java\src - -mkdir $(GDAL_HOME)\java\src\org - -mkdir $(GDAL_HOME)\java\src\apps - $(INSTALL) *.dll $(GDAL_HOME)\bin - $(INSTALL) *.jar $(GDAL_HOME)\java\jar - $(INSTALL) *.java $(GDAL_HOME)\java\src - $(INSTALL) /e org "$(GDAL_HOME)\java\src\org\" - $(INSTALL) /e apps "$(GDAL_HOME)\java\src\apps\" - -jniall: - cd ogr - $(MAKE) /f makefile.vc - cd .. - cd gnm - $(MAKE) /f makefile.vc - cd .. - cd gdal - $(MAKE) /f makefile.vc - cd .. - cd const - $(MAKE) /f makefile.vc - cd .. - cd osr - $(MAKE) /f makefile.vc - cd .. - link $(OBJ) $(GDALLIB) /out:gdalalljni.dll /DLL - if exist gdaljniall.dll.manifest mt -manifest gdaljniall.dll.manifest -outputresource:gdalalljni.dll;2 - -test: - if exist tmp_test rmdir /s /q tmp_test - mkdir tmp_test - copy test_data\byte.tif tmp_test - $(JAVA_RUN) GDALOverviews tmp_test/byte.tif "NEAREST" 2 4 - $(JAVA_RUN) gdalinfo -checksum tmp_test/byte.tif - $(JAVA_RUN) ogr2ogr tmp_test/out.shp test_data/poly.shp -progress -overwrite - $(JAVA_RUN) ogrinfo -ro -al tmp_test/out.shp - $(JAVA_RUN) OSRTransform - $(JAVA_RUN) gdalmajorobject - $(JAVA_RUN) GDALTestIO - $(JAVA_RUN) GDALContour -i 1 tmp_test/byte.tif tmp_test/contour.shp - $(JAVA_RUN) testgetpoints - $(JAVA_RUN) ogrtindex tmp_test/contour_index.shp tmp_test/contour.shp - $(JAVA_RUN) OSRTest - -clean: - if exist org rmdir /s /q org - if exist build rmdir /s /q build - cd gdal - $(MAKE) /f makefile.vc clean - cd .. - cd ogr - $(MAKE) /f makefile.vc clean - cd .. - cd const - $(MAKE) /f makefile.vc clean - cd .. - cd osr - $(MAKE) /f makefile.vc clean - cd .. - cd gnm - $(MAKE) /f makefile.vc clean - cd .. - -del gdal.jar - -del *.dll - -del *.obj - -del *.exp - -del *.ilk - -del *.pdb - -del *.tlb - -del *.snk - -del *.cs - -del *.cpp - -del *.lib - -del *.dll.manifest diff --git a/swig/java/ogr/makefile.vc b/swig/java/ogr/makefile.vc deleted file mode 100644 index e64d350ae9a6..000000000000 --- a/swig/java/ogr/makefile.vc +++ /dev/null @@ -1,17 +0,0 @@ -OBJ = ogr_wrap.obj - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt -CFLAGS=$(CFLAGS) -DSWIG_NOARRAYS # needed for Swig 2.0.4 and earlier - -default: $(OBJ) - xcopy /D /Y *.obj .. - -clean: - -del *.obj - -del *.cs - -del *.cpp - -.cpp.obj: - $(CC) $(CFLAGS) $(JAVA_INCLUDE) /c $*.cpp diff --git a/swig/java/osr/makefile.vc b/swig/java/osr/makefile.vc deleted file mode 100644 index 02c344d40942..000000000000 --- a/swig/java/osr/makefile.vc +++ /dev/null @@ -1,17 +0,0 @@ -OBJ = osr_wrap.obj - -GDAL_ROOT = ..\..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt -CFLAGS=$(CFLAGS) -DSWIG_NOARRAYS # needed for Swig 2.0.4 and earlier - -default: $(OBJ) - xcopy /D /Y *.obj .. - -clean: - -del *.obj - -del *.cs - -del *.cpp - -.cpp.obj: - $(CC) $(CFLAGS) $(JAVA_INCLUDE) /c $*.cpp diff --git a/swig/makefile.vc b/swig/makefile.vc deleted file mode 100644 index f3d35b110856..000000000000 --- a/swig/makefile.vc +++ /dev/null @@ -1,102 +0,0 @@ - -GDAL_ROOT = ../ -!INCLUDE $(GDAL_ROOT)\nmake.opt - -SCRIPT_CONFIG = .\setup.ini - -gdalvars: - -del $(SCRIPT_CONFIG) - echo $(GDAL_HOME) > $(SCRIPT_CONFIG) - findstr /c:"define GDAL_RELEASE_NAME " ..\gcore\gdal_version.h >> $(SCRIPT_CONFIG) -#echo $(EXTERNAL_LIBS) >> $(SCRIPT_CONFIG) - -python: gdalvars - cd python - -del setup_vars.ini - echo 'GNM_ENABLED=$(INCLUDE_GNM_FRMTS)' > setup_vars.ini - $(SWIG) -python -threads -o extensions/gdalconst_wrap.c -outdir osgeo ..\include\gdalconst.i - $(SWIG) -c++ -python -threads -I../include/python -I../include/python/docs -o extensions/gdal_wrap.cpp -outdir osgeo ..\include\gdal.i - $(SWIG) -c++ -python -threads -I../include/python -I../include/python/docs -o extensions/osr_wrap.cpp -outdir osgeo ..\include\osr.i - $(SWIG) -c++ -python -threads -I../include/python -I../include/python/docs -o extensions/ogr_wrap.cpp -outdir osgeo ..\include\ogr.i - $(SWIG) -c++ -python -threads -I../include/python -I../include/python/docs -o extensions/gnm_wrap.cpp -outdir osgeo ..\include\gnm.i - $(SWIG) -c++ -python -threads -I../include/python -I../include/python/docs -o extensions/gdal_array_wrap.cpp -outdir osgeo ..\include\gdal_array.i - $(PYDIR)\$(PYEXEC) setup.py build - cd .. - -python_install: python - cd python - if not exist $(GDAL_HOME)\python mkdir $(GDAL_HOME)\python\Lib\site-packages - if not exist $(GDAL_HOME)\python\script mkdir $(GDAL_HOME)\python\script - set PYTHONPATH=$(GDAL_HOME)\python\Lib\site-packages - $(PYDIR)\$(PYEXEC) setup.py install --prefix $(GDAL_HOME)\python - cd .. - -#d:\Python\debug\Python-2.4\PCbuild\python_d.exe setup.py build --debug - -csharp: gdalvars - cd csharp - $(MAKE) /f makefile.vc interface - $(MAKE) /f makefile.vc - cd .. - -csharp_install: csharp - cd csharp - $(MAKE) /f makefile.vc install - cd .. - -java: gdalvars - cd java - if not exist org\gdal\gdal mkdir org\gdal\gdal - cd gdal - $(SWIG) -java -c++ -package org.gdal.gdal -outdir ../org/gdal/gdal -I../../include/java -o gdal_wrap.cpp ../../../include/gdal.i - cd .. - cd org\gdal - if not exist ogr mkdir ogr - cd ../../ - cd ogr - $(SWIG) -java -c++ -package org.gdal.ogr -outdir ../org/gdal/ogr -I../../include/java -o ogr_wrap.cpp ../../../include/ogr.i - cd .. - cd org\gdal - if not exist osr mkdir osr - cd ../../ - cd osr - $(SWIG) -java -c++ -package org.gdal.osr -outdir ../org/gdal/osr -I../../include/java -o osr_wrap.cpp ../../../include/osr.i - cd .. - cd org\gdal - if not exist gdalconst mkdir gdalconst - cd ../../ - cd const - $(SWIG) -java -c++ -package org.gdal.gdalconst -outdir ../org/gdal/gdalconst -I../../include/java -o gdalconst_wrap.cpp ../../../include/gdalconst.i - cd .. - cd org\gdal - if not exist gnm mkdir gnm - cd ../../ - cd gnm - $(SWIG) -java -c++ -package org.gdal.gnm -outdir ../org/gdal/gnm -I../../include/java -o gnm_wrap.cpp ../../../include/gnm.i - cd .. - $(MAKE) /f makefile.vc - cd .. - - -java_install: java - cd java \ - && $(MAKE) /f makefile.vc install \ - && cd ../ \ - || exit 1 - cd .. - -test: gdalvars - cd $(GDAL_HOME)\..\gdalautotest - $(PYDIR)/$(PYEXEC) -m pytest -vv - -clean: - -del setup.ini - cd csharp - $(MAKE) /f makefile.vc clean - cd .. - cd python - if exist build\nul rmdir /S /Q build - cd .. - cd java - $(MAKE) /f makefile.vc clean - cd .. diff --git a/swig/python/GNUmakefile b/swig/python/GNUmakefile deleted file mode 100644 index 28d9b881cf3d..000000000000 --- a/swig/python/GNUmakefile +++ /dev/null @@ -1,179 +0,0 @@ - - -include ../../GDALmake.opt - -ifndef PYTHON - PYTHON=python -endif - -all: build - -BINDING = python -PACKAGE_DIR=osgeo -SWIGOUTPUTDIR=extensions/ - -include ../SWIGmake.base - -PY_COMMANDS = epsg_tr.py gdalchksum.py gdal2xyz.py gcps2wld.py \ - gdalimport.py gdal_merge.py pct2rgb.py rgb2pct.py \ - gcps2vec.py -PY_MODULES = ${PACKAGE_DIR}/gdal.py ${PACKAGE_DIR}/ogr.py ${PACKAGE_DIR}/osr.py ${PACKAGE_DIR}/gdalconst.py ${PACKAGE_DIR}/gdal_array.py ${PACKAGE_DIR}/gnm.py - -clean: - -rm -f ${PACKAGE_DIR}/*.pyc - -rm -rf build - -rm -f *.pyc - -rm -rf *.egg-info - -rm -f *.so ./osgeo/*.so - -rm -rf dist - -SWIGARGS += -relativeimport -threads -SWIGARGS += -outdir "${PACKAGE_DIR}" - - -veryclean: clean - -rm -f .generated_files_up_to_date - -rm -f ${WRAPPERS} ${PY_MODULES} - -rm -f $(SWIGOUTPUTDIR)gdal_wrap.cpp - -rm -f $(SWIGOUTPUTDIR)gdalconst_wrap.c - -rm -f $(SWIGOUTPUTDIR)ogr_wrap.cpp - -rm -f $(SWIGOUTPUTDIR)osr_wrap.cpp - -rm -f $(SWIGOUTPUTDIR)gdal_array_wrap.cpp - -rm -f $(SWIGOUTPUTDIR)gnm_wrap.cpp - -$(SWIGOUTPUTDIR)gdal_array_wrap.cpp: ../include/gdal_array.i ../include/python/typemaps_python.i - $(SWIG) $(SWIGARGS) $(SWIGDEFINES) -I$(GDAL_ROOT) -c++ -$(BINDING) -o $@ ../include/gdal_array.i - -# Following is to prevent Coverity Scan to warn about Dereference before null check (REVERSE_INULL) -SED_COMMANDS = \ - -e 's/if (!PyTuple_Check(args)) SWIG_fail;/if (args == NULL || !PyTuple_Check(args)) SWIG_fail;/' \ - -e 's/argc = args ? (int)PyObject_Length(args) : 0/argc = (int)PyObject_Length(args)/' \ - -e 's/if (SWIG_IsTmpObj(res\([1-9]\)))/if (ReturnSame(SWIG_IsTmpObj(res\1)))/' \ - -e 's/if( alloc\([1-9]\) == SWIG_NEWOBJ )/if (ReturnSame(alloc\1) == SWIG_NEWOBJ )/' \ - -e 's/strncpy(buff, "swig_ptr: ", 10)/memcpy(buff, "swig_ptr: ", 10)/' -# Unused assigned variable -SED_COMMANDS += -e 's/module_head = \&swig_module;/\/\*module_head = \&swig_module;\*\//' -# SWIG defect fixed per https://github.com/swig/swig/commit/b0e29fbdf31bb94b11cb8a7cc830b4a76467afa3#diff-ba23eb3671d250e6a62261f19f653dd2R93 -SED_COMMANDS += -e 's/obj = PyUnicode_AsUTF8String(obj);/obj = PyUnicode_AsUTF8String(obj); if (!obj) return SWIG_TypeError;/' - -.generated_files_up_to_date: ${WRAPPERS} $(SWIGOUTPUTDIR)gdal_array_wrap.cpp - rm -f .generated_files_up_to_date - for i in gdal_wrap.cpp gdalconst_wrap.c ogr_wrap.cpp osr_wrap.cpp gdal_array_wrap.cpp gnm_wrap.cpp; do \ - if test -f $(SWIGOUTPUTDIR)$$i; then \ - if ! grep "#define POST_PROCESSING_APPLIED" $(SWIGOUTPUTDIR)$$i>/dev/null; then \ - sed $(SED_COMMANDS) $(SWIGOUTPUTDIR)$$i > $(SWIGOUTPUTDIR)$$i.tmp; \ - echo "#define POST_PROCESSING_APPLIED" >> $(SWIGOUTPUTDIR)$$i.tmp; \ - mv -f $(SWIGOUTPUTDIR)$$i.tmp $(SWIGOUTPUTDIR)$$i; \ - \ - if test $$i = "gdal_wrap.cpp" ; then \ - sed \ - -e 's/result = (CPLErr)\(.*\);/CPL_IGNORE_RET_VAL(result = (CPLErr)\1);/' \ - $(SWIGOUTPUTDIR)$$i > $(SWIGOUTPUTDIR)$$i.tmp; \ - mv -f $(SWIGOUTPUTDIR)$$i.tmp $(SWIGOUTPUTDIR)$$i; \ - fi; \ - fi; \ - fi; \ - done -ifeq ($(shell sed --version | grep GNU >/dev/null; echo $$?), 0) - # Only GNU sed accepts inserting newlines with \n. This is just to please Coverity, so no need to find a workaround - for i in gdal_wrap.cpp gdalconst_wrap.c ogr_wrap.cpp osr_wrap.cpp gnm_wrap.cpp; do \ - if test -f $(SWIGOUTPUTDIR)$$i; then \ - if ! grep "define SED_HACKS" $(SWIGOUTPUTDIR)$$i>/dev/null; then \ - sed \ - -e 's/PyObject \*resultobj = 0;/PyObject \*resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;/' \ - -e 's/\#define SWIGPYTHON/\#define SWIGPYTHON\n\#define SED_HACKS/' \ - -e 's/return resultobj;/if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }\n return resultobj;/' \ - $(SWIGOUTPUTDIR)$$i > $(SWIGOUTPUTDIR)$$i.tmp; \ - mv -f $(SWIGOUTPUTDIR)$$i.tmp $(SWIGOUTPUTDIR)$$i; \ - fi; \ - fi; \ - done; -endif - echo "done" > .generated_files_up_to_date - -generate: veryclean - $(MAKE) .generated_files_up_to_date - -build: .generated_files_up_to_date - rm -f setup_vars.ini - echo 'GNM_ENABLED=$(GNM_ENABLED)' >> setup_vars.ini - $(PYTHON) setup.py build - -egg: - $(PYTHON) setup.py bdist_egg - -site_package_dir=$(shell $(PYTHON) -c "from trimmedsysconfig import get_python_lib;print(get_python_lib(prefix=\"$(PREFIX)\"))") - -ifeq ($(PY_HAVE_SETUPTOOLS),1) - setup_opts=--single-version-externally-managed --record=record.txt -endif - -ifdef DESTDIR - setup_opts+=--root=$(DESTDIR) -endif - -ifdef PREFIX - setup_opts+=--prefix=$(PREFIX) -else ifdef prefix - ifeq ($(shell uname),Darwin) - STD_UNIX_LAYOUT=$(shell $(PYTHON) -c "from __future__ import print_function;import sys;print(\"FALSE\" if \"framework\" in sys.prefix.lower() else \"TRUE\")") - ifeq ($(STD_UNIX_LAYOUT),"TRUE") - setup_opts+=--prefix=$(prefix) - else - ifdef PYTHON_INSTALL_LIB - setup_opts+=--install-lib=$(PYTHON_INSTALL_LIB) - endif - endif - else - setup_opts+=--prefix=$(prefix) - endif -endif - -# setuptools 60.0 defaults to SETUPTOOLS_USE_DISTUTILS=local, and thus -# Debian's specific --install-layout distutils option cannot be used -SETUPTOOLS_USE_DISTUTILS_OPT= -ifdef INSTALL_LAYOUT - setup_opts+=--install-layout=$(INSTALL_LAYOUT) - SETUPTOOLS_USE_DISTUTILS_OPT=SETUPTOOLS_USE_DISTUTILS=stdlib -else - ifneq ($(shell echo $(site_package_dir) | grep dist-packages),) - setup_opts+=--install-layout=deb - SETUPTOOLS_USE_DISTUTILS_OPT=SETUPTOOLS_USE_DISTUTILS=stdlib - endif -endif - -install: - @if [ ! -d $(site_package_dir) ]; then \ - mkdir -p $(DESTDIR)$(site_package_dir); \ - echo "----------------------------------------------------------------------";\ - echo ""; \ - echo "The GDAL python package has been installed in $(site_package_dir)"; \ - echo "Please ensure to add $(site_package_dir) to your PYTHONPATH"; \ - echo ""; \ - echo "----------------------------------------------------------------------";\ - fi - env PYTHONPATH=$(site_package_dir)$${PYTHONPATH:+:$$PYTHONPATH} \ - ${SETUPTOOLS_USE_DISTUTILS_OPT} \ - $(PYTHON) setup.py install ${setup_opts} - -# see swig/include/python/docs/README to refresh the ../include/python/docs/ files -docs: - $(PYTHON) ../include/python/docs/doxy2swig.py ../../xml/ogrlayer_8cpp.xml ../include/python/docs/ogr_layer_docs.i OGRLayerShadow OGR_L_ - - $(PYTHON) ../include/python/docs/doxy2swig.py ../../xml/ogrgeometry_8cpp.xml ../include/python/docs/ogr_geometry_docs.i OGRGeometryShadow OGR_G_ - - $(PYTHON) ../include/python/docs/doxy2swig.py ../../xml/ogrdatasource_8cpp.xml ../include/python/docs/ogr_datasource_docs.i OGRDataSourceShadow OGR_DS_ - - - $(PYTHON) ../include/python/docs/doxy2swig.py ../../xml/ogrsfdriver_8cpp.xml ../include/python/docs/ogr_driver_docs.i OGRDriverShadow OGR_Dr_ - - $(PYTHON) ../include/python/docs/doxy2swig.py ../../xml/ogrfeature_8cpp.xml ../include/python/docs/ogr_feature_docs.i OGRFeatureShadow OGR_F_ - - $(PYTHON) ../include/python/docs/doxy2swig.py ../../xml/ogrfeaturedefn_8cpp.xml ../include/python/docs/ogr_featuredef_docs.i OGRFeatureDefnShadow OGR_FD_ - - $(PYTHON) ../include/python/docs/doxy2swig.py ../../xml/ogrfielddefn_8cpp.xml ../include/python/docs/ogr_fielddef_docs.i OGRFieldDefnShadow OGR_Fld_ - -epydoc: generate - epydoc --config epydoc.conf - -.PHONY: all clean veryclean generate build egg install docs epydoc diff --git a/swig/python/fallback_build.bat b/swig/python/fallback_build.bat deleted file mode 100644 index 19dc124c652d..000000000000 --- a/swig/python/fallback_build.bat +++ /dev/null @@ -1,35 +0,0 @@ -rem -rem This is a fallback to build the python extensions with Python 2.5 and -rem MSVC 7.1 on windows when the setup.py magic does not work. It assumes -rem that "python setup.py build" has already created the build/lib... directory -rem and copied in the appropriate .py files. -rem - -set PYTHONHOME=C:\OSGeo4W\apps\Python25 -set OUTDIR=build\lib.win32-2.5\osgeo - -set CLARGS=/c /nologo /Ox /MD /EHsc /DNDEBUG -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../apps/ -I%PYTHONHOME%\include -I%PYTHONHOME%\PC -I%PYTHONHOME%\lib\site-packages\numpy\core\include - -cl.exe %CLARGS% extensions\gdal_wrap.cpp -cl.exe %CLARGS% extensions\osr_wrap.cpp -cl.exe %CLARGS% extensions\ogr_wrap.cpp -cl.exe %CLARGS% extensions\gdalconst_wrap.c -cl.exe %CLARGS% extensions\gdal_array_wrap.cpp - -set LINKOPTS=/DLL /nologo /INCREMENTAL:NO /LIBPATH:../../ /LIBPATH:%PYTHONHOME%\libs /LIBPATH:%PYTHONHOME%\PCBuild gdal_i.lib - -link.exe %LINKOPTS% /EXPORT:init_gdal gdal_wrap.obj /OUT:%OUTDIR%\_gdal.pyd -if exist %OUTDIR%\_gdal.pyd.manifest mt -manifest %OUTDIR%\_gdal.pyd.manifest -outputresource:%OUTDIR%\_gdal.pyd;2 - -link.exe %LINKOPTS% /EXPORT:init_osr osr_wrap.obj /OUT:%OUTDIR%\_osr.pyd -if exist %OUTDIR%\_osr.pyd.manifest mt -manifest %OUTDIR%\_osr.pyd.manifest -outputresource:%OUTDIR%\_osr.pyd;2 - -link.exe %LINKOPTS% /EXPORT:init_ogr ogr_wrap.obj /OUT:%OUTDIR%\_ogr.pyd -if exist %OUTDIR%\_ogr.pyd.manifest mt -manifest %OUTDIR%\_ogr.pyd.manifest -outputresource:%OUTDIR%\_ogr.pyd;2 - -link.exe %LINKOPTS% /EXPORT:init_gdalconst gdalconst_wrap.obj /OUT:%OUTDIR%\_gdalconst.pyd -if exist %OUTDIR%\_gdalconst.pyd.manifest mt -manifest %OUTDIR%\_gdalconst.pyd.manifest -outputresource:%OUTDIR%\_gdalconst.pyd;2 - -link.exe %LINKOPTS% /EXPORT:init_gdal_array gdal_array_wrap.obj /OUT:%OUTDIR%\_gdal_array.pyd -if exist %OUTDIR%\_gdal_array.pyd.manifest mt -manifest %OUTDIR%\_gdal_array.pyd.manifest -outputresource:%OUTDIR%\_gdal_array.pyd;2 - diff --git a/swig/python/fallback_build_mingw32_under_unix.sh b/swig/python/fallback_build_mingw32_under_unix.sh deleted file mode 100755 index 8e4d52277089..000000000000 --- a/swig/python/fallback_build_mingw32_under_unix.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh - -# This is a script to build the python extensions with Python 2.7 and -# a mingw32 cross-compiler under Linux/Unix. It needs wine to run native python. - -# You may need to customize the following versions to match your cross-compiler -# name and your native python installation -if test "x${CXX}" = "x"; then - CXX=i586-mingw32msvc-g++ -else - CXX="${CXX}" -fi -PYTHONHOME=$HOME/.wine/drive_c/Python27 -PYTHONLIB=python27 - -if test -d "${PYTHONHOME}/Lib/site-packages/numpy/core/include"; then - echo "NumPy found !" - HAS_NUMPY=yes -else - HAS_NUMPY=no -fi - -INCFLAGS="-I${PYTHONHOME}/include -I../../port -I../../generated_headers -I../../gcore -I../../alg -I../../ogr/ -I../../apps/" -LINKFLAGS="-L../../.libs -lgdal -L${PYTHONHOME}/libs -l${PYTHONLIB}" -CFLAGS="-O2 -D__MSVCRT_VERSION__=0x0601" - -# Run native python -wine "$PYTHONHOME/python" setup.py build - -# Determine OUTDIR -if test -d build/lib.win32-2.7; then - OUTDIR=build/lib.win32-2.7/osgeo -elif test -d build/lib.win-amd64-2.7; then - OUTDIR=build/lib.win-amd64-2.7/osgeo - CFLAGS="-DMS_WIN64 $CFLAGS" -else - echo "Cannot determine OUTDIR" - exit 1 -fi - -# Build extensions - -# Horrible hack because if is included after Python.h we get weird errors -echo '#include ' > extensions/gdal_wrap.temp.cpp -cat extensions/gdal_wrap.cpp >> extensions/gdal_wrap.temp.cpp -${CXX} ${CFLAGS} -std=c++11 extensions/gdal_wrap.temp.cpp -shared -o ${OUTDIR}/_gdal.pyd ${INCFLAGS} ${LINKFLAGS} -${CXX} ${CFLAGS} -std=c++11 extensions/ogr_wrap.cpp -shared -o ${OUTDIR}/_ogr.pyd ${INCFLAGS} ${LINKFLAGS} -${CXX} ${CFLAGS} -std=c++11 extensions/osr_wrap.cpp -shared -o ${OUTDIR}/_osr.pyd ${INCFLAGS} ${LINKFLAGS} -${CXX} ${CFLAGS} -std=c++11 extensions/gdalconst_wrap.c -shared -o ${OUTDIR}/_gdalconst.pyd ${INCFLAGS} ${LINKFLAGS} - -if test x${HAS_NUMPY} = "xyes"; then - ${CXX} ${CFLAGS} extensions/gdal_array_wrap.cpp -shared -o ${OUTDIR}/_gdal_array.pyd ${INCFLAGS} -I${PYTHONHOME}/Lib/site-packages/numpy/core/include ${LINKFLAGS} -fi diff --git a/swig/python/fallback_build_mingw32_under_unix_py37.sh b/swig/python/fallback_build_mingw32_under_unix_py37.sh index 4658e65f6602..7553c30f74eb 100755 --- a/swig/python/fallback_build_mingw32_under_unix_py37.sh +++ b/swig/python/fallback_build_mingw32_under_unix_py37.sh @@ -22,7 +22,7 @@ LINKFLAGS="-L../../build -lgdal -L${PYTHONHOME}/libs -l${PYTHONLIB}" CFLAGS="-O2 -D__MSVCRT_VERSION__=0x0601" # Run native python -wine "$PYTHONHOME/python" setup.py build +wine "$PYTHONHOME/python" setup_fallback_mingw.py build # Determine OUTDIR if test -d build/lib.win32-3.7; then diff --git a/swig/python/setup.cfg b/swig/python/setup.cfg deleted file mode 100644 index 49f548f9e909..000000000000 --- a/swig/python/setup.cfg +++ /dev/null @@ -1,10 +0,0 @@ -# You can override default build options here -[flake8] -max-line-length=100 - -[build_ext] -#include_dirs = ../../port:../../gcore:../../alg:../../ogr/ -#library_dirs = ../../.libs:../../ -#libraries = gdal -gdal_config=../../apps/gdal-config - diff --git a/swig/python/setup.py b/swig/python/setup_fallback_mingw.py similarity index 100% rename from swig/python/setup.py rename to swig/python/setup_fallback_mingw.py diff --git a/third_party/GNUmakefile b/third_party/GNUmakefile deleted file mode 100644 index 25f60f8d723d..000000000000 --- a/third_party/GNUmakefile +++ /dev/null @@ -1,18 +0,0 @@ -include ../GDALmake.opt - -SUBDIRS := - -ifeq ($(HAVE_LERC),internal) -SUBDIRS += LercLib -endif - -%-install-obj: - $(MAKE) -C $* install-obj - -default: $(foreach d,$(SUBDIRS),$(d)-install-obj) - - -clean: $(foreach d,$(SUBDIRS),$(d)-clean) - rm -f o/*.o - $(RM) o/*.lo - diff --git a/third_party/LercLib/GNUmakefile b/third_party/LercLib/GNUmakefile deleted file mode 100644 index 559462f2c4b8..000000000000 --- a/third_party/LercLib/GNUmakefile +++ /dev/null @@ -1,17 +0,0 @@ -include ../../GDALmake.opt - -OBJ = \ - BitMask.o \ - BitStuffer2.o \ - Huffman.o \ - Lerc2.o \ - Lerc_c_api_impl.o \ - Lerc.o \ - RLE.o \ - -default: $(OBJ:.o=.$(OBJ_EXT)) - -install-obj: $(O_OBJ:.o=.$(OBJ_EXT)) - -clean: - rm -f *.o diff --git a/third_party/LercLib/makefile.vc b/third_party/LercLib/makefile.vc deleted file mode 100644 index 27d0885591c9..000000000000 --- a/third_party/LercLib/makefile.vc +++ /dev/null @@ -1,10 +0,0 @@ -OBJ = BitMask.obj BitStuffer2.obj Huffman.obj Lerc2.obj Lerc_c_api_impl.obj Lerc.obj RLE.obj -GDAL_ROOT = ..\.. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -default: $(OBJ) - xcopy /D /Y *.obj ..\o - -clean: - -del *.obj diff --git a/third_party/makefile.vc b/third_party/makefile.vc deleted file mode 100644 index 6604aa5e7992..000000000000 --- a/third_party/makefile.vc +++ /dev/null @@ -1,27 +0,0 @@ -GDAL_ROOT = .. - -!INCLUDE $(GDAL_ROOT)\nmake.opt - -!IF "$(HAVE_LERC)" == "internal" -LERCLIB_DIR = LercLib -!ENDIF - -DIRLIST = $(LERCLIB_DIR) - -default: - for %d in ( $(DIRLIST) ) do \ - cd %d \ - && $(MAKE) /f makefile.vc \ - && cd .. \ - || exit 1 - - lib /out:third_party.lib o\*.obj - -clean: - -del third_party.lib - -del o\*.obj - for %d in ( $(DIRLIST) ) do \ - cd %d \ - && $(MAKE) /f makefile.vc clean \ - && cd .. \ - || exit 1