feat:replace boost library with C++11 std library
This commit is contained in:
+41
@@ -0,0 +1,41 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This file illustrates how to generate a useful TAGS file via etags
|
||||
# for emacs. This should be invoked from the top source directory i.e.:
|
||||
# > build/MakeEtags
|
||||
# and will create a TAGS file in the top source directory.
|
||||
|
||||
# This script falls under the Apache License.
|
||||
# See http://www.apache.org/docs/LICENSE
|
||||
|
||||
# Once you have created ./TAGS in emacs you'll need to setup
|
||||
# tag-table-alist with an entry to assure it finds the single ./TAGS
|
||||
# file from the many source directories. Something along these lines:
|
||||
# (setq tag-table-alist
|
||||
# '(("/home/me/work/apr-x.y/" . "/home/me/work/apr-x.y/")
|
||||
# ("/home/me/work/apr-util-x.y/" . "/home/me/work/apr-util-x.y/")
|
||||
# ("/home/me/work/httpd-x.y/" . "/home/me/work/httpd-x.y/")
|
||||
# ))
|
||||
|
||||
# This requires a special version of etags, i.e. the
|
||||
# one called "Exuberant ctags" available at:
|
||||
# http://ctags.sourceforge.net/
|
||||
# Once that is setup you'll need to point to the
|
||||
# executable here:
|
||||
|
||||
etags=${ETAGS-etags}
|
||||
|
||||
# Exuberant etags is necessary since it can ignore some defined symbols
|
||||
# that obscure the function signatures.
|
||||
|
||||
ignore=AP_DECLARE,AP_DECLARE_NONSTD,__declspec,APR_DECLARE,APR_DECLARE_NONSTD
|
||||
ignore=$ignore,APU_DECLARE,APU_DECLARE_NONSTD
|
||||
|
||||
# Create an etags file at the root of the source
|
||||
# tree, then create symbol links to it from each
|
||||
# directory in the source tree. By passing etags
|
||||
# absolute pathnames we get a tag file that is
|
||||
# NOT portable when we move the directory tree.
|
||||
|
||||
find . -name '*.[ch]' -print | $etags -I "$ignore" -L -
|
||||
|
||||
@@ -0,0 +1,365 @@
|
||||
#
|
||||
# Setup needed Tools and Libraries
|
||||
#
|
||||
|
||||
ifeq "$(wildcard $(APR_WORK)/build/NWGNUcustom.inc)" "$(APR_WORK)/build/NWGNUcustom.inc"
|
||||
include $(APR_WORK)/build/NWGNUcustom.inc
|
||||
CUSTOM_INI = $(AP_WORK)/NWGNUcustom.ini
|
||||
endif
|
||||
|
||||
ifndef VERBOSE
|
||||
.SILENT:
|
||||
endif
|
||||
|
||||
#
|
||||
# Treat like an include
|
||||
#
|
||||
ifndef EnvironmentDefined
|
||||
|
||||
#
|
||||
# simple macros for parsing makefiles
|
||||
#
|
||||
EOLIST:=
|
||||
EMPTY :=
|
||||
COMMA := ,
|
||||
SPACE := $(EMPTY) $(EMPTY)
|
||||
|
||||
#
|
||||
# Base environment
|
||||
#
|
||||
|
||||
# Try and handle case issues
|
||||
ifndef NOVELLLIBC
|
||||
ifdef NovellLibC
|
||||
NOVELLLIBC = $(NovellLibC)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef NOVELLLIBC
|
||||
NOVELLLIBC = C:/novell/ndk/libc
|
||||
endif
|
||||
ifneq "$(wildcard $(NOVELLLIBC)/include/ndkvers.h)" "$(NOVELLLIBC)/include/ndkvers.h"
|
||||
$(error NOVELLLIBC does not point to a valid Novell LIBC SDK)
|
||||
endif
|
||||
|
||||
ifndef LDAPSDK
|
||||
LDAPSDK = C:/novell/ndk/cldapsdk/NetWare/libc
|
||||
endif
|
||||
ifneq "$(wildcard $(LDAPSDK)/inc/ldap.h)" "$(LDAPSDK)/inc/ldap.h"
|
||||
$(error LDAPSDK does not point to a valid Novell CLDAP SDK)
|
||||
endif
|
||||
|
||||
ifdef EXPATSDK
|
||||
ifeq "$(wildcard $(EXPATSDK)/include/expat.h)" "$(EXPATSDK)/include/expat.h"
|
||||
EXPAT_IMP = $(EXPATSDK)/imports/expatlbc.imp
|
||||
EXPAT_INC = $(EXPATSDK)/include
|
||||
EXPAT_LIB = $(EXPATSDK)/lib/expat.lib
|
||||
EXPAT_NLM = EXPATLBC
|
||||
else
|
||||
$(error EXPATSDK does not point to a valid EXPAT SDK)
|
||||
endif
|
||||
endif
|
||||
ifdef EXPATSRC
|
||||
ifeq "$(wildcard $(EXPATSRC)/lib/xmlparse.c)" "$(EXPATSRC)/lib/xmlparse.c"
|
||||
EXPAT_INC = $(EXPATSRC)/lib
|
||||
EXPAT_LIB = $(EXPATSRC)/lib/$(OBJDIR)/expat.lib
|
||||
else
|
||||
$(error EXPATSRC does not point to a valid EXPAT source tree)
|
||||
endif
|
||||
endif
|
||||
ifndef EXPAT_INC
|
||||
EXPATSRC = $(APUXML)/expat
|
||||
EXPAT_INC = $(EXPATSRC)/lib
|
||||
EXPAT_LIB = $(EXPATSRC)/lib/$(OBJDIR)/expat.lib
|
||||
endif
|
||||
|
||||
ifndef METROWERKS
|
||||
METROWERKS = $(ProgramFiles)\Metrowerks\CodeWarrior
|
||||
endif
|
||||
|
||||
# If LM_LICENSE_FILE isn't defined, define a variable that can be used to
|
||||
# restart make with it defined
|
||||
ifndef LM_LICENSE_FILE
|
||||
NO_LICENSE_FILE = NO_LICENSE_FILE
|
||||
endif
|
||||
|
||||
#
|
||||
# Set the Release type that you want to build, possible values are:
|
||||
#
|
||||
# debug - full debug switches are set
|
||||
# noopt - normal switches are set
|
||||
# release - optimization switches are set (default)
|
||||
|
||||
ifdef reltype
|
||||
RELEASE = $(reltype)
|
||||
endif
|
||||
|
||||
ifdef RELTYPE
|
||||
RELEASE = $(RELTYPE)
|
||||
endif
|
||||
|
||||
ifdef debug
|
||||
RELEASE = debug
|
||||
endif
|
||||
|
||||
ifdef DEBUG
|
||||
RELEASE = debug
|
||||
endif
|
||||
|
||||
ifdef noopt
|
||||
RELEASE = noopt
|
||||
endif
|
||||
|
||||
ifdef NOOPT
|
||||
RELEASE = noopt
|
||||
endif
|
||||
|
||||
ifdef optimized
|
||||
RELEASE = release
|
||||
endif
|
||||
|
||||
ifdef OPTIMIZED
|
||||
RELEASE = release
|
||||
endif
|
||||
|
||||
ifndef RELEASE
|
||||
RELEASE = release
|
||||
endif
|
||||
|
||||
ifeq "$(strip $(RELEASE))" "optimized"
|
||||
RELEASE = release
|
||||
endif
|
||||
|
||||
OBJDIR = obj_$(RELEASE)
|
||||
|
||||
#
|
||||
# Setup compiler information
|
||||
#
|
||||
|
||||
# MetroWerks NLM tools
|
||||
CC = mwccnlm
|
||||
CPP = mwccnlm
|
||||
LINK = mwldnlm
|
||||
LIB = mwldnlm -type library -w nocmdline
|
||||
WIN_CC = mwcc
|
||||
|
||||
# Setup build tools
|
||||
AWK = awk
|
||||
|
||||
#
|
||||
# Declare Command and tool macros here
|
||||
#
|
||||
|
||||
ifeq ($(findstring /sh,$(SHELL)),/sh)
|
||||
DEL = rm -f $1
|
||||
RMDIR = rm -rf $1
|
||||
MKDIR = mkdir -p $1
|
||||
COPY = cp -av $1 $2
|
||||
COPYR = cp -ar $1 $2
|
||||
ECHONL = echo ""
|
||||
DL = '
|
||||
CAT = cat
|
||||
else
|
||||
ifeq "$(OS)" "Windows_NT"
|
||||
DEL = $(shell if exist $(subst /,\,$1) del /q /f 2>NUL $(subst /,\,$1))
|
||||
RMDIR = $(shell if exist $(subst /,\,$1)\NUL rd /q /s 2>NUL $(subst /,\,$1))
|
||||
else
|
||||
DEL = $(shell if exist $(subst /,\,$1) del 2>NUL $(subst /,\,$1))
|
||||
RMDIR = $(shell if exist $(subst /,\,$1)\NUL deltree /y 2>NUL $(subst /,\,$1))
|
||||
endif
|
||||
ECHONL = $(ComSpec) /c echo.
|
||||
MKDIR = $(shell if not exist $(subst /,\,$1)\NUL md 2>NUL $(subst /,\,$1))
|
||||
COPY = copy /y 2>NUL $(subst /,\,$1) $(subst /,\,$2)
|
||||
COPYR = xcopy /y /e 2>NUL $(subst /,\,$1) $(subst /,\,$2)
|
||||
CAT = type
|
||||
endif
|
||||
|
||||
ifdef IPV6
|
||||
ifndef USE_STDSOCKETS
|
||||
USE_STDSOCKETS=1
|
||||
endif
|
||||
endif
|
||||
|
||||
NOVI = $(NOVELLLIBC)/imports
|
||||
PRELUDE = $(NOVI)/libcpre.o
|
||||
|
||||
INCDIRS = $(NOVELLLIBC)/include;
|
||||
|
||||
DEFINES = -DNETWARE
|
||||
ifdef USE_STDSOCKETS
|
||||
DEFINES += -DUSE_BSD_SOCKETS
|
||||
else
|
||||
DEFINES += -DUSE_WINSOCK
|
||||
INCDIRS += $(NOVELLLIBC)/include/winsock;
|
||||
endif
|
||||
ifndef DEBUG
|
||||
DEFINES += -DNDEBUG
|
||||
endif
|
||||
|
||||
ifdef USE_STDSOCKETS
|
||||
VERSION_SKT = (BSDSOCK)
|
||||
else
|
||||
VERSION_SKT = (WINSOCK)
|
||||
endif
|
||||
|
||||
# MetroWerks static Libraries
|
||||
CLIB3S = $(METROWERKS)/Novell Support/Metrowerks Support/Libraries/Runtime/mwcrtl.lib
|
||||
MATH3S =
|
||||
PLIB3S = $(METROWERKS)/Novell Support/Metrowerks Support/Libraries/MSL C++/MWCPP.lib
|
||||
|
||||
ifeq "$(OS)" "Windows_NT"
|
||||
# MetroWerks Win32 build flags to create build tools
|
||||
MWCW_MSL = "$(METROWERKS)/MSL"
|
||||
MWCW_W32 = "$(METROWERKS)/Win32-x86 Support"
|
||||
CC_FOR_BUILD = $(WIN_CC)
|
||||
CFLAGS_FOR_BUILD = -O2 -gccinc -nodefaults -proc 586 -w off
|
||||
CFLAGS_FOR_BUILD += -ir $(MWCW_MSL) -ir $(MWCW_W32) -lr $(MWCW_MSL) -lr $(MWCW_W32)
|
||||
CFLAGS_FOR_BUILD += -lMSL_All_x86.lib -lkernel32.lib -luser32.lib
|
||||
else
|
||||
# GNUC build flags to create build tools
|
||||
CC_FOR_BUILD = gcc
|
||||
CFLAGS_FOR_BUILD = -Wall -O2
|
||||
endif
|
||||
|
||||
# Base compile flags
|
||||
# and prefix or precompiled header added here.
|
||||
|
||||
# The default flags are as follows:
|
||||
#
|
||||
# -c compile only, no link
|
||||
# -gccinc search directory of referencing file first for #includes
|
||||
# -Cpp_exceptions off disable C++ exceptions
|
||||
# -RTTI off disable C++ run-time typing information
|
||||
# -align 4 align on 4 byte bounderies
|
||||
# -w nocmdline disable command-line driver/parser warnings
|
||||
# -proc PII generate code base on Pentium II instruction set
|
||||
# -inst mmx use MMX extensions (not used)
|
||||
|
||||
CFLAGS = -c -w nocmdline -gccinc -Cpp_exceptions off -RTTI off -align 4 -proc PII
|
||||
|
||||
ifdef CC_MAX_ERRORS
|
||||
CFLAGS += -maxerrors $(CC_MAX_ERRORS)
|
||||
else
|
||||
CFLAGS += -maxerrors 1
|
||||
endif
|
||||
|
||||
ifeq "$(REQUIRE_PROTOTYPES)" "1"
|
||||
CFLAGS += -r
|
||||
endif
|
||||
|
||||
# -g generate debugging information
|
||||
# -O0 level 0 optimizations
|
||||
ifeq "$(RELEASE)" "debug"
|
||||
CFLAGS += -g -O0
|
||||
endif
|
||||
|
||||
# -O4,p level 4 optimizations, optimize for speed
|
||||
ifeq "$(RELEASE)" "release"
|
||||
CFLAGS += -O4,p
|
||||
endif
|
||||
|
||||
# -prefix apr_arch_pre_nw.h #include apr_arch_pre_nw.h for all files
|
||||
CFLAGS += -prefix apr_arch_pre_nw.h
|
||||
|
||||
|
||||
ifneq ($(findstring /sh,$(SHELL)),/sh)
|
||||
PATH:=$(PATH);$(METROWERKS)\bin;$(METROWERKS)\Other Metrowerks Tools\Command Line Tools
|
||||
endif
|
||||
|
||||
#
|
||||
# Declare major project deliverables output directories here
|
||||
#
|
||||
|
||||
ifdef DEST
|
||||
INSTALL = $(DEST)
|
||||
ifeq (\, $(findstring \,$(INSTALL)))
|
||||
INSTDIRS = $(DEST)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef dest
|
||||
INSTALL = $(dest)
|
||||
ifeq (\, $(findstring \,$(INSTALL)))
|
||||
INSTDIRS = $(dest)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef INSTALL
|
||||
INSTALL = $(APR_WORK)/Dist
|
||||
INSTDIRS = $(APR_WORK)/Dist
|
||||
BASEDIR = Apr
|
||||
endif
|
||||
|
||||
# Add support for building IPV6 alongside
|
||||
ifneq "$(IPV6)" ""
|
||||
DEFINES += -DNW_BUILD_IPV6
|
||||
# INCDIRS := $(NOVELLLIBC)/include/winsock/IPV6;$(INCDIRS)
|
||||
|
||||
ifneq "$(findstring IPV6,$(OBJDIR))" "IPV6"
|
||||
OBJDIR := $(OBJDIR)_IPV6
|
||||
endif
|
||||
|
||||
ifneq "$(findstring IPV6,$(INSTALL))" "IPV6"
|
||||
INSTALL := $(INSTALL)_IPV6
|
||||
endif
|
||||
|
||||
ifneq "$(findstring IPV6,$(INSTDIRS))" "IPV6"
|
||||
INSTDIRS := $(INSTDIRS)_IPV6
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
ifdef DEST
|
||||
|
||||
ifndef BASEDIR
|
||||
BASEDIR = Apache2
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
INSTALLBASE := $(INSTALL)/$(BASEDIR)
|
||||
|
||||
INSTDEVDIRS := \
|
||||
$(INSTDIRS) \
|
||||
$(INSTALLBASE) \
|
||||
$(INSTALLBASE)/include \
|
||||
$(INSTALLBASE)/lib \
|
||||
$(INSTALLBASE)/bin
|
||||
|
||||
INSTDIRS += \
|
||||
$(INSTALLBASE)
|
||||
|
||||
#
|
||||
# Common directories
|
||||
#
|
||||
|
||||
APR = $(subst \,/,$(APR_WORK))
|
||||
APU = $(subst \,/,$(APU_WORK))
|
||||
APRBUILD = $(APR)/build
|
||||
APULDAP = $(APU)/ldap
|
||||
APUXML = $(APU)/xml
|
||||
APRTEST = $(APR)/test
|
||||
APUTEST = $(APU)/test
|
||||
|
||||
#
|
||||
# Internal Libraries
|
||||
#
|
||||
|
||||
APRLIB = $(APR)/$(OBJDIR)/aprlib.lib
|
||||
APULIB = $(APU)/$(OBJDIR)/apulib.lib
|
||||
APULDAPLIB = $(APULDAP)/$(OBJDIR)/apuldap.lib
|
||||
APUXMLLIB = $(APUXML)/$(OBJDIR)/apuxml.lib
|
||||
|
||||
#
|
||||
# Additional general defines
|
||||
#
|
||||
|
||||
EnvironmentDefined = 1
|
||||
endif # ifndef EnvironmentDefined
|
||||
|
||||
# This is always set so that it will show up in lower directories
|
||||
|
||||
ifdef Path
|
||||
Path = $(PATH)
|
||||
endif
|
||||
|
||||
+96
@@ -0,0 +1,96 @@
|
||||
#
|
||||
# Obtain the global build environment
|
||||
#
|
||||
|
||||
include $(APR_WORK)/build/NWGNUenvironment.inc
|
||||
|
||||
#
|
||||
# Define base targets and rules
|
||||
#
|
||||
|
||||
TARGETS = libs nlms install clobber_libs clobber_nlms clean installdev
|
||||
|
||||
.PHONY : $(TARGETS) default all help $(NO_LICENSE_FILE)
|
||||
|
||||
# Here is where we will use the NO_LICENSE_FILE variable to see if we need to
|
||||
# restart the make with it defined
|
||||
|
||||
ifdef NO_LICENSE_FILE
|
||||
|
||||
default: NO_LICENSE_FILE
|
||||
|
||||
all: NO_LICENSE_FILE
|
||||
|
||||
install :: NO_LICENSE_FILE
|
||||
|
||||
installdev :: NO_LICENSE_FILE
|
||||
|
||||
NO_LICENSE_FILE :
|
||||
$(MAKE) $(MAKECMDGOALS) -f NWGNUmakefile RELEASE=$(RELEASE) DEST="$(INSTALL)" LM_LICENSE_FILE="$(METROWERKS)/license.dat"
|
||||
|
||||
else # LM_LICENSE_FILE must be defined so use the real targets
|
||||
|
||||
default: $(SUBDIRS) libs nlms
|
||||
|
||||
all: $(SUBDIRS) libs nlms install
|
||||
|
||||
$(TARGETS) :: $(SUBDIRS)
|
||||
|
||||
endif #NO_LICENSE_FILE check
|
||||
|
||||
help :
|
||||
@echo $(DL)targets for RELEASE=$(RELEASE):$(DL)
|
||||
@echo $(DL)(default) . . . . libs nlms$(DL)
|
||||
@echo $(DL)all . . . . . . . does everything (libs nlms install)$(DL)
|
||||
@echo $(DL)libs. . . . . . . builds all libs$(DL)
|
||||
@echo $(DL)nlms. . . . . . . builds all nlms$(DL)
|
||||
@echo $(DL)install . . . . . builds libs and nlms and copies install files to$(DL)
|
||||
@echo $(DL) "$(INSTALL)"$(DL)
|
||||
@echo $(DL)installdev. . . . copies headers and files needed for development to$(DL)
|
||||
@echo $(DL) "$(INSTALL)"$(DL)
|
||||
@echo $(DL)clean . . . . . . deletes $(OBJDIR) dirs, *.err, and *.map$(DL)
|
||||
@echo $(DL)clobber_all . . . deletes all possible output from the make$(DL)
|
||||
@echo $(DL)clobber_install . deletes all files in $(INSTALL)$(DL)
|
||||
@$(ECHONL)
|
||||
@echo $(DL)Multiple targets can be used on a single make command line -$(DL)
|
||||
@echo $(DL)(i.e. $(MAKE) clean all)$(DL)
|
||||
@$(ECHONL)
|
||||
@echo $(DL)You can also specify RELEASE=debug, RELEASE=noopt, or RELEASE=release$(DL)
|
||||
@echo $(DL)The default is RELEASE=release$(DL)
|
||||
|
||||
clobber_all :: clean clobber_install
|
||||
|
||||
clobber_install ::
|
||||
$(call RMDIR,$(INSTALL))
|
||||
|
||||
#
|
||||
# build recursive targets
|
||||
#
|
||||
|
||||
$(SUBDIRS) : FORCE
|
||||
ifneq "$(MAKECMDGOALS)" "clean"
|
||||
ifneq "$(findstring clobber_,$(MAKECMDGOALS))" "clobber_"
|
||||
@$(ECHONL)
|
||||
@echo Building $(CURDIR)/$@
|
||||
endif
|
||||
endif
|
||||
$(MAKE) -C $@ $(MAKECMDGOALS) -f NWGNUmakefile RELEASE=$(RELEASE) DEST="$(INSTALL)" LM_LICENSE_FILE="$(LM_LICENSE_FILE)"
|
||||
@$(ECHONL)
|
||||
|
||||
FORCE : ;
|
||||
|
||||
#
|
||||
# Standard targets
|
||||
#
|
||||
|
||||
clean :: $(SUBDIRS) $(APRTEST)
|
||||
@echo Cleaning up $(CURDIR)
|
||||
$(call RMDIR,$(OBJDIR))
|
||||
$(call DEL,*.err)
|
||||
$(call DEL,*.map)
|
||||
$(call DEL,*.tmp)
|
||||
# $(call DEL,*.d)
|
||||
|
||||
$(OBJDIR) ::
|
||||
$(call MKDIR,$@)
|
||||
|
||||
+101
@@ -0,0 +1,101 @@
|
||||
#
|
||||
# Declare the sub-directories to be built here
|
||||
#
|
||||
|
||||
SUBDIRS = \
|
||||
$(EOLIST)
|
||||
|
||||
#
|
||||
# Get the 'head' of the build environment. This includes default targets and
|
||||
# paths to tools
|
||||
#
|
||||
|
||||
include $(APR_WORK)/build/NWGNUhead.inc
|
||||
|
||||
#
|
||||
# build this level's files
|
||||
|
||||
FILES_prebuild_headers = \
|
||||
$(APR)/include/apr.h \
|
||||
$(APU)/include/apu.h \
|
||||
$(APU)/include/apu_want.h \
|
||||
$(APU)/include/apr_ldap.h \
|
||||
$(APU)/include/private/apu_config.h \
|
||||
$(APU)/include/private/apu_select_dbm.h \
|
||||
$(APUXML)/expat/lib/expat_config.h \
|
||||
$(APR)/include/private/apr_escape_test_char.h \
|
||||
$(EOLIST)
|
||||
|
||||
nlms :: $(APR)/aprlib.imp
|
||||
|
||||
$(APR)/aprlib.imp : make_nw_export.awk nw_export.i
|
||||
@echo $(DL)GEN $@$(DL)
|
||||
$(AWK) -v EXPPREFIX=APR$(VERSION_MAJMIN) -f $^ >$@
|
||||
|
||||
nw_export.i : nw_export.inc $(APU)/build/nw_apu_export.inc $(FILES_prebuild_headers) cc.opt
|
||||
@echo $(DL)GEN $@$(DL)
|
||||
$(CC) $< @cc.opt
|
||||
|
||||
cc.opt : NWGNUmakefile $(APR_WORK)/build/NWGNUenvironment.inc $(APR_WORK)/build/NWGNUhead.inc $(APRBUILD)/NWGNUtail.inc $(CUSTOM_INI)
|
||||
@echo $(DL)-P$(DL)> $@
|
||||
@echo $(DL)-EP$(DL)>> $@
|
||||
@echo $(DL)-nosyspath$(DL)>> $@
|
||||
@echo $(DL)-w nocmdline$(DL)>> $@
|
||||
@echo $(DL)$(DEFINES) -DGENEXPORTS$(DL)>> $@
|
||||
@echo $(DL)-I$(APR)/include$(DL)>> $@
|
||||
@echo $(DL)-I$(APR)/include/arch/netware$(DL)>> $@
|
||||
@echo $(DL)-I$(APR)/include/arch/unix$(DL)>> $@
|
||||
@echo $(DL)-I$(APU)/include$(DL)>> $@
|
||||
@echo $(DL)-I$(APU)/include/private$(DL)>> $@
|
||||
@echo $(DL)-I$(APU)/build$(DL)>> $@
|
||||
@echo $(DL)-ir $(NOVELLLIBC)$(DL)>> $@
|
||||
ifneq "$(LDAPSDK)" ""
|
||||
@echo $(DL)-ir $(LDAPSDK)$(DL)>> $@
|
||||
endif
|
||||
|
||||
|
||||
ifndef WITH_LDAP
|
||||
WITH_LDAP = $(shell $(AWK) '/^\#define APR_HAS_LDAP /{print $$3}' $(APU)/include/apr_ldap.hnw)
|
||||
endif
|
||||
|
||||
$(APU)/include/apr_ldap.h: $(APR)/build/nw_make_header.awk $(APU)/include/apr_ldap.hnw
|
||||
@echo $(DL)Creating $@$(DL)
|
||||
$(AWK) -v WITH_LDAP=$(WITH_LDAP) -f $^ >$@
|
||||
|
||||
%.h: %.hnw
|
||||
@echo $(DL)Creating $@$(DL)
|
||||
$(call COPY,$<,$@)
|
||||
|
||||
%.h: %.hw
|
||||
@echo $(DL)Creating $@$(DL)
|
||||
$(call COPY,$<,$@)
|
||||
|
||||
$(APR)/include/private/apr_escape_test_char.h: gen_test_char.exe $(APR)/tools/gen_test_char.c
|
||||
@echo $(DL)GEN $@$(DL)
|
||||
$< > $@
|
||||
|
||||
%.exe: $(APR)/tools/%.c
|
||||
@echo $(DL)Creating Build Helper $@$(DL)
|
||||
$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -DCROSS_COMPILE $< -o $@
|
||||
|
||||
#
|
||||
# You can use this target if all that is needed is to copy files to the
|
||||
# installation area
|
||||
#
|
||||
install :: nlms FORCE
|
||||
|
||||
clean ::
|
||||
$(call DEL,nw_export.i)
|
||||
$(call DEL,cc.opt)
|
||||
$(call DEL,NWGNUversion.inc)
|
||||
$(call DEL,$(APR)/aprlib.imp)
|
||||
$(foreach file,$(FILES_prebuild_headers),$(call DEL,$(file)))
|
||||
$(call DEL,gen_test_char.exe)
|
||||
|
||||
#
|
||||
# Include the 'tail' makefile that has targets that depend on variables defined
|
||||
# in this makefile
|
||||
#
|
||||
|
||||
include $(APRBUILD)/NWGNUtail.inc
|
||||
|
||||
+373
@@ -0,0 +1,373 @@
|
||||
#
|
||||
# This contains final targets and should be included at the end of any
|
||||
# NWGNUmakefile file
|
||||
#
|
||||
|
||||
#
|
||||
# If we are going to create an nlm, make sure we have assigned variables to
|
||||
# use during the link.
|
||||
#
|
||||
ifndef NLM_NAME
|
||||
NLM_NAME = $(TARGET_nlm)
|
||||
endif
|
||||
|
||||
ifndef NLM_DESCRIPTION
|
||||
NLM_DESCRIPTION = $(NLM_NAME)
|
||||
endif
|
||||
|
||||
ifndef NLM_THREAD_NAME
|
||||
NLM_THREAD_NAME = $(NLM_NAME) Thread
|
||||
endif
|
||||
|
||||
ifndef NLM_SCREEN_NAME
|
||||
NLM_SCREEN_NAME = DEFAULT
|
||||
endif
|
||||
|
||||
ifndef NLM_COPYRIGHT
|
||||
NLM_COPYRIGHT = Licensed under the Apache License, Version 2.0
|
||||
endif
|
||||
|
||||
ifeq "$(NLM_FLAGS)" ""
|
||||
NLM_FLAGS = AUTOUNLOAD, PSEUDOPREEMPTION
|
||||
endif
|
||||
|
||||
ifeq "$(NLM_STACK_SIZE)" ""
|
||||
NLM_STACK_SIZE = 65536
|
||||
endif
|
||||
|
||||
ifeq "$(NLM_ENTRY_SYM)" ""
|
||||
NLM_ENTRY_SYM = _LibCPrelude
|
||||
endif
|
||||
|
||||
ifeq "$(NLM_EXIT_SYM)" ""
|
||||
NLM_EXIT_SYM = _LibCPostlude
|
||||
endif
|
||||
|
||||
ifeq "$(NLM_VERSION)" ""
|
||||
NLM_VERSION = $(VERSION)
|
||||
endif
|
||||
|
||||
#
|
||||
# Create dependency lists based on the files available
|
||||
#
|
||||
|
||||
|
||||
CCOPT_DEPENDS = \
|
||||
$(APRBUILD)/NWGNUhead.inc \
|
||||
$(APRBUILD)/NWGNUenvironment.inc \
|
||||
$(APRBUILD)/NWGNUtail.inc \
|
||||
NWGNUmakefile \
|
||||
$(CUSTOM_INI) \
|
||||
$(EOLIST)
|
||||
|
||||
CPPOPT_DEPENDS = \
|
||||
$(APRBUILD)/NWGNUhead.inc \
|
||||
$(APRBUILD)/NWGNUenvironment.inc \
|
||||
$(APRBUILD)/NWGNUtail.inc \
|
||||
NWGNUmakefile \
|
||||
$(CUSTOM_INI) \
|
||||
$(EOLIST)
|
||||
|
||||
$(NLM_NAME)_LINKOPT_DEPENDS = \
|
||||
$(TARGET_lib) \
|
||||
$(APRBUILD)/NWGNUenvironment.inc \
|
||||
NWGNUmakefile \
|
||||
$(APRBUILD)/NWGNUtail.inc \
|
||||
$(CUSTOM_INI) \
|
||||
$(VERSION_INC) \
|
||||
$(EOLIST)
|
||||
|
||||
ifeq "$(words $(strip $(TARGET_lib)))" "1"
|
||||
LIB_NAME = $(basename $(notdir $(TARGET_lib)))
|
||||
$(LIB_NAME)_LIBLST_DEPENDS = \
|
||||
$(FILES_lib_objs) \
|
||||
$(APRBUILD)/NWGNUenvironment.inc \
|
||||
NWGNUmakefile \
|
||||
$(APRBUILD)/NWGNUtail.inc \
|
||||
$(CUSTOM_INI) \
|
||||
$(EOLIST)
|
||||
endif
|
||||
|
||||
ifeq "$(wildcard NWGNU$(LIB_NAME))" "NWGNU$(LIB_NAME)"
|
||||
$(LIB_NAME)_LIBLST_DEPENDS += NWGNU$(LIB_NAME)
|
||||
endif
|
||||
|
||||
ifeq "$(wildcard NWGNU$(NLM_NAME))" "NWGNU$(NLM_NAME)"
|
||||
$(NLM_NAME)_LINKOPT_DEPENDS += NWGNU$(NLM_NAME)
|
||||
CCOPT_DEPENDS += NWGNU$(NLM_NAME)
|
||||
CPPOPT_DEPENDS += NWGNU$(NLM_NAME)
|
||||
endif
|
||||
|
||||
#
|
||||
# Generic compiler rules
|
||||
#
|
||||
|
||||
ifneq "$(MAKECMDGOALS)" "clean"
|
||||
ifneq "$(findstring clobber_,$(MAKECMDGOALS))" "clobber_"
|
||||
$(APRBUILD)/NWGNUversion.inc : $(APRBUILD)/nw_ver.awk $(APR)/include/apr_version.h
|
||||
# @echo Generating $@
|
||||
@echo GEN $@
|
||||
@$(AWK) -f $^ > $@
|
||||
|
||||
-include $(APRBUILD)/NWGNUversion.inc
|
||||
|
||||
ifneq "$(strip $(VERSION_STR))" ""
|
||||
VERSION_INC = $(APRBUILD)/NWGNUversion.inc
|
||||
else
|
||||
VERSION = 1,5,0
|
||||
VERSION_STR = 1.5.0
|
||||
VERSION_MAJMIN = 15
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq "$(words $(strip $(TARGET_nlm)))" "1"
|
||||
INCLUDE_BLDCMDS = 1
|
||||
CCOPT_NAME = $(NLM_NAME)
|
||||
endif
|
||||
|
||||
ifeq "$(words $(strip $(TARGET_lib)))" "1"
|
||||
INCLUDE_BLDCMDS = 1
|
||||
CCOPT_NAME = $(LIB_NAME)
|
||||
endif
|
||||
|
||||
ifeq "$(INCLUDE_BLDCMDS)" "1"
|
||||
|
||||
$(OBJDIR)/%.o: %.c $(OBJDIR)/$(CCOPT_NAME)_cc.opt
|
||||
# @echo Compiling $<
|
||||
@echo $(DL)CC $<$(DL)
|
||||
$(CC) -o $@ $< @$(word 2, $^)
|
||||
|
||||
$(OBJDIR)/$(CCOPT_NAME)_cc.opt: $(CCOPT_DEPENDS)
|
||||
$(call DEL,$@)
|
||||
ifdef VERBOSE
|
||||
@echo $(DL)CCOPT_DEPENDS=$^$(DL)
|
||||
endif
|
||||
# @echo Generating $@
|
||||
@echo $(DL)GEN $@$(DL)
|
||||
ifneq "$(strip $(CFLAGS))" ""
|
||||
@echo $(DL)$(CFLAGS)$(DL)>> $@
|
||||
endif
|
||||
ifneq "$(strip $(XCFLAGS))" ""
|
||||
@echo $(DL)$(XCFLAGS)$(DL)>> $@
|
||||
endif
|
||||
ifneq "$(strip $(XINCDIRS))" ""
|
||||
@echo $(DL)$(foreach xincdir,$(strip $(subst ;,$(SPACE),$(XINCDIRS))),-I$(xincdir))$(DL)>> $@
|
||||
endif
|
||||
ifneq "$(strip $(INCDIRS))" ""
|
||||
@echo $(DL)$(foreach incdir,$(strip $(subst ;,$(SPACE),$(INCDIRS))),-I$(incdir))$(DL)>> $@
|
||||
endif
|
||||
ifneq "$(strip $(DEFINES))" ""
|
||||
@echo $(DL)$(DEFINES)$(DL)>> $@
|
||||
endif
|
||||
ifneq "$(strip $(XDEFINES))" ""
|
||||
@echo $(DL)$(XDEFINES)$(DL)>> $@
|
||||
endif
|
||||
|
||||
$(OBJDIR)/%.o: %.cpp $(OBJDIR)/$(CCOPT_NAME)_cpp.opt
|
||||
# @echo Compiling $<
|
||||
@echo $(DL)CPP $<$(DL)
|
||||
$(CCP) -o $@ $< @$(word 2, $^)
|
||||
|
||||
$(OBJDIR)/$(CCOPT_NAME)_cpp.opt: $(CPPOPT_DEPENDS)
|
||||
$(call DEL,$@)
|
||||
ifdef VERBOSE
|
||||
@echo $(DL)CPPOPT_DEPENDS=$^$(DL)
|
||||
endif
|
||||
# @echo Generating $@
|
||||
@echo $(DL)GEN $@$(DL)
|
||||
ifneq "$(strip $(CFLAGS))" ""
|
||||
@echo $(DL)$(CFLAGS)$(DL)>> $@
|
||||
endif
|
||||
ifneq "$(strip $(XCFLAGS))" ""
|
||||
@echo $(DL)$(XCFLAGS)$(DL)>> $@
|
||||
endif
|
||||
ifneq "$(strip $(XINCDIRS))" ""
|
||||
@echo $(DL)$(foreach xincdir,$(strip $(subst ;,$(SPACE),$(XINCDIRS))),-I$(xincdir))$(DL)>> $@
|
||||
endif
|
||||
ifneq "$(strip $(INCDIRS))" ""
|
||||
@echo $(DL)$(foreach incdir,$(strip $(subst ;,$(SPACE),$(INCDIRS))),-I$(incdir))$(DL)>> $@
|
||||
endif
|
||||
ifneq "$(strip $(DEFINES))" ""
|
||||
@echo $(DL)$(DEFINES)$(DL)>> $@
|
||||
endif
|
||||
ifneq "$(strip $(XDEFINES))" ""
|
||||
@echo $(DL)$(XDEFINES)$(DL)>> $@
|
||||
endif
|
||||
|
||||
endif # one target nlm or lib
|
||||
|
||||
#
|
||||
# Rules to build libraries
|
||||
#
|
||||
|
||||
# If we only have one target library then build it
|
||||
|
||||
ifeq "$(words $(strip $(TARGET_lib)))" "1"
|
||||
|
||||
$(TARGET_lib) : $(OBJDIR)/$(LIB_NAME)_lib.lst
|
||||
$(call DEL,$@)
|
||||
# @echo Generating $@
|
||||
@echo $(DL)AR $@$(DL)
|
||||
$(LIB) -o $@ @$<
|
||||
|
||||
$(OBJDIR)/aprlib_lib.lst: $(aprlib_LIBLST_DEPENDS)
|
||||
$(call DEL,$@)
|
||||
ifneq "$(strip $(FILES_lib_objs))" ""
|
||||
# @echo Generating $@
|
||||
@echo $(DL)GEN $@$(DL)
|
||||
ifdef VERBOSE
|
||||
@echo $(DL)FILES_lib_objs=$(words $(FILES_lib_objs))$(DL)
|
||||
endif
|
||||
@echo $(DL)$(wordlist 1, 20, $(FILES_lib_objs))$(DL)>> $@
|
||||
@echo $(DL)$(wordlist 21, 40, $(FILES_lib_objs))$(DL)>> $@
|
||||
@echo $(DL)$(wordlist 41, 60, $(FILES_lib_objs))$(DL)>> $@
|
||||
@echo $(DL)$(wordlist 61, 80, $(FILES_lib_objs))$(DL)>> $@
|
||||
endif
|
||||
|
||||
$(OBJDIR)/%_lib.lst: $($(LIB_NAME)_LIBLST_DEPENDS)
|
||||
$(call DEL,$@)
|
||||
ifneq "$(strip $(FILES_lib_objs))" ""
|
||||
# @echo Generating $@
|
||||
@echo $(DL)GEN $@$(DL)
|
||||
ifdef VERBOSE
|
||||
@echo FILES_lib_objs=$(words $(FILES_lib_objs))
|
||||
endif
|
||||
@echo $(DL)$(FILES_lib_objs)$(DL)>> $@
|
||||
endif
|
||||
|
||||
else # We must have more than one target library so load the individual makefiles
|
||||
|
||||
$(OBJDIR)/%.lib: NWGNU% $(APRBUILD)/NWGNUhead.inc $(APRBUILD)/NWGNUtail.inc $(APRBUILD)/NWGNUenvironment.inc FORCE
|
||||
@echo $(DL)Calling $<$(DL)
|
||||
$(MAKE) -f $< $(MAKECMDGOALS) RELEASE=$(RELEASE)
|
||||
|
||||
endif
|
||||
|
||||
#
|
||||
# Rules to build nlms.
|
||||
#
|
||||
|
||||
# If we only have one target NLM then build it
|
||||
ifeq "$(words $(strip $(TARGET_nlm)))" "1"
|
||||
|
||||
$(TARGET_nlm) : $(FILES_nlm_objs) $(FILES_nlm_libs) $(OBJDIR)/$(NLM_NAME)_link.opt
|
||||
# @echo Linking $@
|
||||
@echo $(DL)LINK $@$(DL)
|
||||
$(LINK) @$(OBJDIR)/$(NLM_NAME)_link.opt
|
||||
|
||||
# This will force the link option file to be rebuilt if we change the
|
||||
# corresponding makefile
|
||||
|
||||
$(OBJDIR)/$(NLM_NAME)_link.opt : $($(NLM_NAME)_LINKOPT_DEPENDS)
|
||||
$(call DEL,$@)
|
||||
$(call DEL,$(@:.opt=.def))
|
||||
# @echo Generating $@
|
||||
@echo $(DL)GEN $@$(DL)
|
||||
@echo $(DL)# Do not edit this file - it is created by make!$(DL) > $@
|
||||
@echo $(DL)# All your changes will be lost!!$(DL)>> $@
|
||||
@echo $(DL)-warnings off$(DL)>> $@
|
||||
@echo $(DL)-zerobss$(DL)>> $@
|
||||
@echo $(DL)-o $(TARGET_nlm)$(DL)>> $@
|
||||
ifneq "$(FILE_nlm_copyright)" ""
|
||||
@-$(CAT) $(FILE_nlm_copyright) >> $@
|
||||
endif
|
||||
ifeq "$(RELEASE)" "debug"
|
||||
@echo $(DL)-g$(DL)>> $@
|
||||
@echo $(DL)-sym internal$(DL)>> $@
|
||||
@echo $(DL)-sym codeview4$(DL)>> $@
|
||||
@echo $(DL)-osym $(OBJDIR)/$(NLM_NAME).sym$(DL)>> $@
|
||||
else
|
||||
@echo $(DL)-sym internal$(DL)>> $@
|
||||
endif
|
||||
@echo $(DL)-l $(APR)/$(OBJDIR)$(DL)>> $@
|
||||
@echo $(DL)-l $(APU)/$(OBJDIR)$(DL)>> $@
|
||||
@echo $(DL)-l $(APULDAP)/$(OBJDIR)$(DL)>> $@
|
||||
@echo $(DL)-l $(APUXML)/$(OBJDIR)$(DL)>> $@
|
||||
@echo $(DL)-l $(APR)/misc/netware$(DL)>> $@
|
||||
@echo $(DL)-l $(APR)$(DL)>> $@
|
||||
@echo $(DL)-l "$(METROWERKS)/Novell Support/Metrowerks Support/Libraries/Runtime"$(DL)>> $@
|
||||
@echo $(DL)-l "$(METROWERKS)/Novell Support/Metrowerks Support/Libraries/MSL C++"$(DL)>> $@
|
||||
ifneq "$(IPV6)" ""
|
||||
@echo $(DL)-l $(NOVELLLIBC)/include/winsock/IPV6$(DL)>> $@
|
||||
endif
|
||||
@echo $(DL)-l $(NOVELLLIBC)/imports$(DL)>> $@
|
||||
ifneq "$(LDAPSDK)" ""
|
||||
@echo $(DL)-l $(LDAPSDK)/imports$(DL)>> $@
|
||||
endif
|
||||
@echo $(DL)-nodefaults$(DL)>> $@
|
||||
@echo $(DL)-map $(OBJDIR)/$(NLM_NAME).map$(DL)>> $@
|
||||
ifneq "$(strip $(XLFLAGS))" ""
|
||||
@echo $(DL)$(XLFLAGS)$(DL)>> $@
|
||||
endif
|
||||
ifneq "$(strip $(FILES_nlm_objs))" ""
|
||||
@echo $(DL)$(foreach objfile,$(strip $(FILES_nlm_objs)),$(objfile))$(DL)>> $@
|
||||
endif
|
||||
ifneq "$(FILES_nlm_libs)" ""
|
||||
@echo $(DL)$(foreach libfile, $(notdir $(strip $(FILES_nlm_libs))),-l$(libfile))$(DL)>> $@
|
||||
endif
|
||||
@echo $(DL)-commandfile $(@:.opt=.def)$(DL)>> $@
|
||||
@echo $(DL)# Do not edit this file - it is created by make!$(DL)> $(@:.opt=.def)
|
||||
@echo $(DL)# All your changes will be lost!!$(DL)>> $(@:.opt=.def)
|
||||
ifneq "$(FILE_nlm_msg)" ""
|
||||
@echo $(DL)Messages $(FILE_nlm_msg)$(DL)>> $(@:.opt=.def)
|
||||
endif
|
||||
ifneq "$(FILE_nlm_hlp)" ""
|
||||
@echo $(DL)Help $(FILE_nlm_hlp)$(DL)>> $(@:.opt=.def)
|
||||
endif
|
||||
ifeq "$(FILE_nlm_copyright)" ""
|
||||
@echo $(DL)copyright "$(NLM_COPYRIGHT)"$(DL)>> $(@:.opt=.def)
|
||||
endif
|
||||
@echo $(DL)description "$(NLM_DESCRIPTION)"$(DL)>> $(@:.opt=.def)
|
||||
@echo $(DL)threadname "$(NLM_THREAD_NAME)"$(DL)>> $(@:.opt=.def)
|
||||
@echo $(DL)screenname "$(NLM_SCREEN_NAME)"$(DL)>> $(@:.opt=.def)
|
||||
@echo $(DL)stacksize $(subst K,000,$(subst k,K,$(strip $(NLM_STACK_SIZE))))$(DL)>> $(@:.opt=.def)
|
||||
@echo $(DL)version $(NLM_VERSION) $(DL)>> $(@:.opt=.def)
|
||||
@echo $(DL)$(strip $(NLM_FLAGS))$(DL)>> $(@:.opt=.def)
|
||||
@echo $(DL)start $(NLM_ENTRY_SYM)$(DL)>> $(@:.opt=.def)
|
||||
@echo $(DL)exit $(NLM_EXIT_SYM)$(DL)>> $(@:.opt=.def)
|
||||
ifneq "$(NLM_CHECK_SYM)" ""
|
||||
@echo $(DL)check $(NLM_CHECK_SYM)$(DL)>> $(@:.opt=.def)
|
||||
endif
|
||||
ifneq "$(FILES_nlm_modules)" ""
|
||||
@echo $(DL)module $(foreach module,$(subst $(SPACE),$(COMMA),$(strip $(FILES_nlm_modules))),$(module))$(DL)>> $(@:.opt=.def)
|
||||
endif
|
||||
ifneq "$(FILES_nlm_Ximports)" ""
|
||||
@echo $(DL)import $(foreach import,$(subst $(SPACE),$(COMMA),$(strip $(FILES_nlm_Ximports))),$(import))$(DL)>> $(@:.opt=.def)
|
||||
endif
|
||||
ifneq "$(FILES_nlm_exports)" ""
|
||||
@echo $(DL)export $(foreach export,$(subst $(SPACE),$(COMMA),$(strip $(FILES_nlm_exports))),$(export))$(DL)>> $(@:.opt=.def)
|
||||
endif
|
||||
# if APACHE_UNIPROC is defined, don't include XDCData
|
||||
ifndef APACHE_UNIPROC
|
||||
ifneq "$(string $(XDCDATA))" ""
|
||||
@echo $(DL)xdcdata $(XDCDATA)$(DL)>> $(@:.opt=.def)
|
||||
else
|
||||
@echo $(DL)xdcdata apr.xdc$(DL)>> $(@:.opt=.def)
|
||||
endif
|
||||
endif
|
||||
|
||||
else # more than one target so look for individual makefiles.
|
||||
|
||||
# Only include these if NO_LICENSE_FILE isn't set to prevent excessive
|
||||
# recursion
|
||||
|
||||
ifndef NO_LICENSE_FILE
|
||||
|
||||
$(OBJDIR)/%.nlm: NWGNU% $(APRBUILD)/NWGNUhead.inc $(APRBUILD)/NWGNUtail.inc $(APRBUILD)/NWGNUenvironment.inc $(CUSTOM_INI) $(VERSION_INC) FORCE
|
||||
@echo $(DL)Calling $<$(DL)
|
||||
$(MAKE) -f $< $(MAKECMDGOALS) RELEASE=$(RELEASE)
|
||||
@$(ECHONL)
|
||||
|
||||
else
|
||||
|
||||
$(TARGET_nlm):
|
||||
|
||||
endif # NO_LICENSE_FILE
|
||||
|
||||
endif # multiple targets
|
||||
|
||||
$(INSTDIRS) ::
|
||||
$(call MKDIR,$@)
|
||||
|
||||
|
||||
+130
@@ -0,0 +1,130 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You 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.
|
||||
#
|
||||
#
|
||||
# Look for program[s] somewhere in $PATH.
|
||||
#
|
||||
# Options:
|
||||
# -s
|
||||
# Do not print out full pathname. (silent)
|
||||
# -pPATHNAME
|
||||
# Look in PATHNAME instead of $PATH
|
||||
#
|
||||
# Usage:
|
||||
# PrintPath [-s] [-pPATHNAME] program [program ...]
|
||||
#
|
||||
# Initially written by Jim Jagielski for the Apache configuration mechanism
|
||||
# (with kudos to Kernighan/Pike)
|
||||
|
||||
##
|
||||
# Some "constants"
|
||||
##
|
||||
pathname=$PATH
|
||||
echo="yes"
|
||||
|
||||
##
|
||||
# Find out what OS we are running for later on
|
||||
##
|
||||
os=`(uname) 2>/dev/null`
|
||||
|
||||
##
|
||||
# Parse command line
|
||||
##
|
||||
for args in $*
|
||||
do
|
||||
case $args in
|
||||
-s ) echo="no" ;;
|
||||
-p* ) pathname="`echo $args | sed 's/^..//'`" ;;
|
||||
* ) programs="$programs $args" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
##
|
||||
# Now we make the adjustments required for OS/2 and everyone
|
||||
# else :)
|
||||
#
|
||||
# First of all, all OS/2 programs have the '.exe' extension.
|
||||
# Next, we adjust PATH (or what was given to us as PATH) to
|
||||
# be whitespace separated directories.
|
||||
# Finally, we try to determine the best flag to use for
|
||||
# test/[] to look for an executable file. OS/2 just has '-r'
|
||||
# but with other OSs, we do some funny stuff to check to see
|
||||
# if test/[] knows about -x, which is the prefered flag.
|
||||
##
|
||||
|
||||
if [ "x$os" = "xOS/2" ]
|
||||
then
|
||||
ext=".exe"
|
||||
pathname=`echo -E $pathname |
|
||||
sed 's/^;/.;/
|
||||
s/;;/;.;/g
|
||||
s/;$/;./
|
||||
s/;/ /g
|
||||
s/\\\\/\\//g' `
|
||||
test_exec_flag="-r"
|
||||
else
|
||||
ext="" # No default extensions
|
||||
pathname=`echo $pathname |
|
||||
sed 's/^:/.:/
|
||||
s/::/:.:/g
|
||||
s/:$/:./
|
||||
s/:/ /g' `
|
||||
# Here is how we test to see if test/[] can handle -x
|
||||
testfile="pp.t.$$"
|
||||
|
||||
cat > $testfile <<ENDTEST
|
||||
#!/bin/sh
|
||||
if [ -x / ] || [ -x /bin ] || [ -x /bin/ls ]; then
|
||||
exit 0
|
||||
fi
|
||||
exit 1
|
||||
ENDTEST
|
||||
|
||||
if `/bin/sh $testfile 2>/dev/null`; then
|
||||
test_exec_flag="-x"
|
||||
else
|
||||
test_exec_flag="-r"
|
||||
fi
|
||||
rm -f $testfile
|
||||
fi
|
||||
|
||||
for program in $programs
|
||||
do
|
||||
for path in $pathname
|
||||
do
|
||||
if [ $test_exec_flag $path/${program}${ext} ] && \
|
||||
[ ! -d $path/${program}${ext} ]; then
|
||||
if [ "x$echo" = "xyes" ]; then
|
||||
echo $path/${program}${ext}
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Next try without extension (if one was used above)
|
||||
if [ "x$ext" != "x" ]; then
|
||||
if [ $test_exec_flag $path/${program} ] && \
|
||||
[ ! -d $path/${program} ]; then
|
||||
if [ "x$echo" = "xyes" ]; then
|
||||
echo $path/${program}
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
done
|
||||
done
|
||||
exit 1
|
||||
|
||||
+750
@@ -0,0 +1,750 @@
|
||||
/* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You 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 <stdio.h>
|
||||
#include <process.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
|
||||
typedef char bool;
|
||||
#define false 0
|
||||
#define true (!false)
|
||||
|
||||
bool silent = false;
|
||||
bool shared = false;
|
||||
bool export_all = false;
|
||||
enum mode_t { mCompile, mLink, mInstall };
|
||||
enum output_type_t { otGeneral, otObject, otProgram, otStaticLibrary, otDynamicLibrary };
|
||||
|
||||
#ifdef __EMX__
|
||||
# define SHELL_CMD "sh"
|
||||
# define CC "gcc"
|
||||
# define GEN_EXPORTS "emxexp"
|
||||
# define DEF2IMPLIB_CMD "emximp"
|
||||
# define SHARE_SW "-Zdll -Zmtd"
|
||||
# define USE_OMF true
|
||||
# define TRUNCATE_DLL_NAME
|
||||
# define DYNAMIC_LIB_EXT "dll"
|
||||
# define EXE_EXT ".exe"
|
||||
|
||||
# if USE_OMF
|
||||
/* OMF is the native format under OS/2 */
|
||||
# define STATIC_LIB_EXT "lib"
|
||||
# define OBJECT_EXT "obj"
|
||||
# define LIBRARIAN "emxomfar"
|
||||
# else
|
||||
/* but the alternative, a.out, can fork() which is sometimes necessary */
|
||||
# define STATIC_LIB_EXT "a"
|
||||
# define OBJECT_EXT "o"
|
||||
# define LIBRARIAN "ar"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct {
|
||||
char *arglist[1024];
|
||||
int num_args;
|
||||
enum mode_t mode;
|
||||
enum output_type_t output_type;
|
||||
char *output_name;
|
||||
char *stub_name;
|
||||
char *tmp_dirs[1024];
|
||||
int num_tmp_dirs;
|
||||
char *obj_files[1024];
|
||||
int num_obj_files;
|
||||
} cmd_data_t;
|
||||
|
||||
void parse_args(int argc, char *argv[], cmd_data_t *cmd_data);
|
||||
bool parse_long_opt(char *arg, cmd_data_t *cmd_data);
|
||||
int parse_short_opt(char *arg, cmd_data_t *cmd_data);
|
||||
bool parse_input_file_name(char *arg, cmd_data_t *cmd_data);
|
||||
bool parse_output_file_name(char *arg, cmd_data_t *cmd_data);
|
||||
void post_parse_fixup(cmd_data_t *cmd_data);
|
||||
bool explode_static_lib(char *lib, cmd_data_t *cmd_data);
|
||||
int execute_command(cmd_data_t *cmd_data);
|
||||
char *shell_esc(const char *str);
|
||||
void cleanup_tmp_dirs(cmd_data_t *cmd_data);
|
||||
void generate_def_file(cmd_data_t *cmd_data);
|
||||
char *nameof(char *fullpath);
|
||||
char *truncate_dll_name(char *path);
|
||||
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int rc;
|
||||
cmd_data_t cmd_data;
|
||||
|
||||
memset(&cmd_data, 0, sizeof(cmd_data));
|
||||
cmd_data.mode = mCompile;
|
||||
cmd_data.output_type = otGeneral;
|
||||
|
||||
parse_args(argc, argv, &cmd_data);
|
||||
rc = execute_command(&cmd_data);
|
||||
|
||||
if (rc == 0 && cmd_data.stub_name) {
|
||||
fopen(cmd_data.stub_name, "w");
|
||||
}
|
||||
|
||||
cleanup_tmp_dirs(&cmd_data);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void parse_args(int argc, char *argv[], cmd_data_t *cmd_data)
|
||||
{
|
||||
int a;
|
||||
char *arg;
|
||||
bool argused;
|
||||
|
||||
for (a=1; a < argc; a++) {
|
||||
arg = argv[a];
|
||||
argused = false;
|
||||
|
||||
if (arg[0] == '-') {
|
||||
if (arg[1] == '-') {
|
||||
argused = parse_long_opt(arg + 2, cmd_data);
|
||||
} else if (arg[1] == 'o' && a+1 < argc) {
|
||||
cmd_data->arglist[cmd_data->num_args++] = arg;
|
||||
arg = argv[++a];
|
||||
argused = parse_output_file_name(arg, cmd_data);
|
||||
} else {
|
||||
int num_used = parse_short_opt(arg + 1, cmd_data);
|
||||
argused = num_used > 0;
|
||||
|
||||
if (num_used > 1) {
|
||||
a += num_used - 1;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
argused = parse_input_file_name(arg, cmd_data);
|
||||
}
|
||||
|
||||
if (!argused) {
|
||||
cmd_data->arglist[cmd_data->num_args++] = arg;
|
||||
}
|
||||
}
|
||||
|
||||
post_parse_fixup(cmd_data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool parse_long_opt(char *arg, cmd_data_t *cmd_data)
|
||||
{
|
||||
char *equal_pos = strchr(arg, '=');
|
||||
char var[50];
|
||||
char value[500];
|
||||
|
||||
if (equal_pos) {
|
||||
strncpy(var, arg, equal_pos - arg);
|
||||
var[equal_pos - arg] = 0;
|
||||
strcpy(value, equal_pos + 1);
|
||||
} else {
|
||||
strcpy(var, arg);
|
||||
}
|
||||
|
||||
if (strcmp(var, "silent") == 0) {
|
||||
silent = true;
|
||||
} else if (strcmp(var, "mode") == 0) {
|
||||
if (strcmp(value, "compile") == 0) {
|
||||
cmd_data->mode = mCompile;
|
||||
cmd_data->output_type = otObject;
|
||||
}
|
||||
|
||||
if (strcmp(value, "link") == 0) {
|
||||
cmd_data->mode = mLink;
|
||||
}
|
||||
|
||||
if (strcmp(value, "install") == 0) {
|
||||
cmd_data->mode = mInstall;
|
||||
}
|
||||
} else if (strcmp(var, "shared") == 0) {
|
||||
shared = true;
|
||||
} else if (strcmp(var, "export-all") == 0) {
|
||||
export_all = true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int parse_short_opt(char *arg, cmd_data_t *cmd_data)
|
||||
{
|
||||
if (strcmp(arg, "export-dynamic") == 0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (strcmp(arg, "module") == 0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (strcmp(arg, "Zexe") == 0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (strcmp(arg, "avoid-version") == 0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (strcmp(arg, "prefer-pic") == 0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (strcmp(arg, "prefer-non-pic") == 0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (strcmp(arg, "version-info") == 0 ) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
if (strcmp(arg, "no-install") == 0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool parse_input_file_name(char *arg, cmd_data_t *cmd_data)
|
||||
{
|
||||
char *ext = strrchr(arg, '.');
|
||||
char *name = strrchr(arg, '/');
|
||||
char *newarg;
|
||||
|
||||
if (!ext) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ext++;
|
||||
|
||||
if (name == NULL) {
|
||||
name = strrchr(arg, '\\');
|
||||
|
||||
if (name == NULL) {
|
||||
name = arg;
|
||||
} else {
|
||||
name++;
|
||||
}
|
||||
} else {
|
||||
name++;
|
||||
}
|
||||
|
||||
if (strcmp(ext, "lo") == 0) {
|
||||
newarg = (char *)malloc(strlen(arg) + 10);
|
||||
strcpy(newarg, arg);
|
||||
strcpy(newarg + (ext - arg), OBJECT_EXT);
|
||||
cmd_data->arglist[cmd_data->num_args++] = newarg;
|
||||
cmd_data->obj_files[cmd_data->num_obj_files++] = newarg;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (strcmp(ext, "la") == 0) {
|
||||
newarg = (char *)malloc(strlen(arg) + 10);
|
||||
strcpy(newarg, arg);
|
||||
newarg[pathlen] = 0;
|
||||
strcat(newarg, ".libs/");
|
||||
|
||||
if (strncmp(name, "lib", 3) == 0) {
|
||||
name += 3;
|
||||
}
|
||||
|
||||
strcat(newarg, name);
|
||||
ext = strrchr(newarg, '.') + 1;
|
||||
|
||||
if (shared && cmd_data->mode == mInstall) {
|
||||
strcpy(ext, DYNAMIC_LIB_EXT);
|
||||
newarg = truncate_dll_name(newarg);
|
||||
} else {
|
||||
strcpy(ext, STATIC_LIB_EXT);
|
||||
}
|
||||
|
||||
cmd_data->arglist[cmd_data->num_args++] = newarg;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (strcmp(ext, "c") == 0) {
|
||||
if (cmd_data->stub_name == NULL) {
|
||||
cmd_data->stub_name = (char *)malloc(strlen(arg) + 4);
|
||||
strcpy(cmd_data->stub_name, arg);
|
||||
strcpy(strrchr(cmd_data->stub_name, '.') + 1, "lo");
|
||||
}
|
||||
}
|
||||
|
||||
if (strcmp(name, CC) == 0 || strcmp(name, CC EXE_EXT) == 0) {
|
||||
if (cmd_data->output_type == otGeneral) {
|
||||
cmd_data->output_type = otObject;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool parse_output_file_name(char *arg, cmd_data_t *cmd_data)
|
||||
{
|
||||
char *name = strrchr(arg, '/');
|
||||
char *ext = strrchr(arg, '.');
|
||||
char *newarg = NULL, *newext;
|
||||
|
||||
if (name == NULL) {
|
||||
name = strrchr(arg, '\\');
|
||||
|
||||
if (name == NULL) {
|
||||
name = arg;
|
||||
} else {
|
||||
name++;
|
||||
}
|
||||
} else {
|
||||
name++;
|
||||
}
|
||||
|
||||
if (!ext) {
|
||||
cmd_data->stub_name = arg;
|
||||
cmd_data->output_type = otProgram;
|
||||
newarg = (char *)malloc(strlen(arg) + 5);
|
||||
strcpy(newarg, arg);
|
||||
strcat(newarg, EXE_EXT);
|
||||
cmd_data->arglist[cmd_data->num_args++] = newarg;
|
||||
cmd_data->output_name = newarg;
|
||||
return true;
|
||||
}
|
||||
|
||||
ext++;
|
||||
|
||||
if (strcmp(ext, "la") == 0) {
|
||||
cmd_data->stub_name = arg;
|
||||
cmd_data->output_type = shared ? otDynamicLibrary : otStaticLibrary;
|
||||
newarg = (char *)malloc(strlen(arg) + 10);
|
||||
mkdir(".libs", 0);
|
||||
strcpy(newarg, ".libs/");
|
||||
|
||||
if (strncmp(arg, "lib", 3) == 0) {
|
||||
arg += 3;
|
||||
}
|
||||
|
||||
strcat(newarg, arg);
|
||||
newext = strrchr(newarg, '.') + 1;
|
||||
strcpy(newext, shared ? DYNAMIC_LIB_EXT : STATIC_LIB_EXT);
|
||||
|
||||
#ifdef TRUNCATE_DLL_NAME
|
||||
if (shared) {
|
||||
newarg = truncate_dll_name(newarg);
|
||||
}
|
||||
#endif
|
||||
|
||||
cmd_data->arglist[cmd_data->num_args++] = newarg;
|
||||
cmd_data->output_name = newarg;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (strcmp(ext, "lo") == 0) {
|
||||
cmd_data->stub_name = arg;
|
||||
cmd_data->output_type = otObject;
|
||||
newarg = (char *)malloc(strlen(arg) + 2);
|
||||
strcpy(newarg, arg);
|
||||
ext = strrchr(newarg, '.') + 1;
|
||||
strcpy(ext, OBJECT_EXT);
|
||||
cmd_data->arglist[cmd_data->num_args++] = newarg;
|
||||
cmd_data->output_name = newarg;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void post_parse_fixup(cmd_data_t *cmd_data)
|
||||
{
|
||||
int a;
|
||||
char *arg;
|
||||
char *ext;
|
||||
|
||||
if (cmd_data->output_type == otStaticLibrary && cmd_data->mode == mLink) {
|
||||
/* We do a real hatchet job on the args when making a static library
|
||||
* removing all compiler switches & any other cruft that ar won't like
|
||||
* We also need to explode any libraries listed
|
||||
*/
|
||||
|
||||
for (a=0; a < cmd_data->num_args; a++) {
|
||||
arg = cmd_data->arglist[a];
|
||||
|
||||
if (arg) {
|
||||
ext = strrchr(arg, '.');
|
||||
|
||||
if (ext) {
|
||||
ext++;
|
||||
}
|
||||
|
||||
if (arg[0] == '-') {
|
||||
cmd_data->arglist[a] = NULL;
|
||||
|
||||
if (strcmp(arg, "-rpath") == 0 && a+1 < cmd_data->num_args) {
|
||||
cmd_data->arglist[a+1] = NULL;
|
||||
}
|
||||
|
||||
if (strcmp(arg, "-R") == 0 && a+1 < cmd_data->num_args) {
|
||||
cmd_data->arglist[a+1] = NULL;
|
||||
}
|
||||
|
||||
if (strcmp(arg, "-version-info") == 0 && a+1 < cmd_data->num_args) {
|
||||
cmd_data->arglist[a+1] = NULL;
|
||||
}
|
||||
|
||||
if (strcmp(arg, "-Zstack") == 0 && a+1 < cmd_data->num_args) {
|
||||
cmd_data->arglist[a+1] = NULL;
|
||||
}
|
||||
|
||||
if (strcmp(arg, "-o") == 0) {
|
||||
a++;
|
||||
}
|
||||
}
|
||||
|
||||
if (strcmp(arg, CC) == 0 || strcmp(arg, CC EXE_EXT) == 0) {
|
||||
cmd_data->arglist[a] = LIBRARIAN " cr";
|
||||
}
|
||||
|
||||
if (ext) {
|
||||
if (strcmp(ext, "h") == 0 || strcmp(ext, "c") == 0) {
|
||||
/* ignore source files, they don't belong in a library */
|
||||
cmd_data->arglist[a] = NULL;
|
||||
}
|
||||
|
||||
if (strcmp(ext, STATIC_LIB_EXT) == 0) {
|
||||
cmd_data->arglist[a] = NULL;
|
||||
explode_static_lib(arg, cmd_data);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (cmd_data->output_type == otDynamicLibrary) {
|
||||
for (a=0; a < cmd_data->num_args; a++) {
|
||||
arg = cmd_data->arglist[a];
|
||||
|
||||
if (arg) {
|
||||
if (strcmp(arg, "-rpath") == 0 && a+1 < cmd_data->num_args) {
|
||||
cmd_data->arglist[a] = NULL;
|
||||
cmd_data->arglist[a+1] = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (export_all) {
|
||||
generate_def_file(cmd_data);
|
||||
}
|
||||
}
|
||||
|
||||
#if USE_OMF
|
||||
if (cmd_data->output_type == otObject ||
|
||||
cmd_data->output_type == otProgram ||
|
||||
cmd_data->output_type == otDynamicLibrary) {
|
||||
cmd_data->arglist[cmd_data->num_args++] = "-Zomf";
|
||||
}
|
||||
#endif
|
||||
|
||||
if (shared && (cmd_data->output_type == otObject || cmd_data->output_type == otDynamicLibrary)) {
|
||||
cmd_data->arglist[cmd_data->num_args++] = SHARE_SW;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
int execute_command(cmd_data_t *cmd_data)
|
||||
{
|
||||
int target = 0;
|
||||
char *command;
|
||||
int a, total_len = 0;
|
||||
char *args[4];
|
||||
|
||||
for (a=0; a < cmd_data->num_args; a++) {
|
||||
if (cmd_data->arglist[a]) {
|
||||
total_len += strlen(cmd_data->arglist[a]) + 1;
|
||||
}
|
||||
}
|
||||
|
||||
command = (char *)malloc( total_len );
|
||||
command[0] = 0;
|
||||
|
||||
for (a=0; a < cmd_data->num_args; a++) {
|
||||
if (cmd_data->arglist[a]) {
|
||||
strcat(command, cmd_data->arglist[a]);
|
||||
strcat(command, " ");
|
||||
}
|
||||
}
|
||||
|
||||
command[strlen(command)-1] = 0;
|
||||
|
||||
if (!silent) {
|
||||
puts(command);
|
||||
}
|
||||
|
||||
cmd_data->num_args = target;
|
||||
cmd_data->arglist[cmd_data->num_args] = NULL;
|
||||
command = shell_esc(command);
|
||||
|
||||
args[0] = SHELL_CMD;
|
||||
args[1] = "-c";
|
||||
args[2] = command;
|
||||
args[3] = NULL;
|
||||
return spawnvp(P_WAIT, args[0], args);
|
||||
}
|
||||
|
||||
|
||||
|
||||
char *shell_esc(const char *str)
|
||||
{
|
||||
char *cmd;
|
||||
unsigned char *d;
|
||||
const unsigned char *s;
|
||||
|
||||
cmd = (char *)malloc(2 * strlen(str) + 1);
|
||||
d = (unsigned char *)cmd;
|
||||
s = (const unsigned char *)str;
|
||||
|
||||
for (; *s; ++s) {
|
||||
if (*s == '"' || *s == '\\') {
|
||||
*d++ = '\\';
|
||||
}
|
||||
*d++ = *s;
|
||||
}
|
||||
|
||||
*d = '\0';
|
||||
return cmd;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool explode_static_lib(char *lib, cmd_data_t *cmd_data)
|
||||
{
|
||||
char tmpdir[1024];
|
||||
char savewd[1024];
|
||||
char cmd[1024];
|
||||
char *name;
|
||||
DIR *dir;
|
||||
struct dirent *entry;
|
||||
|
||||
strcpy(tmpdir, lib);
|
||||
strcat(tmpdir, ".exploded");
|
||||
|
||||
mkdir(tmpdir, 0);
|
||||
cmd_data->tmp_dirs[cmd_data->num_tmp_dirs++] = strdup(tmpdir);
|
||||
getcwd(savewd, sizeof(savewd));
|
||||
|
||||
if (chdir(tmpdir) != 0)
|
||||
return false;
|
||||
|
||||
strcpy(cmd, LIBRARIAN " x ");
|
||||
name = strrchr(lib, '/');
|
||||
|
||||
if (name) {
|
||||
name++;
|
||||
} else {
|
||||
name = lib;
|
||||
}
|
||||
|
||||
strcat(cmd, "../");
|
||||
strcat(cmd, name);
|
||||
system(cmd);
|
||||
chdir(savewd);
|
||||
dir = opendir(tmpdir);
|
||||
|
||||
while ((entry = readdir(dir)) != NULL) {
|
||||
if (entry->d_name[0] != '.') {
|
||||
strcpy(cmd, tmpdir);
|
||||
strcat(cmd, "/");
|
||||
strcat(cmd, entry->d_name);
|
||||
cmd_data->arglist[cmd_data->num_args++] = strdup(cmd);
|
||||
}
|
||||
}
|
||||
|
||||
closedir(dir);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void cleanup_tmp_dir(char *dirname)
|
||||
{
|
||||
DIR *dir;
|
||||
struct dirent *entry;
|
||||
char fullname[1024];
|
||||
|
||||
dir = opendir(dirname);
|
||||
|
||||
if (dir == NULL)
|
||||
return;
|
||||
|
||||
while ((entry = readdir(dir)) != NULL) {
|
||||
if (entry->d_name[0] != '.') {
|
||||
strcpy(fullname, dirname);
|
||||
strcat(fullname, "/");
|
||||
strcat(fullname, entry->d_name);
|
||||
remove(fullname);
|
||||
}
|
||||
}
|
||||
|
||||
rmdir(dirname);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void cleanup_tmp_dirs(cmd_data_t *cmd_data)
|
||||
{
|
||||
int d;
|
||||
|
||||
for (d=0; d < cmd_data->num_tmp_dirs; d++) {
|
||||
cleanup_tmp_dir(cmd_data->tmp_dirs[d]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void generate_def_file(cmd_data_t *cmd_data)
|
||||
{
|
||||
char def_file[1024];
|
||||
char implib_file[1024];
|
||||
char *ext;
|
||||
FILE *hDef;
|
||||
char *export_args[1024];
|
||||
int num_export_args = 0;
|
||||
char *cmd;
|
||||
int cmd_size = 0;
|
||||
int a;
|
||||
|
||||
if (cmd_data->output_name) {
|
||||
strcpy(def_file, cmd_data->output_name);
|
||||
strcat(def_file, ".def");
|
||||
hDef = fopen(def_file, "w");
|
||||
|
||||
if (hDef != NULL) {
|
||||
fprintf(hDef, "LIBRARY '%s' INITINSTANCE\n", nameof(cmd_data->output_name));
|
||||
fprintf(hDef, "DATA NONSHARED\n");
|
||||
fprintf(hDef, "EXPORTS\n");
|
||||
fclose(hDef);
|
||||
|
||||
for (a=0; a < cmd_data->num_obj_files; a++) {
|
||||
cmd_size += strlen(cmd_data->obj_files[a]) + 1;
|
||||
}
|
||||
|
||||
cmd_size += strlen(GEN_EXPORTS) + strlen(def_file) + 3;
|
||||
cmd = (char *)malloc(cmd_size);
|
||||
strcpy(cmd, GEN_EXPORTS);
|
||||
|
||||
for (a=0; a < cmd_data->num_obj_files; a++) {
|
||||
strcat(cmd, " ");
|
||||
strcat(cmd, cmd_data->obj_files[a] );
|
||||
}
|
||||
|
||||
strcat(cmd, ">>");
|
||||
strcat(cmd, def_file);
|
||||
puts(cmd);
|
||||
export_args[num_export_args++] = SHELL_CMD;
|
||||
export_args[num_export_args++] = "-c";
|
||||
export_args[num_export_args++] = cmd;
|
||||
export_args[num_export_args++] = NULL;
|
||||
spawnvp(P_WAIT, export_args[0], export_args);
|
||||
cmd_data->arglist[cmd_data->num_args++] = strdup(def_file);
|
||||
|
||||
/* Now make an import library for the dll */
|
||||
num_export_args = 0;
|
||||
export_args[num_export_args++] = DEF2IMPLIB_CMD;
|
||||
export_args[num_export_args++] = "-o";
|
||||
|
||||
strcpy(implib_file, ".libs/");
|
||||
strcat(implib_file, cmd_data->stub_name);
|
||||
ext = strrchr(implib_file, '.');
|
||||
|
||||
if (ext)
|
||||
*ext = 0;
|
||||
|
||||
strcat(implib_file, ".");
|
||||
strcat(implib_file, STATIC_LIB_EXT);
|
||||
|
||||
export_args[num_export_args++] = implib_file;
|
||||
export_args[num_export_args++] = def_file;
|
||||
export_args[num_export_args++] = NULL;
|
||||
spawnvp(P_WAIT, export_args[0], export_args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* returns just a file's name without path or extension */
|
||||
char *nameof(char *fullpath)
|
||||
{
|
||||
char buffer[1024];
|
||||
char *ext;
|
||||
char *name = strrchr(fullpath, '/');
|
||||
|
||||
if (name == NULL) {
|
||||
name = strrchr(fullpath, '\\');
|
||||
}
|
||||
|
||||
if (name == NULL) {
|
||||
name = fullpath;
|
||||
} else {
|
||||
name++;
|
||||
}
|
||||
|
||||
strcpy(buffer, name);
|
||||
ext = strrchr(buffer, '.');
|
||||
|
||||
if (ext) {
|
||||
*ext = 0;
|
||||
return strdup(buffer);
|
||||
}
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
|
||||
char *truncate_dll_name(char *path)
|
||||
{
|
||||
/* Cut DLL name down to 8 characters after removing any mod_ prefix */
|
||||
char *tmppath = strdup(path);
|
||||
char *newname = strrchr(tmppath, '/') + 1;
|
||||
char *ext = strrchr(tmppath, '.');
|
||||
int len;
|
||||
|
||||
if (ext == NULL)
|
||||
return tmppath;
|
||||
|
||||
len = ext - newname;
|
||||
|
||||
if (strncmp(newname, "mod_", 4) == 0) {
|
||||
strcpy(newname, newname + 4);
|
||||
len -= 4;
|
||||
}
|
||||
|
||||
if (len > 8) {
|
||||
strcpy(newname + 8, strchr(newname, '.'));
|
||||
}
|
||||
|
||||
return tmppath;
|
||||
}
|
||||
+990
@@ -0,0 +1,990 @@
|
||||
dnl -------------------------------------------------------- -*- autoconf -*-
|
||||
dnl Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
dnl contributor license agreements. See the NOTICE file distributed with
|
||||
dnl this work for additional information regarding copyright ownership.
|
||||
dnl The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
dnl (the "License"); you may not use this file except in compliance with
|
||||
dnl the License. You may obtain a copy of the License at
|
||||
dnl
|
||||
dnl http://www.apache.org/licenses/LICENSE-2.0
|
||||
dnl
|
||||
dnl Unless required by applicable law or agreed to in writing, software
|
||||
dnl distributed under the License is distributed on an "AS IS" BASIS,
|
||||
dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
dnl See the License for the specific language governing permissions and
|
||||
dnl limitations under the License.
|
||||
|
||||
dnl
|
||||
dnl apr_common.m4: APR's general-purpose autoconf macros
|
||||
dnl
|
||||
|
||||
dnl
|
||||
dnl APR_CONFIG_NICE(filename)
|
||||
dnl
|
||||
dnl Saves a snapshot of the configure command-line for later reuse
|
||||
dnl
|
||||
AC_DEFUN([APR_CONFIG_NICE], [
|
||||
rm -f $1
|
||||
cat >$1<<EOF
|
||||
#! /bin/sh
|
||||
#
|
||||
# Created by configure
|
||||
|
||||
EOF
|
||||
if test -n "$CC"; then
|
||||
echo "CC=\"$CC\"; export CC" >> $1
|
||||
fi
|
||||
if test -n "$CFLAGS"; then
|
||||
echo "CFLAGS=\"$CFLAGS\"; export CFLAGS" >> $1
|
||||
fi
|
||||
if test -n "$CPPFLAGS"; then
|
||||
echo "CPPFLAGS=\"$CPPFLAGS\"; export CPPFLAGS" >> $1
|
||||
fi
|
||||
if test -n "$LDFLAGS"; then
|
||||
echo "LDFLAGS=\"$LDFLAGS\"; export LDFLAGS" >> $1
|
||||
fi
|
||||
if test -n "$LTFLAGS"; then
|
||||
echo "LTFLAGS=\"$LTFLAGS\"; export LTFLAGS" >> $1
|
||||
fi
|
||||
if test -n "$LIBS"; then
|
||||
echo "LIBS=\"$LIBS\"; export LIBS" >> $1
|
||||
fi
|
||||
if test -n "$INCLUDES"; then
|
||||
echo "INCLUDES=\"$INCLUDES\"; export INCLUDES" >> $1
|
||||
fi
|
||||
if test -n "$NOTEST_CFLAGS"; then
|
||||
echo "NOTEST_CFLAGS=\"$NOTEST_CFLAGS\"; export NOTEST_CFLAGS" >> $1
|
||||
fi
|
||||
if test -n "$NOTEST_CPPFLAGS"; then
|
||||
echo "NOTEST_CPPFLAGS=\"$NOTEST_CPPFLAGS\"; export NOTEST_CPPFLAGS" >> $1
|
||||
fi
|
||||
if test -n "$NOTEST_LDFLAGS"; then
|
||||
echo "NOTEST_LDFLAGS=\"$NOTEST_LDFLAGS\"; export NOTEST_LDFLAGS" >> $1
|
||||
fi
|
||||
if test -n "$NOTEST_LIBS"; then
|
||||
echo "NOTEST_LIBS=\"$NOTEST_LIBS\"; export NOTEST_LIBS" >> $1
|
||||
fi
|
||||
|
||||
# Retrieve command-line arguments.
|
||||
eval "set x $[0] $ac_configure_args"
|
||||
shift
|
||||
|
||||
for arg
|
||||
do
|
||||
APR_EXPAND_VAR(arg, $arg)
|
||||
echo "\"[$]arg\" \\" >> $1
|
||||
done
|
||||
echo '"[$]@"' >> $1
|
||||
chmod +x $1
|
||||
])dnl
|
||||
|
||||
dnl APR_MKDIR_P_CHECK(fallback-mkdir-p)
|
||||
dnl checks whether mkdir -p works
|
||||
AC_DEFUN([APR_MKDIR_P_CHECK], [
|
||||
AC_CACHE_CHECK(for working mkdir -p, ac_cv_mkdir_p,[
|
||||
test -d conftestdir && rm -rf conftestdir
|
||||
mkdir -p conftestdir/somedir >/dev/null 2>&1
|
||||
if test -d conftestdir/somedir; then
|
||||
ac_cv_mkdir_p=yes
|
||||
else
|
||||
ac_cv_mkdir_p=no
|
||||
fi
|
||||
rm -rf conftestdir
|
||||
])
|
||||
if test "$ac_cv_mkdir_p" = "yes"; then
|
||||
mkdir_p="mkdir -p"
|
||||
else
|
||||
mkdir_p="$1"
|
||||
fi
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl APR_SUBDIR_CONFIG(dir [, sub-package-cmdline-args, args-to-drop])
|
||||
dnl
|
||||
dnl dir: directory to find configure in
|
||||
dnl sub-package-cmdline-args: arguments to add to the invocation (optional)
|
||||
dnl args-to-drop: arguments to drop from the invocation (optional)
|
||||
dnl
|
||||
dnl Note: This macro relies on ac_configure_args being set properly.
|
||||
dnl
|
||||
dnl The args-to-drop argument is shoved into a case statement, so
|
||||
dnl multiple arguments can be separated with a |.
|
||||
dnl
|
||||
dnl Note: Older versions of autoconf do not single-quote args, while 2.54+
|
||||
dnl places quotes around every argument. So, if you want to drop the
|
||||
dnl argument called --enable-layout, you must pass the third argument as:
|
||||
dnl [--enable-layout=*|\'--enable-layout=*]
|
||||
dnl
|
||||
dnl Trying to optimize this is left as an exercise to the reader who wants
|
||||
dnl to put up with more autoconf craziness. I give up.
|
||||
dnl
|
||||
AC_DEFUN([APR_SUBDIR_CONFIG], [
|
||||
# save our work to this point; this allows the sub-package to use it
|
||||
AC_CACHE_SAVE
|
||||
|
||||
echo "configuring package in $1 now"
|
||||
ac_popdir=`pwd`
|
||||
apr_config_subdirs="$1"
|
||||
test -d $1 || $mkdir_p $1
|
||||
ac_abs_srcdir=`(cd $srcdir/$1 && pwd)`
|
||||
cd $1
|
||||
|
||||
changequote(, )dnl
|
||||
# A "../" for each directory in /$config_subdirs.
|
||||
ac_dots=`echo $apr_config_subdirs|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
|
||||
changequote([, ])dnl
|
||||
|
||||
# Make the cache file pathname absolute for the subdirs
|
||||
# required to correctly handle subdirs that might actually
|
||||
# be symlinks
|
||||
case "$cache_file" in
|
||||
/*) # already absolute
|
||||
ac_sub_cache_file=$cache_file ;;
|
||||
*) # Was relative path.
|
||||
ac_sub_cache_file="$ac_popdir/$cache_file" ;;
|
||||
esac
|
||||
|
||||
ifelse($3, [], [apr_configure_args=$ac_configure_args],[
|
||||
apr_configure_args=
|
||||
apr_sep=
|
||||
for apr_configure_arg in $ac_configure_args
|
||||
do
|
||||
case "$apr_configure_arg" in
|
||||
$3)
|
||||
continue ;;
|
||||
esac
|
||||
apr_configure_args="$apr_configure_args$apr_sep'$apr_configure_arg'"
|
||||
apr_sep=" "
|
||||
done
|
||||
])
|
||||
|
||||
dnl autoconf doesn't add --silent to ac_configure_args; explicitly pass it
|
||||
test "x$silent" = "xyes" && apr_configure_args="$apr_configure_args --silent"
|
||||
|
||||
dnl AC_CONFIG_SUBDIRS silences option warnings, emulate this for 2.62
|
||||
apr_configure_args="--disable-option-checking $apr_configure_args"
|
||||
|
||||
dnl The eval makes quoting arguments work - specifically the second argument
|
||||
dnl where the quoting mechanisms used is "" rather than [].
|
||||
dnl
|
||||
dnl We need to execute another shell because some autoconf/shell combinations
|
||||
dnl will choke after doing repeated APR_SUBDIR_CONFIG()s. (Namely Solaris
|
||||
dnl and autoconf-2.54+)
|
||||
if eval $SHELL $ac_abs_srcdir/configure $apr_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_abs_srcdir $2
|
||||
then :
|
||||
echo "$1 configured properly"
|
||||
else
|
||||
echo "configure failed for $1"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd $ac_popdir
|
||||
|
||||
# grab any updates from the sub-package
|
||||
AC_CACHE_LOAD
|
||||
])dnl
|
||||
|
||||
dnl
|
||||
dnl APR_SAVE_THE_ENVIRONMENT(variable_name)
|
||||
dnl
|
||||
dnl Stores the variable (usually a Makefile macro) for later restoration
|
||||
dnl
|
||||
AC_DEFUN([APR_SAVE_THE_ENVIRONMENT], [
|
||||
apr_ste_save_$1="$$1"
|
||||
])dnl
|
||||
|
||||
dnl
|
||||
dnl APR_RESTORE_THE_ENVIRONMENT(variable_name, prefix_)
|
||||
dnl
|
||||
dnl Uses the previously saved variable content to figure out what configure
|
||||
dnl has added to the variable, moving the new bits to prefix_variable_name
|
||||
dnl and restoring the original variable contents. This makes it possible
|
||||
dnl for a user to override configure when it does something stupid.
|
||||
dnl
|
||||
AC_DEFUN([APR_RESTORE_THE_ENVIRONMENT], [
|
||||
dnl Check whether $apr_ste_save_$1 is empty or
|
||||
dnl only whitespace. The verbatim "X" is token number 1,
|
||||
dnl the following whitespace will be ignored.
|
||||
set X $apr_ste_save_$1
|
||||
if test ${#} -eq 1; then
|
||||
$2$1="$$1"
|
||||
$1=
|
||||
else
|
||||
if test "x$apr_ste_save_$1" = "x$$1"; then
|
||||
$2$1=
|
||||
else
|
||||
$2$1=`echo "$$1" | sed -e "s%${apr_ste_save_$1}%%"`
|
||||
$1="$apr_ste_save_$1"
|
||||
fi
|
||||
fi
|
||||
if test "x$silent" != "xyes"; then
|
||||
echo " restoring $1 to \"$$1\""
|
||||
echo " setting $2$1 to \"$$2$1\""
|
||||
fi
|
||||
AC_SUBST($2$1)
|
||||
])dnl
|
||||
|
||||
dnl
|
||||
dnl APR_SETIFNULL(variable, value)
|
||||
dnl
|
||||
dnl Set variable iff it's currently null
|
||||
dnl
|
||||
AC_DEFUN([APR_SETIFNULL], [
|
||||
if test -z "$$1"; then
|
||||
test "x$silent" != "xyes" && echo " setting $1 to \"$2\""
|
||||
$1="$2"
|
||||
fi
|
||||
])dnl
|
||||
|
||||
dnl
|
||||
dnl APR_SETVAR(variable, value)
|
||||
dnl
|
||||
dnl Set variable no matter what
|
||||
dnl
|
||||
AC_DEFUN([APR_SETVAR], [
|
||||
test "x$silent" != "xyes" && echo " forcing $1 to \"$2\""
|
||||
$1="$2"
|
||||
])dnl
|
||||
|
||||
dnl
|
||||
dnl APR_ADDTO(variable, value)
|
||||
dnl
|
||||
dnl Add value to variable
|
||||
dnl
|
||||
AC_DEFUN([APR_ADDTO], [
|
||||
if test "x$$1" = "x"; then
|
||||
test "x$silent" != "xyes" && echo " setting $1 to \"$2\""
|
||||
$1="$2"
|
||||
else
|
||||
apr_addto_bugger="$2"
|
||||
for i in $apr_addto_bugger; do
|
||||
apr_addto_duplicate="0"
|
||||
for j in $$1; do
|
||||
if test "x$i" = "x$j"; then
|
||||
apr_addto_duplicate="1"
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test $apr_addto_duplicate = "0"; then
|
||||
test "x$silent" != "xyes" && echo " adding \"$i\" to $1"
|
||||
$1="$$1 $i"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
])dnl
|
||||
|
||||
dnl
|
||||
dnl APR_REMOVEFROM(variable, value)
|
||||
dnl
|
||||
dnl Remove a value from a variable
|
||||
dnl
|
||||
AC_DEFUN([APR_REMOVEFROM], [
|
||||
if test "x$$1" = "x$2"; then
|
||||
test "x$silent" != "xyes" && echo " nulling $1"
|
||||
$1=""
|
||||
else
|
||||
apr_new_bugger=""
|
||||
apr_removed=0
|
||||
for i in $$1; do
|
||||
if test "x$i" != "x$2"; then
|
||||
apr_new_bugger="$apr_new_bugger $i"
|
||||
else
|
||||
apr_removed=1
|
||||
fi
|
||||
done
|
||||
if test $apr_removed = "1"; then
|
||||
test "x$silent" != "xyes" && echo " removed \"$2\" from $1"
|
||||
$1=$apr_new_bugger
|
||||
fi
|
||||
fi
|
||||
]) dnl
|
||||
|
||||
dnl
|
||||
dnl APR_CHECK_DEFINE_FILES( symbol, header_file [header_file ...] )
|
||||
dnl
|
||||
AC_DEFUN([APR_CHECK_DEFINE_FILES], [
|
||||
AC_CACHE_CHECK([for $1 in $2],ac_cv_define_$1,[
|
||||
ac_cv_define_$1=no
|
||||
for curhdr in $2
|
||||
do
|
||||
AC_EGREP_CPP(YES_IS_DEFINED, [
|
||||
#include <$curhdr>
|
||||
#ifdef $1
|
||||
YES_IS_DEFINED
|
||||
#endif
|
||||
], ac_cv_define_$1=yes)
|
||||
done
|
||||
])
|
||||
if test "$ac_cv_define_$1" = "yes"; then
|
||||
AC_DEFINE(HAVE_$1, 1, [Define if $1 is defined])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl
|
||||
dnl APR_CHECK_DEFINE(symbol, header_file)
|
||||
dnl
|
||||
AC_DEFUN([APR_CHECK_DEFINE], [
|
||||
AC_CACHE_CHECK([for $1 in $2],ac_cv_define_$1,[
|
||||
AC_EGREP_CPP(YES_IS_DEFINED, [
|
||||
#include <$2>
|
||||
#ifdef $1
|
||||
YES_IS_DEFINED
|
||||
#endif
|
||||
], ac_cv_define_$1=yes, ac_cv_define_$1=no)
|
||||
])
|
||||
if test "$ac_cv_define_$1" = "yes"; then
|
||||
AC_DEFINE(HAVE_$1, 1, [Define if $1 is defined in $2])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl APR_CHECK_APR_DEFINE( symbol )
|
||||
dnl
|
||||
AC_DEFUN([APR_CHECK_APR_DEFINE], [
|
||||
apr_old_cppflags=$CPPFLAGS
|
||||
CPPFLAGS="$CPPFLAGS $INCLUDES"
|
||||
AC_EGREP_CPP(YES_IS_DEFINED, [
|
||||
#include <apr.h>
|
||||
#if $1
|
||||
YES_IS_DEFINED
|
||||
#endif
|
||||
], ac_cv_define_$1=yes, ac_cv_define_$1=no)
|
||||
CPPFLAGS=$apr_old_cppflags
|
||||
])
|
||||
|
||||
dnl APR_CHECK_FILE(filename); set ac_cv_file_filename to
|
||||
dnl "yes" if 'filename' is readable, else "no".
|
||||
dnl @deprecated! - use AC_CHECK_FILE instead
|
||||
AC_DEFUN([APR_CHECK_FILE], [
|
||||
dnl Pick a safe variable name
|
||||
define([apr_cvname], ac_cv_file_[]translit([$1], [./+-], [__p_]))
|
||||
AC_CACHE_CHECK([for $1], [apr_cvname],
|
||||
[if test -r $1; then
|
||||
apr_cvname=yes
|
||||
else
|
||||
apr_cvname=no
|
||||
fi])
|
||||
])
|
||||
|
||||
define(APR_IFALLYES,[dnl
|
||||
ac_rc=yes
|
||||
for ac_spec in $1; do
|
||||
ac_type=`echo "$ac_spec" | sed -e 's/:.*$//'`
|
||||
ac_item=`echo "$ac_spec" | sed -e 's/^.*://'`
|
||||
case $ac_type in
|
||||
header )
|
||||
ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'`
|
||||
ac_var="ac_cv_header_$ac_item"
|
||||
;;
|
||||
file )
|
||||
ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'`
|
||||
ac_var="ac_cv_file_$ac_item"
|
||||
;;
|
||||
func ) ac_var="ac_cv_func_$ac_item" ;;
|
||||
struct ) ac_var="ac_cv_struct_$ac_item" ;;
|
||||
define ) ac_var="ac_cv_define_$ac_item" ;;
|
||||
custom ) ac_var="$ac_item" ;;
|
||||
esac
|
||||
eval "ac_val=\$$ac_var"
|
||||
if test ".$ac_val" != .yes; then
|
||||
ac_rc=no
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test ".$ac_rc" = .yes; then
|
||||
:
|
||||
$2
|
||||
else
|
||||
:
|
||||
$3
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
define(APR_BEGIN_DECISION,[dnl
|
||||
ac_decision_item='$1'
|
||||
ac_decision_msg='FAILED'
|
||||
ac_decision=''
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN([APR_DECIDE],[dnl
|
||||
dnl Define the flag (or not) in apr_private.h via autoheader
|
||||
AH_TEMPLATE($1, [Define if $2 will be used])
|
||||
ac_decision='$1'
|
||||
ac_decision_msg='$2'
|
||||
ac_decision_$1=yes
|
||||
ac_decision_$1_msg='$2'
|
||||
])
|
||||
|
||||
|
||||
define(APR_DECISION_OVERRIDE,[dnl
|
||||
ac_decision=''
|
||||
for ac_item in $1; do
|
||||
eval "ac_decision_this=\$ac_decision_${ac_item}"
|
||||
if test ".$ac_decision_this" = .yes; then
|
||||
ac_decision=$ac_item
|
||||
eval "ac_decision_msg=\$ac_decision_${ac_item}_msg"
|
||||
fi
|
||||
done
|
||||
])
|
||||
|
||||
|
||||
define(APR_DECISION_FORCE,[dnl
|
||||
ac_decision="$1"
|
||||
eval "ac_decision_msg=\"\$ac_decision_${ac_decision}_msg\""
|
||||
])
|
||||
|
||||
|
||||
define(APR_END_DECISION,[dnl
|
||||
if test ".$ac_decision" = .; then
|
||||
echo "[$]0:Error: decision on $ac_decision_item failed" 1>&2
|
||||
exit 1
|
||||
else
|
||||
if test ".$ac_decision_msg" = .; then
|
||||
ac_decision_msg="$ac_decision"
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED(${ac_decision_item})
|
||||
AC_MSG_RESULT([decision on $ac_decision_item... $ac_decision_msg])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl
|
||||
dnl APR_CHECK_SIZEOF_EXTENDED(INCLUDES, TYPE [, CROSS_SIZE])
|
||||
dnl
|
||||
dnl A variant of AC_CHECK_SIZEOF which allows the checking of
|
||||
dnl sizes of non-builtin types
|
||||
dnl
|
||||
AC_DEFUN([APR_CHECK_SIZEOF_EXTENDED],
|
||||
[changequote(<<, >>)dnl
|
||||
dnl The name to #define.
|
||||
define(<<AC_TYPE_NAME>>, translit(sizeof_$2, [a-z *], [A-Z_P]))dnl
|
||||
dnl The cache variable name.
|
||||
define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$2, [ *], [_p]))dnl
|
||||
changequote([, ])dnl
|
||||
AC_MSG_CHECKING(size of $2)
|
||||
AC_CACHE_VAL(AC_CV_NAME,
|
||||
[AC_TRY_RUN([#include <stdio.h>
|
||||
$1
|
||||
#ifdef WIN32
|
||||
#define binmode "b"
|
||||
#else
|
||||
#define binmode
|
||||
#endif
|
||||
main()
|
||||
{
|
||||
FILE *f=fopen("conftestval", "w" binmode);
|
||||
if (!f) exit(1);
|
||||
fprintf(f, "%d\n", sizeof($2));
|
||||
exit(0);
|
||||
}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$3],,,
|
||||
AC_CV_NAME=$3))])dnl
|
||||
AC_MSG_RESULT($AC_CV_NAME)
|
||||
AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The size of ]$2)
|
||||
undefine([AC_TYPE_NAME])dnl
|
||||
undefine([AC_CV_NAME])dnl
|
||||
])
|
||||
|
||||
|
||||
dnl
|
||||
dnl APR_TRY_COMPILE_NO_WARNING(INCLUDES, FUNCTION-BODY,
|
||||
dnl [ACTIONS-IF-NO-WARNINGS], [ACTIONS-IF-WARNINGS])
|
||||
dnl
|
||||
dnl Tries a compile test with warnings activated so that the result
|
||||
dnl is false if the code doesn't compile cleanly. For compilers
|
||||
dnl where it is not known how to activate a "fail-on-error" mode,
|
||||
dnl it is undefined which of the sets of actions will be run.
|
||||
dnl
|
||||
AC_DEFUN([APR_TRY_COMPILE_NO_WARNING],
|
||||
[apr_save_CFLAGS=$CFLAGS
|
||||
CFLAGS="$CFLAGS $CFLAGS_WARN"
|
||||
if test "$ac_cv_prog_gcc" = "yes"; then
|
||||
CFLAGS="$CFLAGS -Werror"
|
||||
fi
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[#include "confdefs.h"
|
||||
]
|
||||
[[$1]]
|
||||
[int main(int argc, const char *const *argv) {]
|
||||
[[$2]]
|
||||
[ return 0; }]
|
||||
)],
|
||||
[$3], [$4])
|
||||
CFLAGS=$apr_save_CFLAGS
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl APR_CHECK_STRERROR_R_RC
|
||||
dnl
|
||||
dnl Decide which style of retcode is used by this system's
|
||||
dnl strerror_r(). It either returns int (0 for success, -1
|
||||
dnl for failure), or it returns a pointer to the error
|
||||
dnl string.
|
||||
dnl
|
||||
dnl
|
||||
AC_DEFUN([APR_CHECK_STRERROR_R_RC], [
|
||||
AC_MSG_CHECKING(for type of return code from strerror_r)
|
||||
AC_TRY_RUN([
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
main()
|
||||
{
|
||||
char buf[1024];
|
||||
if (strerror_r(ERANGE, buf, sizeof buf) < 1) {
|
||||
exit(0);
|
||||
}
|
||||
else {
|
||||
exit(1);
|
||||
}
|
||||
}], [
|
||||
ac_cv_strerror_r_rc_int=yes ], [
|
||||
ac_cv_strerror_r_rc_int=no ], [
|
||||
ac_cv_strerror_r_rc_int=no ] )
|
||||
if test "x$ac_cv_strerror_r_rc_int" = xyes; then
|
||||
AC_DEFINE(STRERROR_R_RC_INT, 1, [Define if strerror returns int])
|
||||
msg="int"
|
||||
else
|
||||
msg="pointer"
|
||||
fi
|
||||
AC_MSG_RESULT([$msg])
|
||||
] )
|
||||
|
||||
dnl
|
||||
dnl APR_CHECK_DIRENT_INODE
|
||||
dnl
|
||||
dnl Decide if d_fileno or d_ino are available in the dirent
|
||||
dnl structure on this platform. Single UNIX Spec says d_ino,
|
||||
dnl BSD uses d_fileno. Undef to find the real beast.
|
||||
dnl
|
||||
AC_DEFUN([APR_CHECK_DIRENT_INODE], [
|
||||
AC_CACHE_CHECK([for inode member of struct dirent], apr_cv_dirent_inode, [
|
||||
apr_cv_dirent_inode=no
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
],[
|
||||
#ifdef d_ino
|
||||
#undef d_ino
|
||||
#endif
|
||||
struct dirent de; de.d_fileno;
|
||||
], apr_cv_dirent_inode=d_fileno)
|
||||
if test "$apr_cv_dirent_inode" = "no"; then
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
],[
|
||||
#ifdef d_fileno
|
||||
#undef d_fileno
|
||||
#endif
|
||||
struct dirent de; de.d_ino;
|
||||
], apr_cv_dirent_inode=d_ino)
|
||||
fi
|
||||
])
|
||||
if test "$apr_cv_dirent_inode" != "no"; then
|
||||
AC_DEFINE_UNQUOTED(DIRENT_INODE, $apr_cv_dirent_inode,
|
||||
[Define if struct dirent has an inode member])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl APR_CHECK_DIRENT_TYPE
|
||||
dnl
|
||||
dnl Decide if d_type is available in the dirent structure
|
||||
dnl on this platform. Not part of the Single UNIX Spec.
|
||||
dnl Note that this is worthless without DT_xxx macros, so
|
||||
dnl look for one while we are at it.
|
||||
dnl
|
||||
AC_DEFUN([APR_CHECK_DIRENT_TYPE], [
|
||||
AC_CACHE_CHECK([for file type member of struct dirent], apr_cv_dirent_type,[
|
||||
apr_cv_dirent_type=no
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
],[
|
||||
struct dirent de; de.d_type = DT_REG;
|
||||
], apr_cv_dirent_type=d_type)
|
||||
])
|
||||
if test "$apr_cv_dirent_type" != "no"; then
|
||||
AC_DEFINE_UNQUOTED(DIRENT_TYPE, $apr_cv_dirent_type,
|
||||
[Define if struct dirent has a d_type member])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl the following is a newline, a space, a tab, and a backslash (the
|
||||
dnl backslash is used by the shell to skip newlines, but m4 sees it;
|
||||
dnl treat it like whitespace).
|
||||
dnl WARNING: don't reindent these lines, or the space/tab will be lost!
|
||||
define([apr_whitespace],[
|
||||
\])
|
||||
|
||||
dnl
|
||||
dnl APR_COMMA_ARGS(ARG1 ...)
|
||||
dnl convert the whitespace-separated arguments into comman-separated
|
||||
dnl arguments.
|
||||
dnl
|
||||
dnl APR_FOREACH(CODE-BLOCK, ARG1, ARG2, ...)
|
||||
dnl subsitute CODE-BLOCK for each ARG[i]. "eachval" will be set to ARG[i]
|
||||
dnl within each iteration.
|
||||
dnl
|
||||
changequote({,})
|
||||
define({APR_COMMA_ARGS},{patsubst([$}{1],[[}apr_whitespace{]+],[,])})
|
||||
define({APR_FOREACH},
|
||||
{ifelse($}{2,,,
|
||||
[define([eachval],
|
||||
$}{2)$}{1[]APR_FOREACH([$}{1],
|
||||
builtin([shift],
|
||||
builtin([shift], $}{@)))])})
|
||||
changequote([,])
|
||||
|
||||
dnl APR_FLAG_HEADERS(HEADER-FILE ... [, FLAG-TO-SET ] [, "yes" ])
|
||||
dnl we set FLAG-TO-SET to 1 if we find HEADER-FILE, otherwise we set to 0
|
||||
dnl if FLAG-TO-SET is null, we automagically determine it's name
|
||||
dnl by changing all "/" to "_" in the HEADER-FILE and dropping
|
||||
dnl all "." and "-" chars. If the 3rd parameter is "yes" then instead of
|
||||
dnl setting to 1 or 0, we set FLAG-TO-SET to yes or no.
|
||||
dnl
|
||||
AC_DEFUN([APR_FLAG_HEADERS], [
|
||||
AC_CHECK_HEADERS($1)
|
||||
for aprt_i in $1
|
||||
do
|
||||
ac_safe=`echo "$aprt_i" | sed 'y%./+-%__p_%'`
|
||||
aprt_2=`echo "$aprt_i" | sed -e 's%/%_%g' -e 's/\.//g' -e 's/-//g'`
|
||||
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
|
||||
eval "ifelse($2,,$aprt_2,$2)=ifelse($3,yes,yes,1)"
|
||||
else
|
||||
eval "ifelse($2,,$aprt_2,$2)=ifelse($3,yes,no,0)"
|
||||
fi
|
||||
done
|
||||
])
|
||||
|
||||
dnl APR_FLAG_FUNCS(FUNC ... [, FLAG-TO-SET] [, "yes" ])
|
||||
dnl if FLAG-TO-SET is null, we automagically determine it's name
|
||||
dnl prepending "have_" to the function name in FUNC, otherwise
|
||||
dnl we use what's provided as FLAG-TO-SET. If the 3rd parameter
|
||||
dnl is "yes" then instead of setting to 1 or 0, we set FLAG-TO-SET
|
||||
dnl to yes or no.
|
||||
dnl
|
||||
AC_DEFUN([APR_FLAG_FUNCS], [
|
||||
AC_CHECK_FUNCS($1)
|
||||
for aprt_j in $1
|
||||
do
|
||||
aprt_3="have_$aprt_j"
|
||||
if eval "test \"`echo '$ac_cv_func_'$aprt_j`\" = yes"; then
|
||||
eval "ifelse($2,,$aprt_3,$2)=ifelse($3,yes,yes,1)"
|
||||
else
|
||||
eval "ifelse($2,,$aprt_3,$2)=ifelse($3,yes,no,0)"
|
||||
fi
|
||||
done
|
||||
])
|
||||
|
||||
dnl Iteratively interpolate the contents of the second argument
|
||||
dnl until interpolation offers no new result. Then assign the
|
||||
dnl final result to $1.
|
||||
dnl
|
||||
dnl Example:
|
||||
dnl
|
||||
dnl foo=1
|
||||
dnl bar='${foo}/2'
|
||||
dnl baz='${bar}/3'
|
||||
dnl APR_EXPAND_VAR(fraz, $baz)
|
||||
dnl $fraz is now "1/2/3"
|
||||
dnl
|
||||
AC_DEFUN([APR_EXPAND_VAR], [
|
||||
ap_last=
|
||||
ap_cur="$2"
|
||||
while test "x${ap_cur}" != "x${ap_last}";
|
||||
do
|
||||
ap_last="${ap_cur}"
|
||||
ap_cur=`eval "echo ${ap_cur}"`
|
||||
done
|
||||
$1="${ap_cur}"
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl Removes the value of $3 from the string in $2, strips of any leading
|
||||
dnl slashes, and returns the value in $1.
|
||||
dnl
|
||||
dnl Example:
|
||||
dnl orig_path="${prefix}/bar"
|
||||
dnl APR_PATH_RELATIVE(final_path, $orig_path, $prefix)
|
||||
dnl $final_path now contains "bar"
|
||||
AC_DEFUN([APR_PATH_RELATIVE], [
|
||||
ap_stripped=`echo $2 | sed -e "s#^$3##"`
|
||||
# check if the stripping was successful
|
||||
if test "x$2" != "x${ap_stripped}"; then
|
||||
# it was, so strip of any leading slashes
|
||||
$1="`echo ${ap_stripped} | sed -e 's#^/*##'`"
|
||||
else
|
||||
# it wasn't so return the original
|
||||
$1="$2"
|
||||
fi
|
||||
])
|
||||
|
||||
dnl APR_HELP_STRING(LHS, RHS)
|
||||
dnl Autoconf 2.50 can not handle substr correctly. It does have
|
||||
dnl AC_HELP_STRING, so let's try to call it if we can.
|
||||
dnl Note: this define must be on one line so that it can be properly returned
|
||||
dnl as the help string. When using this macro with a multi-line RHS, ensure
|
||||
dnl that you surround the macro invocation with []s
|
||||
AC_DEFUN([APR_HELP_STRING], [ifelse(regexp(AC_ACVERSION, 2\.1), -1, AC_HELP_STRING([$1],[$2]),[ ][$1] substr([ ],len($1))[$2])])
|
||||
|
||||
dnl
|
||||
dnl APR_LAYOUT(configlayout, layoutname [, extravars])
|
||||
dnl
|
||||
AC_DEFUN([APR_LAYOUT], [
|
||||
if test ! -f $srcdir/config.layout; then
|
||||
echo "** Error: Layout file $srcdir/config.layout not found"
|
||||
echo "** Error: Cannot use undefined layout '$LAYOUT'"
|
||||
exit 1
|
||||
fi
|
||||
# Catch layout names including a slash which will otherwise
|
||||
# confuse the heck out of the sed script.
|
||||
case $2 in
|
||||
*/*)
|
||||
echo "** Error: $2 is not a valid layout name"
|
||||
exit 1 ;;
|
||||
esac
|
||||
pldconf=./config.pld
|
||||
changequote({,})
|
||||
sed -e "1s/[ ]*<[lL]ayout[ ]*$2[ ]*>[ ]*//;1t" \
|
||||
-e "1,/[ ]*<[lL]ayout[ ]*$2[ ]*>[ ]*/d" \
|
||||
-e '/[ ]*<\/Layout>[ ]*/,$d' \
|
||||
-e "s/^[ ]*//g" \
|
||||
-e "s/:[ ]*/=\'/g" \
|
||||
-e "s/[ ]*$/'/g" \
|
||||
$1 > $pldconf
|
||||
layout_name=$2
|
||||
if test ! -s $pldconf; then
|
||||
echo "** Error: unable to find layout $layout_name"
|
||||
exit 1
|
||||
fi
|
||||
. $pldconf
|
||||
rm $pldconf
|
||||
for var in prefix exec_prefix bindir sbindir libexecdir mandir \
|
||||
sysconfdir datadir includedir localstatedir runtimedir \
|
||||
logfiledir libdir installbuilddir libsuffix $3; do
|
||||
eval "val=\"\$$var\""
|
||||
case $val in
|
||||
*+)
|
||||
val=`echo $val | sed -e 's;\+$;;'`
|
||||
eval "$var=\"\$val\""
|
||||
autosuffix=yes
|
||||
;;
|
||||
*)
|
||||
autosuffix=no
|
||||
;;
|
||||
esac
|
||||
val=`echo $val | sed -e 's:\(.\)/*$:\1:'`
|
||||
val=`echo $val | sed -e 's:[\$]\([a-z_]*\):${\1}:g'`
|
||||
if test "$autosuffix" = "yes"; then
|
||||
if echo $val | grep apache >/dev/null; then
|
||||
addtarget=no
|
||||
else
|
||||
addtarget=yes
|
||||
fi
|
||||
if test "$addtarget" = "yes"; then
|
||||
val="$val/apache2"
|
||||
fi
|
||||
fi
|
||||
eval "$var='$val'"
|
||||
done
|
||||
changequote([,])
|
||||
])dnl
|
||||
|
||||
dnl
|
||||
dnl APR_ENABLE_LAYOUT(default layout name [, extra vars])
|
||||
dnl
|
||||
AC_DEFUN([APR_ENABLE_LAYOUT], [
|
||||
AC_ARG_ENABLE(layout,
|
||||
[ --enable-layout=LAYOUT],[
|
||||
LAYOUT=$enableval
|
||||
])
|
||||
|
||||
if test -z "$LAYOUT"; then
|
||||
LAYOUT="$1"
|
||||
fi
|
||||
APR_LAYOUT($srcdir/config.layout, $LAYOUT, $2)
|
||||
|
||||
AC_MSG_CHECKING(for chosen layout)
|
||||
AC_MSG_RESULT($layout_name)
|
||||
])
|
||||
|
||||
|
||||
dnl
|
||||
dnl APR_PARSE_ARGUMENTS
|
||||
dnl a reimplementation of autoconf's argument parser,
|
||||
dnl used here to allow us to co-exist layouts and argument based
|
||||
dnl set ups.
|
||||
AC_DEFUN([APR_PARSE_ARGUMENTS], [
|
||||
ac_prev=
|
||||
# Retrieve the command-line arguments. The eval is needed because
|
||||
# the arguments are quoted to preserve accuracy.
|
||||
eval "set x $ac_configure_args"
|
||||
shift
|
||||
for ac_option
|
||||
do
|
||||
# If the previous option needs an argument, assign it.
|
||||
if test -n "$ac_prev"; then
|
||||
eval "$ac_prev=\$ac_option"
|
||||
ac_prev=
|
||||
continue
|
||||
fi
|
||||
|
||||
ac_optarg=`expr "x$ac_option" : 'x[[^=]]*=\(.*\)'`
|
||||
|
||||
case $ac_option in
|
||||
|
||||
-bindir | --bindir | --bindi | --bind | --bin | --bi)
|
||||
ac_prev=bindir ;;
|
||||
-bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
|
||||
bindir="$ac_optarg" ;;
|
||||
|
||||
-datadir | --datadir | --datadi | --datad | --data | --dat | --da)
|
||||
ac_prev=datadir ;;
|
||||
-datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
|
||||
| --da=*)
|
||||
datadir="$ac_optarg" ;;
|
||||
|
||||
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
|
||||
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
|
||||
| --exec | --exe | --ex)
|
||||
ac_prev=exec_prefix ;;
|
||||
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
|
||||
| --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
|
||||
| --exec=* | --exe=* | --ex=*)
|
||||
exec_prefix="$ac_optarg" ;;
|
||||
|
||||
-includedir | --includedir | --includedi | --included | --include \
|
||||
| --includ | --inclu | --incl | --inc)
|
||||
ac_prev=includedir ;;
|
||||
-includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
|
||||
| --includ=* | --inclu=* | --incl=* | --inc=*)
|
||||
includedir="$ac_optarg" ;;
|
||||
|
||||
-infodir | --infodir | --infodi | --infod | --info | --inf)
|
||||
ac_prev=infodir ;;
|
||||
-infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
|
||||
infodir="$ac_optarg" ;;
|
||||
|
||||
-libdir | --libdir | --libdi | --libd)
|
||||
ac_prev=libdir ;;
|
||||
-libdir=* | --libdir=* | --libdi=* | --libd=*)
|
||||
libdir="$ac_optarg" ;;
|
||||
|
||||
-libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
|
||||
| --libexe | --libex | --libe)
|
||||
ac_prev=libexecdir ;;
|
||||
-libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
|
||||
| --libexe=* | --libex=* | --libe=*)
|
||||
libexecdir="$ac_optarg" ;;
|
||||
|
||||
-localstatedir | --localstatedir | --localstatedi | --localstated \
|
||||
| --localstate | --localstat | --localsta | --localst \
|
||||
| --locals | --local | --loca | --loc | --lo)
|
||||
ac_prev=localstatedir ;;
|
||||
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
|
||||
| --localstate=* | --localstat=* | --localsta=* | --localst=* \
|
||||
| --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
|
||||
localstatedir="$ac_optarg" ;;
|
||||
|
||||
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
|
||||
ac_prev=mandir ;;
|
||||
-mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
|
||||
mandir="$ac_optarg" ;;
|
||||
|
||||
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
|
||||
ac_prev=prefix ;;
|
||||
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
|
||||
prefix="$ac_optarg" ;;
|
||||
|
||||
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
|
||||
ac_prev=sbindir ;;
|
||||
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
|
||||
| --sbi=* | --sb=*)
|
||||
sbindir="$ac_optarg" ;;
|
||||
|
||||
-sharedstatedir | --sharedstatedir | --sharedstatedi \
|
||||
| --sharedstated | --sharedstate | --sharedstat | --sharedsta \
|
||||
| --sharedst | --shareds | --shared | --share | --shar \
|
||||
| --sha | --sh)
|
||||
ac_prev=sharedstatedir ;;
|
||||
-sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
|
||||
| --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
|
||||
| --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
|
||||
| --sha=* | --sh=*)
|
||||
sharedstatedir="$ac_optarg" ;;
|
||||
|
||||
-sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
|
||||
| --syscon | --sysco | --sysc | --sys | --sy)
|
||||
ac_prev=sysconfdir ;;
|
||||
-sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
|
||||
| --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
|
||||
sysconfdir="$ac_optarg" ;;
|
||||
|
||||
esac
|
||||
done
|
||||
|
||||
# Be sure to have absolute paths.
|
||||
for ac_var in exec_prefix prefix
|
||||
do
|
||||
eval ac_val=$`echo $ac_var`
|
||||
case $ac_val in
|
||||
[[\\/$]]* | ?:[[\\/]]* | NONE | '' ) ;;
|
||||
*) AC_MSG_ERROR([expected an absolute path for --$ac_var: $ac_val]);;
|
||||
esac
|
||||
done
|
||||
|
||||
])dnl
|
||||
|
||||
dnl
|
||||
dnl APR_CHECK_DEPEND
|
||||
dnl
|
||||
dnl Determine what program we can use to generate .deps-style dependencies
|
||||
dnl
|
||||
AC_DEFUN([APR_CHECK_DEPEND], [
|
||||
dnl Try to determine what depend program we can use
|
||||
dnl All GCC-variants should have -MM.
|
||||
dnl If not, then we can check on those, too.
|
||||
if test "$GCC" = "yes"; then
|
||||
MKDEP='$(CC) -MM'
|
||||
else
|
||||
rm -f conftest.c
|
||||
dnl <sys/types.h> should be available everywhere!
|
||||
cat > conftest.c <<EOF
|
||||
#include <sys/types.h>
|
||||
int main() { return 0; }
|
||||
EOF
|
||||
MKDEP="true"
|
||||
for i in "$CC -MM" "$CC -M" "$CPP -MM" "$CPP -M" "cpp -M"; do
|
||||
AC_MSG_CHECKING([if $i can create proper make dependencies])
|
||||
if $i conftest.c 2>/dev/null | grep 'conftest.o: conftest.c' >/dev/null; then
|
||||
MKDEP=$i
|
||||
AC_MSG_RESULT(yes)
|
||||
break;
|
||||
fi
|
||||
AC_MSG_RESULT(no)
|
||||
done
|
||||
rm -f conftest.c
|
||||
fi
|
||||
|
||||
AC_SUBST(MKDEP)
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl APR_CHECK_TYPES_COMPATIBLE(TYPE-1, TYPE-2, [ACTION-IF-TRUE])
|
||||
dnl
|
||||
dnl Try to determine whether two types are the same. Only works
|
||||
dnl for gcc and icc.
|
||||
dnl
|
||||
AC_DEFUN([APR_CHECK_TYPES_COMPATIBLE], [
|
||||
define([apr_cvname], apr_cv_typematch_[]translit([$1], [ ], [_])_[]translit([$2], [ ], [_]))
|
||||
AC_CACHE_CHECK([whether $1 and $2 are the same], apr_cvname, [
|
||||
AC_TRY_COMPILE(AC_INCLUDES_DEFAULT, [
|
||||
int foo[0 - !__builtin_types_compatible_p($1, $2)];
|
||||
], [apr_cvname=yes
|
||||
$3], [apr_cvname=no])])
|
||||
])
|
||||
+517
@@ -0,0 +1,517 @@
|
||||
dnl -------------------------------------------------------- -*- autoconf -*-
|
||||
dnl Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
dnl contributor license agreements. See the NOTICE file distributed with
|
||||
dnl this work for additional information regarding copyright ownership.
|
||||
dnl The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
dnl (the "License"); you may not use this file except in compliance with
|
||||
dnl the License. You may obtain a copy of the License at
|
||||
dnl
|
||||
dnl http://www.apache.org/licenses/LICENSE-2.0
|
||||
dnl
|
||||
dnl Unless required by applicable law or agreed to in writing, software
|
||||
dnl distributed under the License is distributed on an "AS IS" BASIS,
|
||||
dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
dnl See the License for the specific language governing permissions and
|
||||
dnl limitations under the License.
|
||||
|
||||
dnl -----------------------------------------------------------------
|
||||
dnl apr_hints.m4: APR's autoconf macros for platform-specific hints
|
||||
dnl
|
||||
dnl We preload various configure settings depending
|
||||
dnl on previously obtained platform knowledge.
|
||||
dnl We allow all settings to be overridden from
|
||||
dnl the command-line.
|
||||
dnl
|
||||
dnl We maintain the "format" that we've used
|
||||
dnl under 1.3.x, so we don't exactly follow
|
||||
dnl what is "recommended" by autoconf.
|
||||
|
||||
dnl
|
||||
dnl APR_PRELOAD
|
||||
dnl
|
||||
dnl Preload various ENV/makefile params such as CC, CFLAGS, etc
|
||||
dnl based on outside knowledge
|
||||
dnl
|
||||
dnl Generally, we force the setting of CC, and add flags
|
||||
dnl to CFLAGS, CPPFLAGS, LIBS and LDFLAGS.
|
||||
dnl
|
||||
AC_DEFUN(APR_PRELOAD, [
|
||||
if test "x$apr_preload_done" != "xyes" ; then
|
||||
|
||||
apr_preload_done="yes"
|
||||
|
||||
echo "Applying APR hints file rules for $host"
|
||||
|
||||
case "$host" in
|
||||
*mint)
|
||||
APR_ADDTO(CPPFLAGS, [-DMINT -D_GNU_SOURCE])
|
||||
;;
|
||||
*MPE/iX*)
|
||||
APR_ADDTO(CPPFLAGS, [-DMPE -D_POSIX_SOURCE -D_SOCKET_SOURCE])
|
||||
APR_ADDTO(LIBS, [-lsvipc -lcurses])
|
||||
APR_ADDTO(LDFLAGS, [-Xlinker \"-WL,cap=ia,ba,ph;nmstack=1024000\"])
|
||||
;;
|
||||
*-apple-aux3*)
|
||||
APR_ADDTO(CPPFLAGS, [-DAUX3 -D_POSIX_SOURCE])
|
||||
APR_ADDTO(LIBS, [-lposix -lbsd])
|
||||
APR_ADDTO(LDFLAGS, [-s])
|
||||
APR_SETVAR(SHELL, [/bin/ksh])
|
||||
;;
|
||||
*-ibm-aix*)
|
||||
APR_ADDTO(CPPFLAGS, [-U__STR__ -D_THREAD_SAFE])
|
||||
dnl _USR_IRS gets us the hstrerror() proto in netdb.h
|
||||
case $host in
|
||||
*-ibm-aix4.3)
|
||||
APR_ADDTO(CPPFLAGS, [-D_USE_IRS])
|
||||
;;
|
||||
*-ibm-aix5*)
|
||||
APR_ADDTO(CPPFLAGS, [-D_USE_IRS])
|
||||
;;
|
||||
*-ibm-aix4.3.*)
|
||||
APR_ADDTO(CPPFLAGS, [-D_USE_IRS])
|
||||
;;
|
||||
esac
|
||||
dnl If using xlc, remember it, and give it the right options.
|
||||
if $CC 2>&1 | grep 'xlc' > /dev/null; then
|
||||
APR_SETIFNULL(AIX_XLC, [yes])
|
||||
APR_ADDTO(CFLAGS, [-qHALT=E])
|
||||
fi
|
||||
APR_SETIFNULL(apr_sysvsem_is_global, [yes])
|
||||
APR_SETIFNULL(apr_lock_method, [USE_SYSVSEM_SERIALIZE])
|
||||
case $host in
|
||||
*-ibm-aix3* | *-ibm-aix4.1.*)
|
||||
;;
|
||||
*)
|
||||
APR_ADDTO(LDFLAGS, [-Wl,-brtl])
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*-apollo-*)
|
||||
APR_ADDTO(CPPFLAGS, [-DAPOLLO])
|
||||
;;
|
||||
*-dg-dgux*)
|
||||
APR_ADDTO(CPPFLAGS, [-DDGUX])
|
||||
;;
|
||||
*-os2*)
|
||||
APR_SETVAR(SHELL, [sh])
|
||||
APR_SETIFNULL(apr_gethostbyname_is_thread_safe, [yes])
|
||||
APR_SETIFNULL(apr_gethostbyaddr_is_thread_safe, [yes])
|
||||
APR_SETIFNULL(apr_getservbyname_is_thread_safe, [yes])
|
||||
;;
|
||||
*-hi-hiux)
|
||||
APR_ADDTO(CPPFLAGS, [-DHIUX])
|
||||
;;
|
||||
*-hp-hpux11.*)
|
||||
APR_ADDTO(CPPFLAGS, [-DHPUX11 -D_REENTRANT -D_HPUX_SOURCE])
|
||||
;;
|
||||
*-hp-hpux10.*)
|
||||
case $host in
|
||||
*-hp-hpux10.01)
|
||||
dnl # We know this is a problem in 10.01.
|
||||
dnl # Not a problem in 10.20. Otherwise, who knows?
|
||||
APR_ADDTO(CPPFLAGS, [-DSELECT_NEEDS_CAST])
|
||||
;;
|
||||
esac
|
||||
APR_ADDTO(CPPFLAGS, [-D_REENTRANT])
|
||||
;;
|
||||
*-hp-hpux*)
|
||||
APR_ADDTO(CPPFLAGS, [-DHPUX -D_REENTRANT])
|
||||
;;
|
||||
*-linux*)
|
||||
APR_ADDTO(CPPFLAGS, [-DLINUX -D_REENTRANT -D_GNU_SOURCE])
|
||||
;;
|
||||
*-lynx-lynxos)
|
||||
APR_ADDTO(CPPFLAGS, [-D__NO_INCLUDE_WARN__ -DLYNXOS])
|
||||
APR_ADDTO(LIBS, [-lbsd])
|
||||
;;
|
||||
*486-*-bsdi*)
|
||||
APR_ADDTO(CFLAGS, [-m486])
|
||||
;;
|
||||
*-*-bsdi*)
|
||||
case $host in
|
||||
*bsdi4.1)
|
||||
APR_ADDTO(CFLAGS, [-D_REENTRANT])
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*-openbsd*)
|
||||
APR_ADDTO(CPPFLAGS, [-D_POSIX_THREADS])
|
||||
# binding to an ephemeral port fails on OpenBSD so override
|
||||
# the test for O_NONBLOCK inheritance across accept().
|
||||
APR_SETIFNULL(ac_cv_o_nonblock_inherited, [yes])
|
||||
;;
|
||||
*-netbsd*)
|
||||
APR_ADDTO(CPPFLAGS, [-DNETBSD])
|
||||
# fcntl() lies about O_NONBLOCK on an accept()ed socket (PR kern/26950)
|
||||
APR_SETIFNULL(ac_cv_o_nonblock_inherited, [yes])
|
||||
;;
|
||||
*-freebsd*)
|
||||
APR_SETIFNULL(apr_lock_method, [USE_FLOCK_SERIALIZE])
|
||||
if test -x /sbin/sysctl; then
|
||||
os_version=`/sbin/sysctl -n kern.osreldate`
|
||||
else
|
||||
os_version=000000
|
||||
fi
|
||||
# 502102 is when libc_r switched to libpthread (aka libkse).
|
||||
if test $os_version -ge "502102"; then
|
||||
apr_cv_pthreads_cflags="none"
|
||||
apr_cv_pthreads_lib="-lpthread"
|
||||
else
|
||||
APR_ADDTO(CPPFLAGS, [-D_THREAD_SAFE -D_REENTRANT])
|
||||
APR_SETIFNULL(enable_threads, [no])
|
||||
fi
|
||||
# prevent use of KQueue before FreeBSD 4.8
|
||||
if test $os_version -lt "480000"; then
|
||||
APR_SETIFNULL(ac_cv_func_kqueue, no)
|
||||
fi
|
||||
;;
|
||||
*-k*bsd*-gnu)
|
||||
APR_ADDTO(CPPFLAGS, [-D_REENTRANT -D_GNU_SOURCE])
|
||||
;;
|
||||
*-gnu*|*-GNU*)
|
||||
APR_ADDTO(CPPFLAGS, [-D_REENTRANT -D_GNU_SOURCE -DHURD])
|
||||
;;
|
||||
*-next-nextstep*)
|
||||
APR_SETIFNULL(CFLAGS, [-O])
|
||||
APR_ADDTO(CPPFLAGS, [-DNEXT])
|
||||
;;
|
||||
*-next-openstep*)
|
||||
APR_SETIFNULL(CFLAGS, [-O])
|
||||
APR_ADDTO(CPPFLAGS, [-DNEXT])
|
||||
;;
|
||||
*-apple-rhapsody*)
|
||||
APR_ADDTO(CPPFLAGS, [-DRHAPSODY])
|
||||
;;
|
||||
*-apple-darwin*)
|
||||
APR_ADDTO(CPPFLAGS, [-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK])
|
||||
APR_SETIFNULL(apr_posixsem_is_global, [yes])
|
||||
case $host in
|
||||
*-apple-darwin[[1-9]].*)
|
||||
# APR's use of kqueue has triggered kernel panics for some
|
||||
# 10.5.x (Darwin 9.x) users when running the entire test suite.
|
||||
# In 10.4.x, use of kqueue would cause the socket tests to hang.
|
||||
# 10.6+ (Darwin 10.x is supposed to fix the KQueue issues
|
||||
APR_SETIFNULL(ac_cv_func_kqueue, [no])
|
||||
APR_SETIFNULL(ac_cv_func_poll, [no]) # See issue 34332
|
||||
;;
|
||||
*-apple-darwin1?.*)
|
||||
APR_ADDTO(CPPFLAGS, [-DDARWIN_10])
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*-dec-osf*)
|
||||
APR_ADDTO(CPPFLAGS, [-DOSF1])
|
||||
# process-shared mutexes don't seem to work in Tru64 5.0
|
||||
APR_SETIFNULL(apr_cv_process_shared_works, [no])
|
||||
;;
|
||||
*-nto-qnx*)
|
||||
;;
|
||||
*-qnx)
|
||||
APR_ADDTO(CPPFLAGS, [-DQNX])
|
||||
APR_ADDTO(LIBS, [-N128k -lunix])
|
||||
;;
|
||||
*-qnx32)
|
||||
APR_ADDTO(CPPFLAGS, [-DQNX])
|
||||
APR_ADDTO(CFLAGS, [-mf -3])
|
||||
APR_ADDTO(LIBS, [-N128k -lunix])
|
||||
;;
|
||||
*-isc4*)
|
||||
APR_ADDTO(CPPFLAGS, [-posix -DISC])
|
||||
APR_ADDTO(LDFLAGS, [-posix])
|
||||
APR_ADDTO(LIBS, [-linet])
|
||||
;;
|
||||
*-sco3.2v[[234]]*)
|
||||
APR_ADDTO(CPPFLAGS, [-DSCO -D_REENTRANT])
|
||||
if test "$GCC" = "no"; then
|
||||
APR_ADDTO(CFLAGS, [-Oacgiltz])
|
||||
fi
|
||||
APR_ADDTO(LIBS, [-lPW -lmalloc])
|
||||
;;
|
||||
*-sco3.2v5*)
|
||||
APR_ADDTO(CPPFLAGS, [-DSCO5 -D_REENTRANT])
|
||||
;;
|
||||
*-sco_sv*|*-SCO_SV*)
|
||||
APR_ADDTO(CPPFLAGS, [-DSCO -D_REENTRANT])
|
||||
APR_ADDTO(LIBS, [-lPW -lmalloc])
|
||||
;;
|
||||
*-solaris2*)
|
||||
PLATOSVERS=`echo $host | sed 's/^.*solaris2.//'`
|
||||
APR_ADDTO(CPPFLAGS, [-DSOLARIS2=$PLATOSVERS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT])
|
||||
if test $PLATOSVERS -ge 10; then
|
||||
APR_SETIFNULL(apr_lock_method, [USE_PROC_PTHREAD_SERIALIZE])
|
||||
else
|
||||
APR_SETIFNULL(apr_lock_method, [USE_FCNTL_SERIALIZE])
|
||||
fi
|
||||
# readdir64_r error handling seems broken on Solaris (at least
|
||||
# up till 2.8) -- it will return -1 at end-of-directory.
|
||||
APR_SETIFNULL(ac_cv_func_readdir64_r, [no])
|
||||
;;
|
||||
*-sunos4*)
|
||||
APR_ADDTO(CPPFLAGS, [-DSUNOS4])
|
||||
;;
|
||||
*-unixware1)
|
||||
APR_ADDTO(CPPFLAGS, [-DUW=100])
|
||||
;;
|
||||
*-unixware2)
|
||||
APR_ADDTO(CPPFLAGS, [-DUW=200])
|
||||
APR_ADDTO(LIBS, [-lgen])
|
||||
;;
|
||||
*-unixware211)
|
||||
APR_ADDTO(CPPFLAGS, [-DUW=211])
|
||||
APR_ADDTO(LIBS, [-lgen])
|
||||
;;
|
||||
*-unixware212)
|
||||
APR_ADDTO(CPPFLAGS, [-DUW=212])
|
||||
APR_ADDTO(LIBS, [-lgen])
|
||||
;;
|
||||
*-unixware7)
|
||||
APR_ADDTO(CPPFLAGS, [-DUW=700])
|
||||
APR_ADDTO(LIBS, [-lgen])
|
||||
;;
|
||||
maxion-*-sysv4*)
|
||||
APR_ADDTO(CPPFLAGS, [-DSVR4])
|
||||
APR_ADDTO(LIBS, [-lc -lgen])
|
||||
;;
|
||||
*-*-powermax*)
|
||||
APR_ADDTO(CPPFLAGS, [-DSVR4])
|
||||
APR_ADDTO(LIBS, [-lgen])
|
||||
;;
|
||||
TPF)
|
||||
APR_ADDTO(CPPFLAGS, [-DTPF -D_POSIX_SOURCE])
|
||||
;;
|
||||
bs2000*-siemens-sysv*)
|
||||
APR_SETIFNULL(CFLAGS, [-O])
|
||||
APR_ADDTO(CPPFLAGS, [-DSVR4 -D_XPG_IV -D_KMEMUSER])
|
||||
APR_ADDTO(LIBS, [-lsocket])
|
||||
APR_SETIFNULL(enable_threads, [no])
|
||||
;;
|
||||
*-siemens-sysv4*)
|
||||
APR_ADDTO(CPPFLAGS, [-DSVR4 -D_XPG_IV -DHAS_DLFCN -DUSE_MMAP_FILES -DUSE_SYSVSEM_SERIALIZED_ACCEPT])
|
||||
APR_ADDTO(LIBS, [-lc])
|
||||
;;
|
||||
pyramid-pyramid-svr4)
|
||||
APR_ADDTO(CPPFLAGS, [-DSVR4 -DNO_LONG_DOUBLE])
|
||||
APR_ADDTO(LIBS, [-lc])
|
||||
;;
|
||||
DS/90\ 7000-*-sysv4*)
|
||||
APR_ADDTO(CPPFLAGS, [-DUXPDS])
|
||||
;;
|
||||
*-tandem-sysv4*)
|
||||
APR_ADDTO(CPPFLAGS, [-DSVR4])
|
||||
;;
|
||||
*-ncr-sysv4)
|
||||
APR_ADDTO(CPPFLAGS, [-DSVR4 -DMPRAS])
|
||||
APR_ADDTO(LIBS, [-lc -L/usr/ucblib -lucb])
|
||||
;;
|
||||
*-sysv4*)
|
||||
APR_ADDTO(CPPFLAGS, [-DSVR4])
|
||||
APR_ADDTO(LIBS, [-lc])
|
||||
;;
|
||||
88k-encore-sysv4)
|
||||
APR_ADDTO(CPPFLAGS, [-DSVR4 -DENCORE])
|
||||
APR_ADDTO(LIBS, [-lPW])
|
||||
;;
|
||||
*-uts*)
|
||||
PLATOSVERS=`echo $host | sed 's/^.*,//'`
|
||||
case $PLATOSVERS in
|
||||
2*) APR_ADDTO(CPPFLAGS, [-DUTS21])
|
||||
APR_ADDTO(CFLAGS, [-Xa -eft])
|
||||
APR_ADDTO(LIBS, [-lbsd -la])
|
||||
;;
|
||||
*) APR_ADDTO(CPPFLAGS, [-DSVR4])
|
||||
APR_ADDTO(CFLAGS, [-Xa])
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*-ultrix)
|
||||
APR_ADDTO(CPPFLAGS, [-DULTRIX])
|
||||
APR_SETVAR(SHELL, [/bin/sh5])
|
||||
;;
|
||||
*powerpc-tenon-machten*)
|
||||
APR_ADDTO(LDFLAGS, [-Xlstack=0x14000 -Xldelcsect])
|
||||
;;
|
||||
*-machten*)
|
||||
APR_ADDTO(LDFLAGS, [-stack 0x14000])
|
||||
;;
|
||||
*convex-v11*)
|
||||
APR_ADDTO(CPPFLAGS, [-DCONVEXOS11])
|
||||
APR_SETIFNULL(CFLAGS, [-O1])
|
||||
APR_ADDTO(CFLAGS, [-ext])
|
||||
;;
|
||||
i860-intel-osf1)
|
||||
APR_ADDTO(CPPFLAGS, [-DPARAGON])
|
||||
;;
|
||||
*-sequent-ptx2.*.*)
|
||||
APR_ADDTO(CPPFLAGS, [-DSEQUENT=20])
|
||||
APR_ADDTO(CFLAGS, [-Wc,-pw])
|
||||
APR_ADDTO(LIBS, [-linet -lc -lseq])
|
||||
;;
|
||||
*-sequent-ptx4.0.*)
|
||||
APR_ADDTO(CPPFLAGS, [-DSEQUENT=40])
|
||||
APR_ADDTO(CFLAGS, [-Wc,-pw])
|
||||
APR_ADDTO(LIBS, [-linet -lc])
|
||||
;;
|
||||
*-sequent-ptx4.[[123]].*)
|
||||
APR_ADDTO(CPPFLAGS, [-DSEQUENT=41])
|
||||
APR_ADDTO(CFLAGS, [-Wc,-pw])
|
||||
APR_ADDTO(LIBS, [-lc])
|
||||
;;
|
||||
*-sequent-ptx4.4.*)
|
||||
APR_ADDTO(CPPFLAGS, [-DSEQUENT=44])
|
||||
APR_ADDTO(CFLAGS, [-Wc,-pw])
|
||||
APR_ADDTO(LIBS, [-lc])
|
||||
;;
|
||||
*-sequent-ptx4.5.*)
|
||||
APR_ADDTO(CPPFLAGS, [-DSEQUENT=45])
|
||||
APR_ADDTO(CFLAGS, [-Wc,-pw])
|
||||
APR_ADDTO(LIBS, [-lc])
|
||||
;;
|
||||
*-sequent-ptx5.0.*)
|
||||
APR_ADDTO(CPPFLAGS, [-DSEQUENT=50])
|
||||
APR_ADDTO(CFLAGS, [-Wc,-pw])
|
||||
APR_ADDTO(LIBS, [-lc])
|
||||
;;
|
||||
*NEWS-OS*)
|
||||
APR_ADDTO(CPPFLAGS, [-DNEWSOS])
|
||||
;;
|
||||
*-riscix)
|
||||
APR_ADDTO(CPPFLAGS, [-DRISCIX])
|
||||
APR_SETIFNULL(CFLAGS, [-O])
|
||||
;;
|
||||
*-irix*)
|
||||
APR_ADDTO(CPPFLAGS, [-D_POSIX_THREAD_SAFE_FUNCTIONS])
|
||||
;;
|
||||
*beos*)
|
||||
APR_ADDTO(CPPFLAGS, [-DBEOS])
|
||||
PLATOSVERS=`uname -r`
|
||||
APR_SETIFNULL(apr_process_lock_is_global, [yes])
|
||||
case $PLATOSVERS in
|
||||
5.0.4)
|
||||
APR_ADDTO(LDFLAGS, [-L/boot/beos/system/lib])
|
||||
APR_ADDTO(LIBS, [-lbind -lsocket])
|
||||
APR_ADDTO(CPPFLAGS,[-DBONE7])
|
||||
;;
|
||||
5.1)
|
||||
APR_ADDTO(LDFLAGS, [-L/boot/beos/system/lib])
|
||||
APR_ADDTO(LIBS, [-lbind -lsocket])
|
||||
;;
|
||||
esac
|
||||
APR_ADDTO(CPPFLAGS, [-DSIGPROCMASK_SETS_THREAD_MASK])
|
||||
;;
|
||||
4850-*.*)
|
||||
APR_ADDTO(CPPFLAGS, [-DSVR4 -DMPRAS])
|
||||
APR_ADDTO(LIBS, [-lc -L/usr/ucblib -lucb])
|
||||
;;
|
||||
drs6000*)
|
||||
APR_ADDTO(CPPFLAGS, [-DSVR4])
|
||||
APR_ADDTO(LIBS, [-lc -L/usr/ucblib -lucb])
|
||||
;;
|
||||
m88k-*-CX/SX|CYBER)
|
||||
APR_ADDTO(CPPFLAGS, [-D_CX_SX])
|
||||
APR_ADDTO(CFLAGS, [-Xa])
|
||||
;;
|
||||
*-tandem-oss)
|
||||
APR_ADDTO(CPPFLAGS, [-D_TANDEM_SOURCE -D_XOPEN_SOURCE_EXTENDED=1])
|
||||
;;
|
||||
*-ibm-os390)
|
||||
APR_SETIFNULL(apr_lock_method, [USE_SYSVSEM_SERIALIZE])
|
||||
APR_SETIFNULL(apr_sysvsem_is_global, [yes])
|
||||
APR_SETIFNULL(apr_gethostbyname_is_thread_safe, [yes])
|
||||
APR_SETIFNULL(apr_gethostbyaddr_is_thread_safe, [yes])
|
||||
APR_SETIFNULL(apr_getservbyname_is_thread_safe, [yes])
|
||||
AC_DEFINE(HAVE_ZOS_PTHREADS, 1, [Define for z/OS pthread API nuances])
|
||||
APR_ADDTO(CPPFLAGS, [-U_NO_PROTO -DSIGPROCMASK_SETS_THREAD_MASK -DTCP_NODELAY=1])
|
||||
;;
|
||||
*-ibm-as400)
|
||||
APR_SETIFNULL(apr_lock_method, [USE_SYSVSEM_SERIALIZE])
|
||||
APR_SETIFNULL(apr_process_lock_is_global, [yes])
|
||||
APR_SETIFNULL(apr_gethostbyname_is_thread_safe, [yes])
|
||||
APR_SETIFNULL(apr_gethostbyaddr_is_thread_safe, [yes])
|
||||
APR_SETIFNULL(apr_getservbyname_is_thread_safe, [yes])
|
||||
;;
|
||||
*mingw*)
|
||||
APR_ADDTO(INTERNAL_CPPFLAGS, -DBINPATH=$apr_builddir/test/.libs)
|
||||
APR_ADDTO(CPPFLAGS, [-DWIN32 -D__MSVCRT__])
|
||||
APR_ADDTO(LDFLAGS, [-Wl,--enable-auto-import,--subsystem,console])
|
||||
APR_SETIFNULL(have_unicode_fs, [1])
|
||||
APR_SETIFNULL(have_proc_invoked, [1])
|
||||
APR_SETIFNULL(apr_lock_method, [win32])
|
||||
APR_SETIFNULL(apr_process_lock_is_global, [yes])
|
||||
APR_SETIFNULL(apr_cv_use_lfs64, [yes])
|
||||
APR_SETIFNULL(apr_cv_osuuid, [yes])
|
||||
APR_SETIFNULL(apr_cv_tcp_nodelay_with_cork, [no])
|
||||
APR_SETIFNULL(apr_thread_func, [__stdcall])
|
||||
APR_SETIFNULL(ac_cv_o_nonblock_inherited, [yes])
|
||||
APR_SETIFNULL(ac_cv_tcp_nodelay_inherited, [yes])
|
||||
APR_SETIFNULL(ac_cv_file__dev_zero, [no])
|
||||
APR_SETIFNULL(ac_cv_func_setpgrp_void, [no])
|
||||
APR_SETIFNULL(ac_cv_func_mmap, [yes])
|
||||
APR_SETIFNULL(ac_cv_define_sockaddr_in6, [yes])
|
||||
APR_SETIFNULL(ac_cv_working_getaddrinfo, [yes])
|
||||
APR_SETIFNULL(ac_cv_working_getnameinfo, [yes])
|
||||
APR_SETIFNULL(ac_cv_func_gai_strerror, [yes])
|
||||
case $host in
|
||||
*mingw32*)
|
||||
APR_SETIFNULL(apr_has_xthread_files, [1])
|
||||
APR_SETIFNULL(apr_has_user, [1])
|
||||
APR_SETIFNULL(apr_procattr_user_set_requires_password, [1])
|
||||
dnl The real function is TransmitFile(), not sendfile(), but
|
||||
dnl this bypasses the Linux/Solaris/AIX/etc. test and enables
|
||||
dnl the TransmitFile() implementation.
|
||||
APR_SETIFNULL(ac_cv_func_sendfile, [yes])
|
||||
;;
|
||||
*mingwce)
|
||||
APR_SETIFNULL(apr_has_xthread_files, [0])
|
||||
APR_SETIFNULL(apr_has_user, [0])
|
||||
APR_SETIFNULL(apr_procattr_user_set_requires_password, [0])
|
||||
APR_SETIFNULL(ac_cv_func_sendfile, [no])
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
fi
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl APR_CC_HINTS
|
||||
dnl
|
||||
dnl Allows us to provide a default choice of compiler which
|
||||
dnl the user can override.
|
||||
AC_DEFUN(APR_CC_HINTS, [
|
||||
case "$host" in
|
||||
*-apple-aux3*)
|
||||
APR_SETIFNULL(CC, [gcc])
|
||||
;;
|
||||
bs2000*-siemens-sysv*)
|
||||
APR_SETIFNULL(CC, [c89 -XLLML -XLLMK -XL -Kno_integer_overflow])
|
||||
;;
|
||||
*convex-v11*)
|
||||
APR_SETIFNULL(CC, [cc])
|
||||
;;
|
||||
*-ibm-os390)
|
||||
APR_SETIFNULL(CC, [cc])
|
||||
;;
|
||||
*-ibm-as400)
|
||||
APR_SETIFNULL(CC, [icc])
|
||||
;;
|
||||
*-isc4*)
|
||||
APR_SETIFNULL(CC, [gcc])
|
||||
;;
|
||||
m88k-*-CX/SX|CYBER)
|
||||
APR_SETIFNULL(CC, [cc])
|
||||
;;
|
||||
*-next-openstep*)
|
||||
APR_SETIFNULL(CC, [cc])
|
||||
;;
|
||||
*-qnx32)
|
||||
APR_SETIFNULL(CC, [cc -F])
|
||||
;;
|
||||
*-tandem-oss)
|
||||
APR_SETIFNULL(CC, [c89])
|
||||
;;
|
||||
TPF)
|
||||
APR_SETIFNULL(CC, [c89])
|
||||
;;
|
||||
esac
|
||||
])
|
||||
+994
@@ -0,0 +1,994 @@
|
||||
dnl -------------------------------------------------------- -*- autoconf -*-
|
||||
dnl Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
dnl contributor license agreements. See the NOTICE file distributed with
|
||||
dnl this work for additional information regarding copyright ownership.
|
||||
dnl The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
dnl (the "License"); you may not use this file except in compliance with
|
||||
dnl the License. You may obtain a copy of the License at
|
||||
dnl
|
||||
dnl http://www.apache.org/licenses/LICENSE-2.0
|
||||
dnl
|
||||
dnl Unless required by applicable law or agreed to in writing, software
|
||||
dnl distributed under the License is distributed on an "AS IS" BASIS,
|
||||
dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
dnl See the License for the specific language governing permissions and
|
||||
dnl limitations under the License.
|
||||
|
||||
dnl -----------------------------------------------------------------
|
||||
dnl apr_network.m4: APR's autoconf macros for testing network support
|
||||
dnl
|
||||
|
||||
dnl
|
||||
dnl check for type in_addr
|
||||
dnl
|
||||
AC_DEFUN(APR_TYPE_IN_ADDR,[
|
||||
AC_CACHE_CHECK(for type in_addr, ac_cv_type_in_addr,[
|
||||
AC_TRY_COMPILE([
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_WINSOCK2_H
|
||||
#include <winsock2.h>
|
||||
#endif
|
||||
],[
|
||||
struct in_addr arg;
|
||||
arg.s_addr = htonl(INADDR_ANY);
|
||||
], [ ac_cv_type_in_addr="yes"] , [
|
||||
ac_cv_type_in_addr="no"])
|
||||
])
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl check for working getaddrinfo()
|
||||
dnl
|
||||
dnl Note that if the system doesn't have gai_strerror(), we
|
||||
dnl can't use getaddrinfo() because we can't get strings
|
||||
dnl describing the error codes.
|
||||
dnl
|
||||
AC_DEFUN([APR_CHECK_WORKING_GETADDRINFO], [
|
||||
AC_CACHE_CHECK(for working getaddrinfo, ac_cv_working_getaddrinfo,[
|
||||
AC_TRY_RUN( [
|
||||
#ifdef HAVE_NETDB_H
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
int main(void) {
|
||||
struct addrinfo hints, *ai;
|
||||
int error;
|
||||
|
||||
memset(&hints, 0, sizeof(hints));
|
||||
hints.ai_family = AF_UNSPEC;
|
||||
hints.ai_socktype = SOCK_STREAM;
|
||||
error = getaddrinfo("127.0.0.1", NULL, &hints, &ai);
|
||||
if (error) {
|
||||
exit(1);
|
||||
}
|
||||
if (ai->ai_addr->sa_family != AF_INET) {
|
||||
exit(1);
|
||||
}
|
||||
exit(0);
|
||||
}
|
||||
],[
|
||||
ac_cv_working_getaddrinfo="yes"
|
||||
],[
|
||||
ac_cv_working_getaddrinfo="no"
|
||||
],[
|
||||
ac_cv_working_getaddrinfo="yes"
|
||||
])])
|
||||
if test "$ac_cv_working_getaddrinfo" = "yes"; then
|
||||
if test "$ac_cv_func_gai_strerror" != "yes"; then
|
||||
ac_cv_working_getaddrinfo="no"
|
||||
else
|
||||
AC_DEFINE(HAVE_GETADDRINFO, 1, [Define if getaddrinfo exists and works well enough for APR])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
dnl Check whether the AI_ADDRCONFIG flag can be used with getaddrinfo
|
||||
AC_DEFUN([APR_CHECK_GETADDRINFO_ADDRCONFIG], [
|
||||
AC_CACHE_CHECK(for working AI_ADDRCONFIG, apr_cv_gai_addrconfig, [
|
||||
AC_TRY_RUN([
|
||||
#ifdef HAVE_NETDB_H
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
struct addrinfo hints, *ai;
|
||||
|
||||
memset(&hints, 0, sizeof(hints));
|
||||
hints.ai_family = AF_UNSPEC;
|
||||
hints.ai_socktype = SOCK_STREAM;
|
||||
hints.ai_flags = AI_ADDRCONFIG;
|
||||
return getaddrinfo("localhost", NULL, &hints, &ai) != 0;
|
||||
}], [apr_cv_gai_addrconfig=yes],
|
||||
[apr_cv_gai_addrconfig=no],
|
||||
[apr_cv_gai_addrconfig=no])])
|
||||
|
||||
if test $apr_cv_gai_addrconfig = yes; then
|
||||
AC_DEFINE(HAVE_GAI_ADDRCONFIG, 1, [Define if getaddrinfo accepts the AI_ADDRCONFIG flag])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl check for working getnameinfo()
|
||||
dnl
|
||||
AC_DEFUN([APR_CHECK_WORKING_GETNAMEINFO], [
|
||||
AC_CACHE_CHECK(for working getnameinfo, ac_cv_working_getnameinfo,[
|
||||
AC_TRY_RUN( [
|
||||
#ifdef HAVE_NETDB_H
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
int main(void) {
|
||||
struct sockaddr_in sa;
|
||||
char hbuf[256];
|
||||
int error;
|
||||
|
||||
sa.sin_family = AF_INET;
|
||||
sa.sin_port = 0;
|
||||
sa.sin_addr.s_addr = inet_addr("127.0.0.1");
|
||||
#ifdef SIN6_LEN
|
||||
sa.sin_len = sizeof(sa);
|
||||
#endif
|
||||
|
||||
error = getnameinfo((const struct sockaddr *)&sa, sizeof(sa),
|
||||
hbuf, 256, NULL, 0,
|
||||
NI_NUMERICHOST);
|
||||
if (error) {
|
||||
exit(1);
|
||||
} else {
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
],[
|
||||
ac_cv_working_getnameinfo="yes"
|
||||
],[
|
||||
ac_cv_working_getnameinfo="no"
|
||||
],[
|
||||
ac_cv_working_getnameinfo="yes"
|
||||
])])
|
||||
if test "$ac_cv_working_getnameinfo" = "yes"; then
|
||||
AC_DEFINE(HAVE_GETNAMEINFO, 1, [Define if getnameinfo exists])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl check for negative error codes for getaddrinfo()
|
||||
dnl
|
||||
AC_DEFUN([APR_CHECK_NEGATIVE_EAI], [
|
||||
AC_CACHE_CHECK(for negative error codes for getaddrinfo, ac_cv_negative_eai,[
|
||||
AC_TRY_RUN( [
|
||||
#ifdef HAVE_NETDB_H
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
|
||||
int main(void) {
|
||||
if (EAI_ADDRFAMILY < 0) {
|
||||
exit(0);
|
||||
}
|
||||
exit(1);
|
||||
}
|
||||
],[
|
||||
ac_cv_negative_eai="yes"
|
||||
],[
|
||||
ac_cv_negative_eai="no"
|
||||
],[
|
||||
ac_cv_negative_eai="no"
|
||||
])])
|
||||
if test "$ac_cv_negative_eai" = "yes"; then
|
||||
AC_DEFINE(NEGATIVE_EAI, 1, [Define if EAI_ error codes from getaddrinfo are negative])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl Checks the definition of gethostbyname_r and gethostbyaddr_r
|
||||
dnl which are different for glibc, solaris and assorted other operating
|
||||
dnl systems
|
||||
dnl
|
||||
dnl Note that this test is executed too early to see if we have all of
|
||||
dnl the headers.
|
||||
AC_DEFUN([APR_CHECK_GETHOSTBYNAME_R_STYLE], [
|
||||
|
||||
dnl Try and compile a glibc2 gethostbyname_r piece of code, and set the
|
||||
dnl style of the routines to glibc2 on success
|
||||
AC_CACHE_CHECK([style of gethostbyname_r routine], ac_cv_gethostbyname_r_style,
|
||||
APR_TRY_COMPILE_NO_WARNING([
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETDB_H
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
],[
|
||||
int tmp = gethostbyname_r((const char *) 0, (struct hostent *) 0,
|
||||
(char *) 0, 0, (struct hostent **) 0, &tmp);
|
||||
/* use tmp to suppress the warning */
|
||||
tmp=0;
|
||||
], ac_cv_gethostbyname_r_style=glibc2, ac_cv_gethostbyname_r_style=none))
|
||||
|
||||
if test "$ac_cv_gethostbyname_r_style" = "glibc2"; then
|
||||
AC_DEFINE(GETHOSTBYNAME_R_GLIBC2, 1, [Define if gethostbyname_r has the glibc style])
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([3rd argument to the gethostbyname_r routines], ac_cv_gethostbyname_r_arg,
|
||||
APR_TRY_COMPILE_NO_WARNING([
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETDB_H
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
],[
|
||||
int tmp = gethostbyname_r((const char *) 0, (struct hostent *) 0,
|
||||
(struct hostent_data *) 0);
|
||||
/* use tmp to suppress the warning */
|
||||
tmp=0;
|
||||
], ac_cv_gethostbyname_r_arg=hostent_data, ac_cv_gethostbyname_r_arg=char))
|
||||
|
||||
if test "$ac_cv_gethostbyname_r_arg" = "hostent_data"; then
|
||||
AC_DEFINE(GETHOSTBYNAME_R_HOSTENT_DATA, 1, [Define if gethostbyname_r has the hostent_data for the third argument])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl Checks the definition of getservbyname_r
|
||||
dnl which are different for glibc, solaris and assorted other operating
|
||||
dnl systems
|
||||
dnl
|
||||
dnl Note that this test is executed too early to see if we have all of
|
||||
dnl the headers.
|
||||
AC_DEFUN([APR_CHECK_GETSERVBYNAME_R_STYLE], [
|
||||
|
||||
dnl Try and compile a glibc2 getservbyname_r piece of code, and set the
|
||||
dnl style of the routines to glibc2 on success
|
||||
AC_CACHE_CHECK([style of getservbyname_r routine], ac_cv_getservbyname_r_style, [
|
||||
APR_TRY_COMPILE_NO_WARNING([
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETDB_H
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
],[
|
||||
int tmp = getservbyname_r((const char *) 0, (const char *) 0,
|
||||
(struct servent *) 0, (char *) 0, 0,
|
||||
(struct servent **) 0);
|
||||
/* use tmp to suppress the warning */
|
||||
tmp=0;
|
||||
], ac_cv_getservbyname_r_style=glibc2, ac_cv_getservbyname_r_style=none)
|
||||
|
||||
if test "$ac_cv_getservbyname_r_style" = "none"; then
|
||||
dnl Try and compile a Solaris getservbyname_r piece of code, and set the
|
||||
dnl style of the routines to solaris on success
|
||||
APR_TRY_COMPILE_NO_WARNING([
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETDB_H
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
],[
|
||||
struct servent *tmp = getservbyname_r((const char *) 0, (const char *) 0,
|
||||
(struct servent *) 0, (char *) 0, 0);
|
||||
/* use tmp to suppress the warning */
|
||||
tmp=NULL;
|
||||
], ac_cv_getservbyname_r_style=solaris, ac_cv_getservbyname_r_style=none)
|
||||
fi
|
||||
|
||||
if test "$ac_cv_getservbyname_r_style" = "none"; then
|
||||
dnl Try and compile a OSF/1 getservbyname_r piece of code, and set the
|
||||
dnl style of the routines to osf1 on success
|
||||
APR_TRY_COMPILE_NO_WARNING([
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETDB_H
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
],[
|
||||
int tmp = getservbyname_r((const char *) 0, (const char *) 0,
|
||||
(struct servent *) 0, (struct servent_data *) 0);
|
||||
/* use tmp to suppress the warning */
|
||||
tmp=0;
|
||||
], ac_cv_getservbyname_r_style=osf1, ac_cv_getservbyname_r_style=none)
|
||||
fi
|
||||
])
|
||||
|
||||
if test "$ac_cv_getservbyname_r_style" = "glibc2"; then
|
||||
AC_DEFINE(GETSERVBYNAME_R_GLIBC2, 1, [Define if getservbyname_r has the glibc style])
|
||||
elif test "$ac_cv_getservbyname_r_style" = "solaris"; then
|
||||
AC_DEFINE(GETSERVBYNAME_R_SOLARIS, 1, [Define if getservbyname_r has the Solaris style])
|
||||
elif test "$ac_cv_getservbyname_r_style" = "osf1"; then
|
||||
AC_DEFINE(GETSERVBYNAME_R_OSF1, 1, [Define if getservbyname_r has the OSF/1 style])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl see if TCP_NODELAY setting is inherited from listening sockets
|
||||
dnl
|
||||
AC_DEFUN([APR_CHECK_TCP_NODELAY_INHERITED], [
|
||||
AC_CACHE_CHECK(if TCP_NODELAY setting is inherited from listening sockets, ac_cv_tcp_nodelay_inherited,[
|
||||
AC_TRY_RUN( [
|
||||
#include <stdio.h>
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_TCP_H
|
||||
#include <netinet/tcp.h>
|
||||
#endif
|
||||
#ifndef HAVE_SOCKLEN_T
|
||||
typedef int socklen_t;
|
||||
#endif
|
||||
int main(void) {
|
||||
int listen_s, connected_s, client_s;
|
||||
int listen_port, rc;
|
||||
struct sockaddr_in sa;
|
||||
socklen_t sa_len;
|
||||
socklen_t option_len;
|
||||
int option;
|
||||
|
||||
listen_s = socket(AF_INET, SOCK_STREAM, 0);
|
||||
if (listen_s < 0) {
|
||||
perror("socket");
|
||||
exit(1);
|
||||
}
|
||||
option = 1;
|
||||
rc = setsockopt(listen_s, IPPROTO_TCP, TCP_NODELAY, &option, sizeof option);
|
||||
if (rc < 0) {
|
||||
perror("setsockopt TCP_NODELAY");
|
||||
exit(1);
|
||||
}
|
||||
memset(&sa, 0, sizeof sa);
|
||||
sa.sin_family = AF_INET;
|
||||
#ifdef BEOS
|
||||
sa.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
|
||||
#endif
|
||||
/* leave port 0 to get ephemeral */
|
||||
rc = bind(listen_s, (struct sockaddr *)&sa, sizeof sa);
|
||||
if (rc < 0) {
|
||||
perror("bind for ephemeral port");
|
||||
exit(1);
|
||||
}
|
||||
/* find ephemeral port */
|
||||
sa_len = sizeof(sa);
|
||||
rc = getsockname(listen_s, (struct sockaddr *)&sa, &sa_len);
|
||||
if (rc < 0) {
|
||||
perror("getsockname");
|
||||
exit(1);
|
||||
}
|
||||
listen_port = sa.sin_port;
|
||||
rc = listen(listen_s, 5);
|
||||
if (rc < 0) {
|
||||
perror("listen");
|
||||
exit(1);
|
||||
}
|
||||
client_s = socket(AF_INET, SOCK_STREAM, 0);
|
||||
if (client_s < 0) {
|
||||
perror("socket");
|
||||
exit(1);
|
||||
}
|
||||
memset(&sa, 0, sizeof sa);
|
||||
sa.sin_family = AF_INET;
|
||||
sa.sin_port = listen_port;
|
||||
#ifdef BEOS
|
||||
sa.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
|
||||
#endif
|
||||
/* leave sin_addr all zeros to use loopback */
|
||||
rc = connect(client_s, (struct sockaddr *)&sa, sizeof sa);
|
||||
if (rc < 0) {
|
||||
perror("connect");
|
||||
exit(1);
|
||||
}
|
||||
sa_len = sizeof sa;
|
||||
connected_s = accept(listen_s, (struct sockaddr *)&sa, &sa_len);
|
||||
if (connected_s < 0) {
|
||||
perror("accept");
|
||||
exit(1);
|
||||
}
|
||||
option_len = sizeof option;
|
||||
rc = getsockopt(connected_s, IPPROTO_TCP, TCP_NODELAY, &option, &option_len);
|
||||
if (rc < 0) {
|
||||
perror("getsockopt");
|
||||
exit(1);
|
||||
}
|
||||
if (!option) {
|
||||
fprintf(stderr, "TCP_NODELAY is not set in the child.\n");
|
||||
exit(1);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
],[
|
||||
ac_cv_tcp_nodelay_inherited="yes"
|
||||
],[
|
||||
ac_cv_tcp_nodelay_inherited="no"
|
||||
],[
|
||||
ac_cv_tcp_nodelay_inherited="yes"
|
||||
])])
|
||||
if test "$ac_cv_tcp_nodelay_inherited" = "yes"; then
|
||||
tcp_nodelay_inherited=1
|
||||
else
|
||||
tcp_nodelay_inherited=0
|
||||
fi
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl Determine whether TCP_NODELAY and TCP_CORK can both be set
|
||||
dnl on a TCP socket.
|
||||
dnl
|
||||
AC_DEFUN([APR_CHECK_TCP_NODELAY_WITH_CORK], [
|
||||
AC_CACHE_CHECK([whether TCP_NODELAY and TCP_CORK can both be enabled],
|
||||
[apr_cv_tcp_nodelay_with_cork],
|
||||
[AC_RUN_IFELSE([AC_LANG_PROGRAM([[
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_TCP_H
|
||||
#include <netinet/tcp.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
]], [[
|
||||
int fd, flag, rc;
|
||||
|
||||
fd = socket(AF_INET, SOCK_STREAM, 0);
|
||||
if (fd < 0) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
flag = 1;
|
||||
rc = setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof flag);
|
||||
if (rc < 0) {
|
||||
perror("setsockopt TCP_NODELAY");
|
||||
exit(2);
|
||||
}
|
||||
|
||||
flag = 1;
|
||||
rc = setsockopt(fd, IPPROTO_TCP, TCP_CORK, &flag, sizeof flag);
|
||||
if (rc < 0) {
|
||||
perror("setsockopt TCP_CORK");
|
||||
exit(3);
|
||||
}
|
||||
|
||||
exit(0);
|
||||
]])], [apr_cv_tcp_nodelay_with_cork=yes], [apr_cv_tcp_nodelay_with_cork=no])])
|
||||
|
||||
if test "$apr_cv_tcp_nodelay_with_cork" = "yes"; then
|
||||
AC_DEFINE([HAVE_TCP_NODELAY_WITH_CORK], 1,
|
||||
[Define if TCP_NODELAY and TCP_CORK can be enabled at the same time])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl
|
||||
dnl see if O_NONBLOCK setting is inherited from listening sockets
|
||||
dnl
|
||||
AC_DEFUN([APR_CHECK_O_NONBLOCK_INHERITED], [
|
||||
AC_CACHE_CHECK(if O_NONBLOCK setting is inherited from listening sockets, ac_cv_o_nonblock_inherited,[
|
||||
AC_TRY_RUN( [
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
#ifdef HAVE_STDIO_H
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SELECT_H
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_TCP_H
|
||||
#include <netinet/tcp.h>
|
||||
#endif
|
||||
#ifndef HAVE_SOCKLEN_T
|
||||
typedef int socklen_t;
|
||||
#endif
|
||||
#ifdef HAVE_FCNTL_H
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
int main(void) {
|
||||
int listen_s, connected_s, client_s;
|
||||
int listen_port, rc;
|
||||
struct sockaddr_in sa;
|
||||
socklen_t sa_len;
|
||||
fd_set fds;
|
||||
struct timeval tv;
|
||||
|
||||
listen_s = socket(AF_INET, SOCK_STREAM, 0);
|
||||
if (listen_s < 0) {
|
||||
perror("socket");
|
||||
exit(1);
|
||||
}
|
||||
memset(&sa, 0, sizeof sa);
|
||||
sa.sin_family = AF_INET;
|
||||
#ifdef BEOS
|
||||
sa.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
|
||||
#endif
|
||||
/* leave port 0 to get ephemeral */
|
||||
rc = bind(listen_s, (struct sockaddr *)&sa, sizeof sa);
|
||||
if (rc < 0) {
|
||||
perror("bind for ephemeral port");
|
||||
exit(1);
|
||||
}
|
||||
/* find ephemeral port */
|
||||
sa_len = sizeof(sa);
|
||||
rc = getsockname(listen_s, (struct sockaddr *)&sa, &sa_len);
|
||||
if (rc < 0) {
|
||||
perror("getsockname");
|
||||
exit(1);
|
||||
}
|
||||
listen_port = sa.sin_port;
|
||||
rc = listen(listen_s, 5);
|
||||
if (rc < 0) {
|
||||
perror("listen");
|
||||
exit(1);
|
||||
}
|
||||
rc = fcntl(listen_s, F_SETFL, O_NONBLOCK);
|
||||
if (rc < 0) {
|
||||
perror("fcntl(F_SETFL)");
|
||||
exit(1);
|
||||
}
|
||||
client_s = socket(AF_INET, SOCK_STREAM, 0);
|
||||
if (client_s < 0) {
|
||||
perror("socket");
|
||||
exit(1);
|
||||
}
|
||||
memset(&sa, 0, sizeof sa);
|
||||
sa.sin_family = AF_INET;
|
||||
sa.sin_port = listen_port;
|
||||
#ifdef BEOS
|
||||
sa.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
|
||||
#endif
|
||||
/* leave sin_addr all zeros to use loopback */
|
||||
rc = connect(client_s, (struct sockaddr *)&sa, sizeof sa);
|
||||
if (rc < 0) {
|
||||
perror("connect");
|
||||
exit(1);
|
||||
}
|
||||
sa_len = sizeof sa;
|
||||
/* 1 second select timeout */
|
||||
tv.tv_sec = 1;
|
||||
tv.tv_usec = 0;
|
||||
/* Set up fd set */
|
||||
FD_ZERO(&fds);
|
||||
FD_SET(listen_s, &fds);
|
||||
/* Wait for socket to become readable */
|
||||
rc = select(listen_s + 1, &fds, NULL, NULL, &tv);
|
||||
if (rc < 0) {
|
||||
perror("select");
|
||||
exit(1);
|
||||
}
|
||||
if (rc == 0) {
|
||||
fprintf(stderr, "Socket failed to become readable (timeout)\n");
|
||||
exit(1);
|
||||
}
|
||||
if (!FD_ISSET(listen_s, &fds)) {
|
||||
fprintf(stderr, "Socket failed to become readable (selected another fd)\n");
|
||||
exit(1);
|
||||
}
|
||||
connected_s = accept(listen_s, (struct sockaddr *)&sa, &sa_len);
|
||||
if (connected_s < 0) {
|
||||
perror("accept");
|
||||
exit(1);
|
||||
}
|
||||
rc = fcntl(connected_s, F_GETFL, 0);
|
||||
if (rc < 0) {
|
||||
perror("fcntl(F_GETFL)");
|
||||
exit(1);
|
||||
}
|
||||
if (!(rc & O_NONBLOCK)) {
|
||||
fprintf(stderr, "O_NONBLOCK is not set in the child.\n");
|
||||
exit(1);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
],[
|
||||
ac_cv_o_nonblock_inherited="yes"
|
||||
],[
|
||||
ac_cv_o_nonblock_inherited="no"
|
||||
],[
|
||||
ac_cv_o_nonblock_inherited="yes"
|
||||
])])
|
||||
if test "$ac_cv_o_nonblock_inherited" = "yes"; then
|
||||
o_nonblock_inherited=1
|
||||
else
|
||||
o_nonblock_inherited=0
|
||||
fi
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl check for socklen_t, fall back to unsigned int
|
||||
dnl
|
||||
AC_DEFUN([APR_CHECK_SOCKLEN_T], [
|
||||
AC_CACHE_CHECK(for socklen_t, ac_cv_socklen_t,[
|
||||
AC_TRY_COMPILE([
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
],[
|
||||
socklen_t foo = (socklen_t) 0;
|
||||
],[
|
||||
ac_cv_socklen_t=yes
|
||||
],[
|
||||
ac_cv_socklen_t=no
|
||||
])
|
||||
])
|
||||
|
||||
if test "$ac_cv_socklen_t" = "yes"; then
|
||||
AC_DEFINE(HAVE_SOCKLEN_T, 1, [Whether you have socklen_t])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN([APR_CHECK_INET_ADDR], [
|
||||
AC_CACHE_CHECK(for inet_addr, ac_cv_func_inet_addr,[
|
||||
AC_TRY_COMPILE([
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
],[
|
||||
inet_addr("127.0.0.1");
|
||||
],[
|
||||
ac_cv_func_inet_addr=yes
|
||||
],[
|
||||
ac_cv_func_inet_addr=no
|
||||
])
|
||||
])
|
||||
|
||||
if test "$ac_cv_func_inet_addr" = "yes"; then
|
||||
have_inet_addr=1
|
||||
else
|
||||
have_inet_addr=0
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN([APR_CHECK_INET_NETWORK], [
|
||||
AC_CACHE_CHECK(for inet_network, ac_cv_func_inet_network,[
|
||||
AC_TRY_COMPILE([
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
],[
|
||||
inet_network("127.0.0.1");
|
||||
],[
|
||||
ac_cv_func_inet_network=yes
|
||||
],[
|
||||
ac_cv_func_inet_network=no
|
||||
])
|
||||
])
|
||||
|
||||
if test "$ac_cv_func_inet_network" = "yes"; then
|
||||
have_inet_network=1
|
||||
else
|
||||
have_inet_network=0
|
||||
fi
|
||||
])
|
||||
|
||||
dnl Check for presence of struct sockaddr_storage.
|
||||
AC_DEFUN([APR_CHECK_SOCKADDR_STORAGE], [
|
||||
AC_CACHE_CHECK(for sockaddr_storage, apr_cv_define_sockaddr_storage,[
|
||||
AC_TRY_COMPILE([
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
],[struct sockaddr_storage sa;],
|
||||
[apr_cv_define_sockaddr_storage=yes],
|
||||
[apr_cv_define_sockaddr_storage=no])])
|
||||
|
||||
if test "$apr_cv_define_sockaddr_storage" = "yes"; then
|
||||
have_sa_storage=1
|
||||
else
|
||||
have_sa_storage=0
|
||||
fi
|
||||
AC_SUBST(have_sa_storage)
|
||||
])
|
||||
|
||||
dnl Check for presence of struct sockaddr_in6.
|
||||
AC_DEFUN([APR_CHECK_SOCKADDR_IN6], [
|
||||
AC_CACHE_CHECK(for sockaddr_in6, ac_cv_define_sockaddr_in6,[
|
||||
AC_TRY_COMPILE([
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
],[
|
||||
struct sockaddr_in6 sa;
|
||||
],[
|
||||
ac_cv_define_sockaddr_in6=yes
|
||||
],[
|
||||
ac_cv_define_sockaddr_in6=no
|
||||
])
|
||||
])
|
||||
|
||||
if test "$ac_cv_define_sockaddr_in6" = "yes"; then
|
||||
have_sockaddr_in6=1
|
||||
else
|
||||
have_sockaddr_in6=0
|
||||
fi
|
||||
])
|
||||
|
||||
dnl Check for presence of struct sockaddr_un.
|
||||
AC_DEFUN([APR_CHECK_SOCKADDR_UN], [
|
||||
AC_CACHE_CHECK(for sockaddr_un, ac_cv_define_sockaddr_un,[
|
||||
AC_TRY_COMPILE([
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_UN_H
|
||||
#include <sys/un.h>
|
||||
#endif
|
||||
],[
|
||||
struct sockaddr_un sa;
|
||||
],[
|
||||
ac_cv_define_sockaddr_un=yes
|
||||
],[
|
||||
ac_cv_define_sockaddr_un=no
|
||||
])
|
||||
])
|
||||
|
||||
if test "$ac_cv_define_sockaddr_un" = "yes"; then
|
||||
have_sockaddr_un=1
|
||||
else
|
||||
have_sockaddr_un=0
|
||||
fi
|
||||
AC_SUBST(have_sockaddr_un)
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl APR_H_ERRNO_COMPILE_CHECK
|
||||
dnl
|
||||
AC_DEFUN([APR_H_ERRNO_COMPILE_CHECK], [
|
||||
if test x$1 != x; then
|
||||
CPPFLAGS="-D$1 $CPPFLAGS"
|
||||
fi
|
||||
AC_TRY_COMPILE([
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETDB_H
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
],[
|
||||
int h_e = h_errno;
|
||||
],[
|
||||
if test x$1 != x; then
|
||||
ac_cv_h_errno_cppflags="$1"
|
||||
else
|
||||
ac_cv_h_errno_cppflags=yes
|
||||
fi
|
||||
],[
|
||||
ac_cv_h_errno_cppflags=no
|
||||
])])
|
||||
|
||||
|
||||
dnl
|
||||
dnl APR_CHECK_SCTP
|
||||
dnl
|
||||
dnl check for presence of SCTP protocol support
|
||||
dnl
|
||||
AC_DEFUN([APR_CHECK_SCTP],
|
||||
[
|
||||
AC_CACHE_CHECK([whether SCTP is supported], [apr_cv_sctp], [
|
||||
AC_TRY_RUN([
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_SCTP_H
|
||||
#include <netinet/sctp.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_SCTP_UIO_H
|
||||
#include <netinet/sctp_uio.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
int main(void) {
|
||||
int s, opt = 1;
|
||||
if ((s = socket(AF_INET, SOCK_STREAM, IPPROTO_SCTP)) < 0)
|
||||
exit(1);
|
||||
if (setsockopt(s, IPPROTO_SCTP, SCTP_NODELAY, &opt, sizeof(int)) < 0)
|
||||
exit(2);
|
||||
exit(0);
|
||||
}], [apr_cv_sctp=yes], [apr_cv_sctp=no], [apr_cv_sctp=no])])
|
||||
|
||||
if test "$apr_cv_sctp" = "yes"; then
|
||||
have_sctp=1
|
||||
else
|
||||
have_sctp=0
|
||||
fi
|
||||
])
|
||||
|
||||
dnl APR_CHECK_MCAST: check for multicast interfaces
|
||||
AC_DEFUN([APR_CHECK_MCAST], [
|
||||
AC_CACHE_CHECK([for struct ip_mreq], [apr_cv_struct_ipmreq], [
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
], [
|
||||
struct ip_mreq mip;
|
||||
mip.imr_interface.s_addr = INADDR_ANY;
|
||||
], [apr_cv_struct_ipmreq=yes], [apr_cv_struct_ipmreq=no], [apr_cv_struct_ipmreq=yes])])
|
||||
|
||||
if test $apr_cv_struct_ipmreq = yes; then
|
||||
AC_DEFINE([HAVE_STRUCT_IPMREQ], 1, [Define if struct impreq was found])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl APR_CHECK_H_ERRNO_FLAG
|
||||
dnl
|
||||
dnl checks which flags are necessary for <netdb.h> to define h_errno
|
||||
dnl
|
||||
AC_DEFUN([APR_CHECK_H_ERRNO_FLAG], [
|
||||
AC_MSG_CHECKING([for h_errno in netdb.h])
|
||||
AC_CACHE_VAL(ac_cv_h_errno_cppflags,[
|
||||
APR_H_ERRNO_COMPILE_CHECK
|
||||
if test "$ac_cv_h_errno_cppflags" = "no"; then
|
||||
ac_save="$CPPFLAGS"
|
||||
for flag in _XOPEN_SOURCE_EXTENDED; do
|
||||
APR_H_ERRNO_COMPILE_CHECK($flag)
|
||||
if test "$ac_cv_h_errno_cppflags" != "no"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
CPPFLAGS="$ac_save"
|
||||
fi
|
||||
])
|
||||
if test "$ac_cv_h_errno_cppflags" != "no"; then
|
||||
if test "$ac_cv_h_errno_cppflags" != "yes"; then
|
||||
CPPFLAGS="-D$ac_cv_h_errno_cppflags $CPPFLAGS"
|
||||
AC_MSG_RESULT([yes, with -D$ac_cv_h_errno_cppflags])
|
||||
else
|
||||
AC_MSG_RESULT([$ac_cv_h_errno_cppflags])
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT([$ac_cv_h_errno_cppflags])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN([APR_EBCDIC], [
|
||||
AC_CACHE_CHECK([whether system uses EBCDIC],ac_cv_ebcdic,[
|
||||
AC_TRY_RUN( [
|
||||
int main(void) {
|
||||
return (unsigned char)'A' != (unsigned char)0xC1;
|
||||
}
|
||||
],[
|
||||
ac_cv_ebcdic="yes"
|
||||
],[
|
||||
ac_cv_ebcdic="no"
|
||||
],[
|
||||
ac_cv_ebcdic="no"
|
||||
])])
|
||||
if test "$ac_cv_ebcdic" = "yes"; then
|
||||
apr_charset_ebcdic=1
|
||||
else
|
||||
apr_charset_ebcdic=0
|
||||
fi
|
||||
AC_SUBST(apr_charset_ebcdic)
|
||||
])
|
||||
|
||||
+212
@@ -0,0 +1,212 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You 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.
|
||||
#
|
||||
#
|
||||
|
||||
#
|
||||
# rules.mk: standard rules for APR
|
||||
#
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
#
|
||||
# Configuration variables
|
||||
#
|
||||
apr_builddir=@apr_builddir@
|
||||
apr_builders=@apr_builders@
|
||||
top_builddir=@apr_builddir@
|
||||
|
||||
# Some layouts require knowing what version we are at.
|
||||
APR_MAJOR_VERSION=@APR_MAJOR_VERSION@
|
||||
APR_DOTTED_VERSION=@APR_DOTTED_VERSION@
|
||||
|
||||
CC=@CC@
|
||||
RM=@RM@
|
||||
AWK=@AWK@
|
||||
SHELL=@SHELL@
|
||||
LIBTOOL=@LIBTOOL@
|
||||
|
||||
# compilation and linking flags that are supposed to be set only by the user.
|
||||
# configure adds to them for tests, but we restore them at the end.
|
||||
#
|
||||
CFLAGS=@CFLAGS@
|
||||
CPPFLAGS=@CPPFLAGS@
|
||||
LDFLAGS=@LDFLAGS@
|
||||
LIBS=@LIBS@
|
||||
DEFS=@DEFS@
|
||||
|
||||
# anything added to the standard flags by configure is moved to EXTRA_*
|
||||
# at the end of the process.
|
||||
#
|
||||
EXTRA_CFLAGS=@EXTRA_CFLAGS@
|
||||
EXTRA_CPPFLAGS=@EXTRA_CPPFLAGS@
|
||||
EXTRA_LDFLAGS=@EXTRA_LDFLAGS@
|
||||
EXTRA_LIBS=@EXTRA_LIBS@
|
||||
EXTRA_INCLUDES=@EXTRA_INCLUDES@
|
||||
|
||||
# CPPFLAGS which are used only while building APR itself
|
||||
#
|
||||
INTERNAL_CPPFLAGS=@INTERNAL_CPPFLAGS@
|
||||
|
||||
# NOTEST_* are flags and libraries that can be added by the user without
|
||||
# causing them to be used in configure tests (necessary for things like
|
||||
# -Werror and other strict warnings that maintainers like to use).
|
||||
#
|
||||
NOTEST_CFLAGS=@NOTEST_CFLAGS@
|
||||
NOTEST_CPPFLAGS=@NOTEST_CPPFLAGS@
|
||||
NOTEST_LDFLAGS=@NOTEST_LDFLAGS@
|
||||
NOTEST_LIBS=@NOTEST_LIBS@
|
||||
|
||||
# Finally, combine all of the flags together in the proper order so that
|
||||
# the user-defined flags can always override the configure ones, if needed.
|
||||
# Note that includes are listed after the flags because -I options have
|
||||
# left-to-right precedence and CPPFLAGS may include user-defined overrides.
|
||||
#
|
||||
ALL_CFLAGS = $(EXTRA_CFLAGS) $(NOTEST_CFLAGS) $(CFLAGS)
|
||||
ALL_CPPFLAGS = $(DEFS) $(INTERNAL_CPPFLAGS) $(EXTRA_CPPFLAGS) $(NOTEST_CPPFLAGS) $(CPPFLAGS)
|
||||
ALL_LDFLAGS = $(EXTRA_LDFLAGS) $(NOTEST_LDFLAGS) $(LDFLAGS)
|
||||
ALL_LIBS = $(LIBS) $(NOTEST_LIBS) $(EXTRA_LIBS)
|
||||
ALL_INCLUDES = $(INCLUDES) $(EXTRA_INCLUDES)
|
||||
|
||||
LTFLAGS = @LTFLAGS@
|
||||
LT_LDFLAGS = @LT_LDFLAGS@
|
||||
|
||||
# The set of object files that will be linked into the target library.
|
||||
# The build-outputs.mk specifies a different set for each platform. The
|
||||
# configure script will select the appropriate set.
|
||||
#
|
||||
OBJECTS = @OBJECTS_PLATFORM@
|
||||
|
||||
#
|
||||
# Basic macro setup
|
||||
#
|
||||
COMPILE = $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(ALL_INCLUDES)
|
||||
LT_COMPILE = @lt_compile@
|
||||
|
||||
LINK = @link@
|
||||
|
||||
APR_MKDIR = $(apr_builders)/mkdir.sh
|
||||
APR_MKEXPORT = $(AWK) -f $(apr_builders)/make_exports.awk
|
||||
APR_MKVAREXPORT = $(AWK) -f $(apr_builders)/make_var_export.awk
|
||||
MKDEP = @MKDEP@
|
||||
|
||||
#
|
||||
# Standard build rules
|
||||
#
|
||||
all: all-recursive
|
||||
depend: depend-recursive
|
||||
clean: clean-recursive
|
||||
distclean: distclean-recursive
|
||||
extraclean: extraclean-recursive
|
||||
|
||||
install: all-recursive
|
||||
|
||||
|
||||
all-recursive depend-recursive:
|
||||
@otarget=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SOURCE_DIRS)'; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i/Makefile"; then \
|
||||
target="$$otarget"; \
|
||||
echo "Making $$target in $$i"; \
|
||||
if test "$$i" = "."; then \
|
||||
made_local=yes; \
|
||||
target="local-$$target"; \
|
||||
fi; \
|
||||
(cd $$i && $(MAKE) $$target) || exit 1; \
|
||||
fi; \
|
||||
done; \
|
||||
if test "$$otarget" = "all" && test -z "$(TARGETS)"; then \
|
||||
made_local=yes; \
|
||||
fi; \
|
||||
if test "$$made_local" != "yes"; then \
|
||||
$(MAKE) "local-$$otarget" || exit 1; \
|
||||
fi
|
||||
|
||||
clean-recursive distclean-recursive extraclean-recursive:
|
||||
@otarget=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(CLEAN_SUBDIRS)'; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i/Makefile"; then \
|
||||
target="$$otarget"; \
|
||||
echo "Making $$target in $$i"; \
|
||||
if test "$$i" = "."; then \
|
||||
made_local=yes; \
|
||||
target="local-$$target"; \
|
||||
fi; \
|
||||
(cd $$i && $(MAKE) $$target); \
|
||||
fi; \
|
||||
done; \
|
||||
if test "$$otarget" = "all" && test -z "$(TARGETS)"; then \
|
||||
made_local=yes; \
|
||||
fi; \
|
||||
if test "$$made_local" != "yes"; then \
|
||||
$(MAKE) "local-$$otarget"; \
|
||||
fi
|
||||
|
||||
# autoconf 2.5x is creating a 'autom4te.cache' directory
|
||||
# In case someone ran autoconf by hand, get rid of that directory
|
||||
# as well.
|
||||
local-clean: x-local-clean
|
||||
@list='. $(SOURCE_DIRS)'; \
|
||||
for i in $$list; do \
|
||||
echo $(RM) -f $$i/*.o $$i/*.lo $$i/*.a $$i/*.la $$i/*.so $$i/*.obj; \
|
||||
$(RM) -f $$i/*.o $$i/*.lo $$i/*.a $$i/*.la $$i/*.so $$i/*.obj; \
|
||||
echo $(RM) -rf $$i/.libs; \
|
||||
$(RM) -rf $$i/.libs; \
|
||||
done
|
||||
$(RM) -f $(CLEAN_TARGETS) $(PROGRAMS)
|
||||
$(RM) -rf autom4te.cache
|
||||
|
||||
local-distclean: local-clean x-local-distclean
|
||||
$(RM) -f Makefile $(DISTCLEAN_TARGETS)
|
||||
|
||||
local-extraclean: local-distclean x-local-extraclean
|
||||
@if test -n "$(EXTRACLEAN_TARGETS)"; then \
|
||||
echo $(RM) -f $(EXTRACLEAN_TARGETS) ; \
|
||||
$(RM) -f $(EXTRACLEAN_TARGETS) ; \
|
||||
fi
|
||||
|
||||
local-all: $(TARGETS)
|
||||
|
||||
local-depend: x-local-depend
|
||||
@if test -n "`ls $(srcdir)/*.c 2> /dev/null`"; then \
|
||||
$(RM) -f .deps; \
|
||||
list='$(srcdir)/*.c'; \
|
||||
for i in $$list; do \
|
||||
$(MKDEP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) $$i | sed 's/\.o:/.lo:/' >> .deps; \
|
||||
done; \
|
||||
fi
|
||||
|
||||
# to be filled in by the actual Makefile
|
||||
x-local-depend x-local-clean x-local-distclean x-local-extraclean:
|
||||
|
||||
#
|
||||
# Implicit rules for creating outputs from input files
|
||||
#
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.c.lo:
|
||||
$(LT_COMPILE)
|
||||
|
||||
.PHONY: all all-recursive local-all install \
|
||||
depend depend-recursive local-depend x-local-depend \
|
||||
clean clean-recursive local-clean x-local-clean \
|
||||
distclean distclean-recursive local-distclean x-local-distclean \
|
||||
extraclean extraclean-recursive local-extraclean x-local-extraclean
|
||||
+283
@@ -0,0 +1,283 @@
|
||||
dnl -------------------------------------------------------- -*- autoconf -*-
|
||||
dnl Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
dnl contributor license agreements. See the NOTICE file distributed with
|
||||
dnl this work for additional information regarding copyright ownership.
|
||||
dnl The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
dnl (the "License"); you may not use this file except in compliance with
|
||||
dnl the License. You may obtain a copy of the License at
|
||||
dnl
|
||||
dnl http://www.apache.org/licenses/LICENSE-2.0
|
||||
dnl
|
||||
dnl Unless required by applicable law or agreed to in writing, software
|
||||
dnl distributed under the License is distributed on an "AS IS" BASIS,
|
||||
dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
dnl See the License for the specific language governing permissions and
|
||||
dnl limitations under the License.
|
||||
|
||||
dnl -----------------------------------------------------------------
|
||||
dnl apr_threads.m4: APR's autoconf macros for testing thread support
|
||||
dnl
|
||||
|
||||
dnl
|
||||
dnl APR_CHECK_PTHREADS_H([ ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
||||
dnl
|
||||
dnl gcc issues warnings when parsing AIX 4.3.3's pthread.h
|
||||
dnl which causes autoconf to incorrectly conclude that
|
||||
dnl pthreads is not available.
|
||||
dnl Turn off warnings if we're using gcc.
|
||||
dnl
|
||||
AC_DEFUN(APR_CHECK_PTHREADS_H, [
|
||||
if test "$GCC" = "yes"; then
|
||||
SAVE_FL="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS -w"
|
||||
AC_CHECK_HEADERS(pthread.h, [ $1 ] , [ $2 ] )
|
||||
CPPFLAGS="$SAVE_FL"
|
||||
else
|
||||
AC_CHECK_HEADERS(pthread.h, [ $1 ] , [ $2 ] )
|
||||
fi
|
||||
])dnl
|
||||
|
||||
|
||||
dnl
|
||||
dnl APR_CHECK_PTHREAD_GETSPECIFIC_TWO_ARGS
|
||||
dnl
|
||||
AC_DEFUN(APR_CHECK_PTHREAD_GETSPECIFIC_TWO_ARGS, [
|
||||
AC_CACHE_CHECK(whether pthread_getspecific takes two arguments, ac_cv_pthread_getspecific_two_args,[
|
||||
AC_TRY_COMPILE([
|
||||
#include <pthread.h>
|
||||
],[
|
||||
pthread_key_t key;
|
||||
void *tmp;
|
||||
pthread_getspecific(key,&tmp);
|
||||
],[
|
||||
ac_cv_pthread_getspecific_two_args=yes
|
||||
],[
|
||||
ac_cv_pthread_getspecific_two_args=no
|
||||
])
|
||||
])
|
||||
|
||||
if test "$ac_cv_pthread_getspecific_two_args" = "yes"; then
|
||||
AC_DEFINE(PTHREAD_GETSPECIFIC_TAKES_TWO_ARGS, 1, [Define if pthread_getspecific() has two args])
|
||||
fi
|
||||
])dnl
|
||||
|
||||
|
||||
dnl
|
||||
dnl APR_CHECK_PTHREAD_ATTR_GETDETACHSTATE_ONE_ARG
|
||||
dnl
|
||||
AC_DEFUN(APR_CHECK_PTHREAD_ATTR_GETDETACHSTATE_ONE_ARG, [
|
||||
AC_CACHE_CHECK(whether pthread_attr_getdetachstate takes one argument, ac_cv_pthread_attr_getdetachstate_one_arg,[
|
||||
AC_TRY_COMPILE([
|
||||
#include <pthread.h>
|
||||
],[
|
||||
pthread_attr_t *attr;
|
||||
pthread_attr_getdetachstate(attr);
|
||||
],[
|
||||
ac_cv_pthread_attr_getdetachstate_one_arg=yes
|
||||
],[
|
||||
ac_cv_pthread_attr_getdetachstate_one_arg=no
|
||||
])
|
||||
])
|
||||
|
||||
if test "$ac_cv_pthread_attr_getdetachstate_one_arg" = "yes"; then
|
||||
AC_DEFINE(PTHREAD_ATTR_GETDETACHSTATE_TAKES_ONE_ARG, 1, [Define if pthread_attr_getdetachstate() has one arg])
|
||||
fi
|
||||
])dnl
|
||||
|
||||
|
||||
dnl
|
||||
dnl APR_PTHREADS_TRY_RUN(actions-if-success)
|
||||
dnl
|
||||
dnl Try running a program which uses pthreads, executing the
|
||||
dnl actions-if-success commands on success.
|
||||
dnl
|
||||
AC_DEFUN(APR_PTHREADS_TRY_RUN, [
|
||||
AC_TRY_RUN( [
|
||||
#include <pthread.h>
|
||||
#include <stddef.h>
|
||||
|
||||
void *thread_routine(void *data) {
|
||||
return data;
|
||||
}
|
||||
|
||||
int main() {
|
||||
pthread_t thd;
|
||||
pthread_mutexattr_t mattr;
|
||||
pthread_once_t once_init = PTHREAD_ONCE_INIT;
|
||||
int data = 1;
|
||||
pthread_mutexattr_init(&mattr);
|
||||
return pthread_create(&thd, NULL, thread_routine, &data);
|
||||
} ], [apr_p_t_r=yes], [apr_p_t_r=no], [apr_p_t_r=no])
|
||||
|
||||
if test $apr_p_t_r = yes; then
|
||||
$1
|
||||
fi
|
||||
|
||||
])dnl
|
||||
|
||||
|
||||
dnl
|
||||
dnl APR_PTHREADS_CHECK()
|
||||
dnl
|
||||
dnl Try to find a way to enable POSIX threads. Sets the
|
||||
dnl pthreads_working variable to "yes" on success.
|
||||
dnl
|
||||
AC_DEFUN([APR_PTHREADS_CHECK], [
|
||||
|
||||
AC_CACHE_CHECK([for CFLAGS needed for pthreads], [apr_cv_pthreads_cflags],
|
||||
[apr_ptc_cflags=$CFLAGS
|
||||
for flag in none -kthread -pthread -pthreads -mt -mthreads -Kthread -threads; do
|
||||
CFLAGS=$apr_ptc_cflags
|
||||
test "x$flag" != "xnone" && CFLAGS="$CFLAGS $flag"
|
||||
APR_PTHREADS_TRY_RUN([
|
||||
apr_cv_pthreads_cflags="$flag"
|
||||
break
|
||||
])
|
||||
done
|
||||
CFLAGS=$apr_ptc_cflags
|
||||
])
|
||||
|
||||
if test -n "$apr_cv_pthreads_cflags"; then
|
||||
pthreads_working=yes
|
||||
if test "x$apr_cv_pthreads_cflags" != "xnone"; then
|
||||
APR_ADDTO(CFLAGS,[$apr_cv_pthreads_cflags])
|
||||
fi
|
||||
fi
|
||||
|
||||
# The CFLAGS may or may not be sufficient to ensure that libapr
|
||||
# depends on the pthreads library: some versions of libtool
|
||||
# drop -pthread when passed on the link line; some versions of
|
||||
# gcc ignore -pthread when linking a shared object. So always
|
||||
# try and add the relevant library to LIBS too.
|
||||
|
||||
AC_CACHE_CHECK([for LIBS needed for pthreads], [apr_cv_pthreads_lib], [
|
||||
apr_ptc_libs=$LIBS
|
||||
for lib in -lpthread -lpthreads -lc_r; do
|
||||
LIBS="$apr_ptc_libs $lib"
|
||||
APR_PTHREADS_TRY_RUN([
|
||||
apr_cv_pthreads_lib=$lib
|
||||
break
|
||||
])
|
||||
done
|
||||
LIBS=$apr_ptc_libs
|
||||
])
|
||||
|
||||
if test -n "$apr_cv_pthreads_lib"; then
|
||||
pthreads_working=yes
|
||||
APR_ADDTO(LIBS,[$apr_cv_pthreads_lib])
|
||||
fi
|
||||
|
||||
if test "$pthreads_working" = "yes"; then
|
||||
threads_result="POSIX Threads found"
|
||||
else
|
||||
threads_result="POSIX Threads not found"
|
||||
fi
|
||||
])dnl
|
||||
|
||||
dnl
|
||||
dnl APR_PTHREADS_CHECK_SAVE
|
||||
dnl APR_PTHREADS_CHECK_RESTORE
|
||||
dnl
|
||||
dnl Save the global environment variables that might be modified during
|
||||
dnl the checks for threading support so that they can restored if the
|
||||
dnl result is not what the caller wanted.
|
||||
dnl
|
||||
AC_DEFUN(APR_PTHREADS_CHECK_SAVE, [
|
||||
apr_pthsv_CFLAGS="$CFLAGS"
|
||||
apr_pthsv_LIBS="$LIBS"
|
||||
])dnl
|
||||
|
||||
AC_DEFUN(APR_PTHREADS_CHECK_RESTORE, [
|
||||
CFLAGS="$apr_pthsv_CFLAGS"
|
||||
LIBS="$apr_pthsv_LIBS"
|
||||
])dnl
|
||||
|
||||
dnl
|
||||
dnl APR_CHECK_SIGWAIT_ONE_ARG
|
||||
dnl
|
||||
AC_DEFUN([APR_CHECK_SIGWAIT_ONE_ARG], [
|
||||
AC_CACHE_CHECK(whether sigwait takes one argument,ac_cv_sigwait_one_arg,[
|
||||
AC_TRY_COMPILE([
|
||||
#if defined(__NETBSD__) || defined(DARWIN)
|
||||
/* When using the unproven-pthreads package, we need to pull in this
|
||||
* header to get a prototype for sigwait(). Else things will fail later
|
||||
* on. XXX Should probably be fixed in the unproven-pthreads package.
|
||||
* Darwin is declaring sigwait() in the wrong place as well.
|
||||
*/
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
#include <signal.h>
|
||||
],[
|
||||
sigset_t set;
|
||||
|
||||
sigwait(&set);
|
||||
],[
|
||||
ac_cv_sigwait_one_arg=yes
|
||||
],[
|
||||
ac_cv_sigwait_one_arg=no
|
||||
])])
|
||||
if test "$ac_cv_sigwait_one_arg" = "yes"; then
|
||||
AC_DEFINE(SIGWAIT_TAKES_ONE_ARG,1,[ ])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl Check for recursive mutex support (per SUSv3).
|
||||
AC_DEFUN([APR_CHECK_PTHREAD_RECURSIVE_MUTEX], [
|
||||
AC_CACHE_CHECK([for recursive mutex support], [apr_cv_mutex_recursive],
|
||||
[AC_TRY_RUN([#include <sys/types.h>
|
||||
#include <pthread.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main() {
|
||||
pthread_mutexattr_t attr;
|
||||
pthread_mutex_t m;
|
||||
|
||||
exit (pthread_mutexattr_init(&attr)
|
||||
|| pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE)
|
||||
|| pthread_mutex_init(&m, &attr));
|
||||
}], [apr_cv_mutex_recursive=yes], [apr_cv_mutex_recursive=no],
|
||||
[apr_cv_mutex_recursive=no])])
|
||||
|
||||
if test "$apr_cv_mutex_recursive" = "yes"; then
|
||||
AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], 1,
|
||||
[Define if recursive pthread mutexes are available])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl Check for robust process-shared mutex support
|
||||
AC_DEFUN([APR_CHECK_PTHREAD_ROBUST_SHARED_MUTEX], [
|
||||
AC_CACHE_CHECK([for robust cross-process mutex support],
|
||||
[apr_cv_mutex_robust_shared],
|
||||
[AC_TRY_RUN([
|
||||
#include <sys/types.h>
|
||||
#include <pthread.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
pthread_mutex_t mutex;
|
||||
pthread_mutexattr_t attr;
|
||||
|
||||
if (pthread_mutexattr_init(&attr))
|
||||
exit(1);
|
||||
if (pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_SHARED))
|
||||
exit(2);
|
||||
if (pthread_mutexattr_setrobust_np(&attr, PTHREAD_MUTEX_ROBUST_NP))
|
||||
exit(3);
|
||||
if (pthread_mutexattr_setprotocol(&attr, PTHREAD_PRIO_INHERIT))
|
||||
exit(4);
|
||||
if (pthread_mutex_init(&mutex, &attr))
|
||||
exit(5);
|
||||
if (pthread_mutexattr_destroy(&attr))
|
||||
exit(6);
|
||||
if (pthread_mutex_destroy(&mutex))
|
||||
exit(7);
|
||||
|
||||
exit(0);
|
||||
}], [apr_cv_mutex_robust_shared=yes], [apr_cv_mutex_robust_shared=no])])
|
||||
|
||||
if test "$apr_cv_mutex_robust_shared" = "yes"; then
|
||||
AC_DEFINE([HAVE_PTHREAD_MUTEX_ROBUST], 1,
|
||||
[Define if cross-process robust mutexes are available])
|
||||
fi
|
||||
])
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
|
||||
dnl if $2 contains '@dd', links against mingw symbols
|
||||
dnl otherwise calls AC_CHECK_LIB
|
||||
AC_DEFUN([APR_CHECK_DLL_FUNC],[
|
||||
m4_define($1_function_name,m4_substr($2,0,m4_index($2,[@])))
|
||||
m4_define($1_function_arglength,m4_substr($2,m4_incr(m4_index($2,[@]))))
|
||||
m4_define($1_[function_name]_arglength,m4_substr($2,m4_incr(m4_index($2,[@]))))
|
||||
dnl m4_define(apr_check_dll_id,$1_m4_defn($1_function_name))
|
||||
|
||||
AC_CACHE_CHECK([for $2 in $1],[ac_cv_lib_$1_]$1_function_name,[
|
||||
|
||||
ac_func_search_save_LIBS=$LIBS
|
||||
LIBS="$LIBS -l$1"
|
||||
|
||||
AC_TRY_LINK([
|
||||
#pragma pack(1)
|
||||
struct x {
|
||||
]m4_for([byte_id], 1, m4_defn([$1_function_name_arglength]), 1,[[ char c]]byte_id;
|
||||
)[};
|
||||
__stdcall ]$1_function_name[(]struct x[);],[
|
||||
struct x s = {0};
|
||||
]$1_function_name[(s)],
|
||||
[ac_cv_lib_$1_]$1_function_name[=yes],[ac_cv_lib_$1_]$1_function_name[=no])
|
||||
LIBS=$ac_func_search_save_LIBS
|
||||
])dnl AC_CACHE_CHECK
|
||||
|
||||
AS_IF([test $ac_cv_lib_$1_]$1_function_name[ = yes],
|
||||
[m4_default([$3], [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_LIB$1),,Enable if this library is available)
|
||||
LIBS="-l$1 $LIBS"
|
||||
])],
|
||||
[$4])dnl
|
||||
])
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
# Microsoft Developer Studio Generated Dependency File, included by aprapp.mak
|
||||
|
||||
..\misc\win32\apr_app.c : \
|
||||
"..\include\apr.h"\
|
||||
"..\include\apr_allocator.h"\
|
||||
"..\include\apr_dso.h"\
|
||||
"..\include\apr_errno.h"\
|
||||
"..\include\apr_file_info.h"\
|
||||
"..\include\apr_file_io.h"\
|
||||
"..\include\apr_general.h"\
|
||||
"..\include\apr_getopt.h"\
|
||||
"..\include\apr_global_mutex.h"\
|
||||
"..\include\apr_inherit.h"\
|
||||
"..\include\apr_lib.h"\
|
||||
"..\include\apr_network_io.h"\
|
||||
"..\include\apr_poll.h"\
|
||||
"..\include\apr_pools.h"\
|
||||
"..\include\apr_portable.h"\
|
||||
"..\include\apr_proc_mutex.h"\
|
||||
"..\include\apr_shm.h"\
|
||||
"..\include\apr_tables.h"\
|
||||
"..\include\apr_thread_mutex.h"\
|
||||
"..\include\apr_thread_proc.h"\
|
||||
"..\include\apr_time.h"\
|
||||
"..\include\apr_user.h"\
|
||||
"..\include\apr_want.h"\
|
||||
"..\include\arch\apr_private_common.h"\
|
||||
"..\include\arch\win32\apr_arch_file_io.h"\
|
||||
"..\include\arch\win32\apr_arch_misc.h"\
|
||||
"..\include\arch\win32\apr_arch_utf8.h"\
|
||||
"..\include\arch\win32\apr_private.h"\
|
||||
|
||||
+191
@@ -0,0 +1,191 @@
|
||||
# Microsoft Developer Studio Project File - Name="aprapp" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||
|
||||
CFG=aprapp - Win32 Release
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "aprapp.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "aprapp.mak" CFG="aprapp - Win32 Release"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "aprapp - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "aprapp - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "aprapp - Win32 Release9x" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "aprapp - Win32 Debug9x" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "aprapp - x64 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "aprapp - x64 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "aprapp - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "..\LibR"
|
||||
# PROP BASE Intermediate_Dir "LibR"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "..\LibR"
|
||||
# PROP Intermediate_Dir "LibR"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "NDEBUG" /D "WINNT" /D "WIN32" /D "_WINDOWS" /D APR_APP /D "APR_DECLARE_STATIC" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\aprapp-1" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"..\LibR\aprapp-1.lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "aprapp - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "..\LibD"
|
||||
# PROP BASE Intermediate_Dir "LibD"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "..\LibD"
|
||||
# PROP Intermediate_Dir "LibD"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "_DEBUG" /D "WINNT" /D "WIN32" /D "_WINDOWS" /D APR_APP /D "APR_DECLARE_STATIC" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\aprapp-1" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"..\LibD\aprapp-1.lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "aprapp - Win32 Release9x"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "..\9x\LibR"
|
||||
# PROP BASE Intermediate_Dir "9x\LibR"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "..\9x\LibR"
|
||||
# PROP Intermediate_Dir "9x\LibR"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D APR_APP /D "APR_DECLARE_STATIC" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\aprapp-1" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"..\9x\LibR\aprapp-1.lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "aprapp - Win32 Debug9x"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "..\9x\LibD"
|
||||
# PROP BASE Intermediate_Dir "9x\LibD"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "..\9x\LibD"
|
||||
# PROP Intermediate_Dir "9x\LibD"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D APR_APP /D "APR_DECLARE_STATIC" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\aprapp-1" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"..\9x\LibD\aprapp-1.lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "aprapp - x64 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "..\x64\LibR"
|
||||
# PROP BASE Intermediate_Dir "x64\LibR"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "..\x64\LibR"
|
||||
# PROP Intermediate_Dir "x64\LibR"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "NDEBUG" /D "WINNT" /D "WIN32" /D "_WINDOWS" /D APR_APP /D "APR_DECLARE_STATIC" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\aprapp-1" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"..\x64\LibR\aprapp-1.lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "aprapp - x64 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "..\x64\LibD"
|
||||
# PROP BASE Intermediate_Dir "x64\LibD"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "..\x64\LibD"
|
||||
# PROP Intermediate_Dir "x64\LibD"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "_DEBUG" /D "WINNT" /D "WIN32" /D "_WINDOWS" /D APR_APP /D "APR_DECLARE_STATIC" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\aprapp-1" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"..\x64\LibD\aprapp-1.lib"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "aprapp - Win32 Release"
|
||||
# Name "aprapp - Win32 Debug"
|
||||
# Name "aprapp - Win32 Release9x"
|
||||
# Name "aprapp - Win32 Debug9x"
|
||||
# Name "aprapp - x64 Release"
|
||||
# Name "aprapp - x64 Debug"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\misc\win32\apr_app.c
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
+614
@@ -0,0 +1,614 @@
|
||||
# Microsoft Developer Studio Generated NMAKE File, Based on aprapp.dsp
|
||||
!IF "$(CFG)" == ""
|
||||
CFG=aprapp - Win32 Release
|
||||
!MESSAGE No configuration specified. Defaulting to aprapp - Win32 Release.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" != "aprapp - Win32 Release" && "$(CFG)" != "aprapp - Win32 Debug" && "$(CFG)" != "aprapp - Win32 Release9x" && "$(CFG)" != "aprapp - Win32 Debug9x" && "$(CFG)" != "aprapp - x64 Release" && "$(CFG)" != "aprapp - x64 Debug"
|
||||
!MESSAGE Invalid configuration "$(CFG)" specified.
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "aprapp.mak" CFG="aprapp - Win32 Release"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "aprapp - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "aprapp - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "aprapp - Win32 Release9x" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "aprapp - Win32 Debug9x" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "aprapp - x64 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "aprapp - x64 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
!ERROR An invalid configuration is specified.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(OS)" == "Windows_NT"
|
||||
NULL=
|
||||
!ELSE
|
||||
NULL=nul
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" == "aprapp - Win32 Release"
|
||||
|
||||
OUTDIR=.\..\LibR
|
||||
INTDIR=.\LibR
|
||||
# Begin Custom Macros
|
||||
OutDir=.\..\LibR
|
||||
# End Custom Macros
|
||||
|
||||
!IF "$(RECURSE)" == "0"
|
||||
|
||||
ALL : "$(OUTDIR)\aprapp-1.lib"
|
||||
|
||||
!ELSE
|
||||
|
||||
ALL : "preaprapp - Win32 Release" "$(OUTDIR)\aprapp-1.lib"
|
||||
|
||||
!ENDIF
|
||||
|
||||
!IF "$(RECURSE)" == "1"
|
||||
CLEAN :"preaprapp - Win32 ReleaseCLEAN"
|
||||
!ELSE
|
||||
CLEAN :
|
||||
!ENDIF
|
||||
-@erase "$(INTDIR)\apr_app.obj"
|
||||
-@erase "$(OUTDIR)\aprapp-1.lib"
|
||||
-@erase "..\LibR\aprapp-1.idb"
|
||||
-@erase "..\LibR\aprapp-1.pdb"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
"$(INTDIR)" :
|
||||
if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "NDEBUG" /D "WINNT" /D "WIN32" /D "_WINDOWS" /D "APR_APP" /D "APR_DECLARE_STATIC" /Fo"$(INTDIR)\\" /Fd"$(OUTDIR)\aprapp-1" /FD /c
|
||||
|
||||
.c{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.c{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
RSC=rc.exe
|
||||
BSC32=bscmake.exe
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)\aprapp.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LIB32=link.exe -lib
|
||||
LIB32_FLAGS=/nologo /out:"$(OUTDIR)\aprapp-1.lib"
|
||||
LIB32_OBJS= \
|
||||
"$(INTDIR)\apr_app.obj"
|
||||
|
||||
"$(OUTDIR)\aprapp-1.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
|
||||
$(LIB32) @<<
|
||||
$(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
|
||||
<<
|
||||
|
||||
!ELSEIF "$(CFG)" == "aprapp - Win32 Debug"
|
||||
|
||||
OUTDIR=.\..\LibD
|
||||
INTDIR=.\LibD
|
||||
# Begin Custom Macros
|
||||
OutDir=.\..\LibD
|
||||
# End Custom Macros
|
||||
|
||||
!IF "$(RECURSE)" == "0"
|
||||
|
||||
ALL : "$(OUTDIR)\aprapp-1.lib"
|
||||
|
||||
!ELSE
|
||||
|
||||
ALL : "preaprapp - Win32 Debug" "$(OUTDIR)\aprapp-1.lib"
|
||||
|
||||
!ENDIF
|
||||
|
||||
!IF "$(RECURSE)" == "1"
|
||||
CLEAN :"preaprapp - Win32 DebugCLEAN"
|
||||
!ELSE
|
||||
CLEAN :
|
||||
!ENDIF
|
||||
-@erase "$(INTDIR)\apr_app.obj"
|
||||
-@erase "$(OUTDIR)\aprapp-1.lib"
|
||||
-@erase "..\LibD\aprapp-1.idb"
|
||||
-@erase "..\LibD\aprapp-1.pdb"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
"$(INTDIR)" :
|
||||
if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "_DEBUG" /D "WINNT" /D "WIN32" /D "_WINDOWS" /D "APR_APP" /D "APR_DECLARE_STATIC" /Fo"$(INTDIR)\\" /Fd"$(OUTDIR)\aprapp-1" /FD /EHsc /c
|
||||
|
||||
.c{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.c{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
RSC=rc.exe
|
||||
BSC32=bscmake.exe
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)\aprapp.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LIB32=link.exe -lib
|
||||
LIB32_FLAGS=/nologo /out:"$(OUTDIR)\aprapp-1.lib"
|
||||
LIB32_OBJS= \
|
||||
"$(INTDIR)\apr_app.obj"
|
||||
|
||||
"$(OUTDIR)\aprapp-1.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
|
||||
$(LIB32) @<<
|
||||
$(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
|
||||
<<
|
||||
|
||||
!ELSEIF "$(CFG)" == "aprapp - Win32 Release9x"
|
||||
|
||||
OUTDIR=.\..\9x\LibR
|
||||
INTDIR=.\9x\LibR
|
||||
# Begin Custom Macros
|
||||
OutDir=.\..\9x\LibR
|
||||
# End Custom Macros
|
||||
|
||||
!IF "$(RECURSE)" == "0"
|
||||
|
||||
ALL : "$(OUTDIR)\aprapp-1.lib"
|
||||
|
||||
!ELSE
|
||||
|
||||
ALL : "preaprapp - Win32 Release9x" "$(OUTDIR)\aprapp-1.lib"
|
||||
|
||||
!ENDIF
|
||||
|
||||
!IF "$(RECURSE)" == "1"
|
||||
CLEAN :"preaprapp - Win32 Release9xCLEAN"
|
||||
!ELSE
|
||||
CLEAN :
|
||||
!ENDIF
|
||||
-@erase "$(INTDIR)\apr_app.obj"
|
||||
-@erase "$(OUTDIR)\aprapp-1.lib"
|
||||
-@erase "..\9x\LibR\aprapp-1.idb"
|
||||
-@erase "..\9x\LibR\aprapp-1.pdb"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
"$(INTDIR)" :
|
||||
if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APR_APP" /D "APR_DECLARE_STATIC" /Fo"$(INTDIR)\\" /Fd"$(OUTDIR)\aprapp-1" /FD /c
|
||||
|
||||
.c{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.c{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
RSC=rc.exe
|
||||
BSC32=bscmake.exe
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)\aprapp.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LIB32=link.exe -lib
|
||||
LIB32_FLAGS=/nologo /out:"$(OUTDIR)\aprapp-1.lib"
|
||||
LIB32_OBJS= \
|
||||
"$(INTDIR)\apr_app.obj"
|
||||
|
||||
"$(OUTDIR)\aprapp-1.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
|
||||
$(LIB32) @<<
|
||||
$(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
|
||||
<<
|
||||
|
||||
!ELSEIF "$(CFG)" == "aprapp - Win32 Debug9x"
|
||||
|
||||
OUTDIR=.\..\9x\LibD
|
||||
INTDIR=.\9x\LibD
|
||||
# Begin Custom Macros
|
||||
OutDir=.\..\9x\LibD
|
||||
# End Custom Macros
|
||||
|
||||
!IF "$(RECURSE)" == "0"
|
||||
|
||||
ALL : "$(OUTDIR)\aprapp-1.lib"
|
||||
|
||||
!ELSE
|
||||
|
||||
ALL : "preaprapp - Win32 Debug9x" "$(OUTDIR)\aprapp-1.lib"
|
||||
|
||||
!ENDIF
|
||||
|
||||
!IF "$(RECURSE)" == "1"
|
||||
CLEAN :"preaprapp - Win32 Debug9xCLEAN"
|
||||
!ELSE
|
||||
CLEAN :
|
||||
!ENDIF
|
||||
-@erase "$(INTDIR)\apr_app.obj"
|
||||
-@erase "$(OUTDIR)\aprapp-1.lib"
|
||||
-@erase "..\9x\LibD\aprapp-1.idb"
|
||||
-@erase "..\9x\LibD\aprapp-1.pdb"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
"$(INTDIR)" :
|
||||
if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APR_APP" /D "APR_DECLARE_STATIC" /Fo"$(INTDIR)\\" /Fd"$(OUTDIR)\aprapp-1" /FD /EHsc /c
|
||||
|
||||
.c{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.c{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
RSC=rc.exe
|
||||
BSC32=bscmake.exe
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)\aprapp.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LIB32=link.exe -lib
|
||||
LIB32_FLAGS=/nologo /out:"$(OUTDIR)\aprapp-1.lib"
|
||||
LIB32_OBJS= \
|
||||
"$(INTDIR)\apr_app.obj"
|
||||
|
||||
"$(OUTDIR)\aprapp-1.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
|
||||
$(LIB32) @<<
|
||||
$(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
|
||||
<<
|
||||
|
||||
!ELSEIF "$(CFG)" == "aprapp - x64 Release"
|
||||
|
||||
OUTDIR=.\..\x64\LibR
|
||||
INTDIR=.\x64\LibR
|
||||
# Begin Custom Macros
|
||||
OutDir=.\..\x64\LibR
|
||||
# End Custom Macros
|
||||
|
||||
!IF "$(RECURSE)" == "0"
|
||||
|
||||
ALL : "$(OUTDIR)\aprapp-1.lib"
|
||||
|
||||
!ELSE
|
||||
|
||||
ALL : "preaprapp - x64 Release" "$(OUTDIR)\aprapp-1.lib"
|
||||
|
||||
!ENDIF
|
||||
|
||||
!IF "$(RECURSE)" == "1"
|
||||
CLEAN :"preaprapp - x64 ReleaseCLEAN"
|
||||
!ELSE
|
||||
CLEAN :
|
||||
!ENDIF
|
||||
-@erase "$(INTDIR)\apr_app.obj"
|
||||
-@erase "$(OUTDIR)\aprapp-1.lib"
|
||||
-@erase "..\x64\LibR\aprapp-1.idb"
|
||||
-@erase "..\x64\LibR\aprapp-1.pdb"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
"$(INTDIR)" :
|
||||
if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "NDEBUG" /D "WINNT" /D "WIN32" /D "_WINDOWS" /D "APR_APP" /D "APR_DECLARE_STATIC" /Fo"$(INTDIR)\\" /Fd"$(OUTDIR)\aprapp-1" /FD /c
|
||||
|
||||
.c{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.c{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
RSC=rc.exe
|
||||
BSC32=bscmake.exe
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)\aprapp.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LIB32=link.exe -lib
|
||||
LIB32_FLAGS=/nologo /out:"$(OUTDIR)\aprapp-1.lib"
|
||||
LIB32_OBJS= \
|
||||
"$(INTDIR)\apr_app.obj"
|
||||
|
||||
"$(OUTDIR)\aprapp-1.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
|
||||
$(LIB32) @<<
|
||||
$(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
|
||||
<<
|
||||
|
||||
!ELSEIF "$(CFG)" == "aprapp - x64 Debug"
|
||||
|
||||
OUTDIR=.\..\x64\LibD
|
||||
INTDIR=.\x64\LibD
|
||||
# Begin Custom Macros
|
||||
OutDir=.\..\x64\LibD
|
||||
# End Custom Macros
|
||||
|
||||
!IF "$(RECURSE)" == "0"
|
||||
|
||||
ALL : "$(OUTDIR)\aprapp-1.lib"
|
||||
|
||||
!ELSE
|
||||
|
||||
ALL : "preaprapp - x64 Debug" "$(OUTDIR)\aprapp-1.lib"
|
||||
|
||||
!ENDIF
|
||||
|
||||
!IF "$(RECURSE)" == "1"
|
||||
CLEAN :"preaprapp - x64 DebugCLEAN"
|
||||
!ELSE
|
||||
CLEAN :
|
||||
!ENDIF
|
||||
-@erase "$(INTDIR)\apr_app.obj"
|
||||
-@erase "$(OUTDIR)\aprapp-1.lib"
|
||||
-@erase "..\x64\LibD\aprapp-1.idb"
|
||||
-@erase "..\x64\LibD\aprapp-1.pdb"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
"$(INTDIR)" :
|
||||
if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "_DEBUG" /D "WINNT" /D "WIN32" /D "_WINDOWS" /D "APR_APP" /D "APR_DECLARE_STATIC" /Fo"$(INTDIR)\\" /Fd"$(OUTDIR)\aprapp-1" /FD /EHsc /c
|
||||
|
||||
.c{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.c{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
RSC=rc.exe
|
||||
BSC32=bscmake.exe
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)\aprapp.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LIB32=link.exe -lib
|
||||
LIB32_FLAGS=/nologo /out:"$(OUTDIR)\aprapp-1.lib"
|
||||
LIB32_OBJS= \
|
||||
"$(INTDIR)\apr_app.obj"
|
||||
|
||||
"$(OUTDIR)\aprapp-1.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
|
||||
$(LIB32) @<<
|
||||
$(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
|
||||
<<
|
||||
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IF "$(NO_EXTERNAL_DEPS)" != "1"
|
||||
!IF EXISTS("aprapp.dep")
|
||||
!INCLUDE "aprapp.dep"
|
||||
!ELSE
|
||||
!MESSAGE Warning: cannot find "aprapp.dep"
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IF "$(CFG)" == "aprapp - Win32 Release" || "$(CFG)" == "aprapp - Win32 Debug" || "$(CFG)" == "aprapp - Win32 Release9x" || "$(CFG)" == "aprapp - Win32 Debug9x" || "$(CFG)" == "aprapp - x64 Release" || "$(CFG)" == "aprapp - x64 Debug"
|
||||
|
||||
!IF "$(CFG)" == "aprapp - Win32 Release"
|
||||
|
||||
"preaprapp - Win32 Release" :
|
||||
cd "."
|
||||
NMAKE /nologo /f NUL
|
||||
cd "."
|
||||
|
||||
"preaprapp - Win32 ReleaseCLEAN" :
|
||||
cd "."
|
||||
cd "."
|
||||
|
||||
!ELSEIF "$(CFG)" == "aprapp - Win32 Debug"
|
||||
|
||||
"preaprapp - Win32 Debug" :
|
||||
cd "."
|
||||
NMAKE /nologo /f NUL
|
||||
cd "."
|
||||
|
||||
"preaprapp - Win32 DebugCLEAN" :
|
||||
cd "."
|
||||
cd "."
|
||||
|
||||
!ELSEIF "$(CFG)" == "aprapp - Win32 Release9x"
|
||||
|
||||
"preaprapp - Win32 Release9x" :
|
||||
cd "."
|
||||
NMAKE /nologo /f NUL
|
||||
cd "."
|
||||
|
||||
"preaprapp - Win32 Release9xCLEAN" :
|
||||
cd "."
|
||||
cd "."
|
||||
|
||||
!ELSEIF "$(CFG)" == "aprapp - Win32 Debug9x"
|
||||
|
||||
"preaprapp - Win32 Debug9x" :
|
||||
cd "."
|
||||
NMAKE /nologo /f NUL
|
||||
cd "."
|
||||
|
||||
"preaprapp - Win32 Debug9xCLEAN" :
|
||||
cd "."
|
||||
cd "."
|
||||
|
||||
!ELSEIF "$(CFG)" == "aprapp - x64 Release"
|
||||
|
||||
"preaprapp - x64 Release" :
|
||||
cd "."
|
||||
NMAKE /nologo /f NUL
|
||||
cd "."
|
||||
|
||||
"preaprapp - x64 ReleaseCLEAN" :
|
||||
cd "."
|
||||
cd "."
|
||||
|
||||
!ELSEIF "$(CFG)" == "aprapp - x64 Debug"
|
||||
|
||||
"preaprapp - x64 Debug" :
|
||||
cd "."
|
||||
NMAKE /nologo /f NUL
|
||||
cd "."
|
||||
|
||||
"preaprapp - x64 DebugCLEAN" :
|
||||
cd "."
|
||||
cd "."
|
||||
|
||||
!ENDIF
|
||||
|
||||
SOURCE=..\misc\win32\apr_app.c
|
||||
|
||||
"$(INTDIR)\apr_app.obj" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
#! /bin/sh
|
||||
|
||||
echo "buildconf: checking installation..."
|
||||
res=0
|
||||
|
||||
# any python
|
||||
python=`build/PrintPath python`
|
||||
if test -z "$python"; then
|
||||
echo "buildconf: python not found."
|
||||
echo " You need python installed"
|
||||
echo " to build APR from SVN."
|
||||
res=1
|
||||
else
|
||||
py_version=`python -c 'import sys; print sys.version' 2>&1|sed 's/ .*//;q'`
|
||||
echo "buildconf: python version $py_version (ok)"
|
||||
fi
|
||||
|
||||
# autoconf 2.59 or newer
|
||||
ac_version=`${AUTOCONF:-autoconf} --version 2>/dev/null|sed -e 's/^[^0-9]*//;s/[a-z]* *$//;q'`
|
||||
if test -z "$ac_version"; then
|
||||
echo "buildconf: autoconf not found."
|
||||
echo " You need autoconf version 2.59 or newer installed"
|
||||
echo " to build APR from SVN."
|
||||
res=1
|
||||
else
|
||||
IFS=.; set $ac_version; IFS=' '
|
||||
if test "$1" = "2" -a "$2" -lt "59" || test "$1" -lt "2"; then
|
||||
echo "buildconf: autoconf version $ac_version found."
|
||||
echo " You need autoconf version 2.59 or newer installed"
|
||||
echo " to build APR from SVN."
|
||||
res=1
|
||||
else
|
||||
echo "buildconf: autoconf version $ac_version (ok)"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Sample libtool --version outputs:
|
||||
# ltmain.sh (GNU libtool) 1.3.3 (1.385.2.181 1999/07/02 15:49:11)
|
||||
# ltmain.sh (GNU libtool 1.1361 2004/01/02 23:10:52) 1.5a
|
||||
# output is multiline from 1.5 onwards
|
||||
|
||||
# Require libtool 1.4 or newer
|
||||
libtool=`build/PrintPath glibtool1 glibtool libtool libtool15 libtool14`
|
||||
lt_pversion=`$libtool --version 2>/dev/null|sed -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'`
|
||||
if test -z "$lt_pversion"; then
|
||||
echo "buildconf: libtool not found."
|
||||
echo " You need libtool version 1.4 or newer installed"
|
||||
echo " to build APR from SVN."
|
||||
res=1
|
||||
else
|
||||
lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$/.\1/'`
|
||||
IFS=.; set $lt_version; IFS=' '
|
||||
lt_status="good"
|
||||
if test "$1" = "1"; then
|
||||
if test "$2" -lt "4"; then
|
||||
lt_status="bad"
|
||||
fi
|
||||
fi
|
||||
if test $lt_status = "good"; then
|
||||
echo "buildconf: libtool version $lt_pversion (ok)"
|
||||
else
|
||||
echo "buildconf: libtool version $lt_pversion found."
|
||||
echo " You need libtool version 1.4 or newer installed"
|
||||
echo " to build APR from SVN."
|
||||
res=1
|
||||
fi
|
||||
fi
|
||||
|
||||
exit $res
|
||||
|
||||
+1466
File diff suppressed because it is too large
Load Diff
+1848
File diff suppressed because it is too large
Load Diff
+679
@@ -0,0 +1,679 @@
|
||||
use IO::File;
|
||||
use File::Find;
|
||||
|
||||
if ($ARGV[0] eq '-6') {
|
||||
find(\&tovc6, '.');
|
||||
}
|
||||
elsif ($ARGV[0] eq '-5') {
|
||||
find(\&tovc5, '.');
|
||||
}
|
||||
elsif ($ARGV[0] eq '-2005') {
|
||||
find(\&tovc2005, '.');
|
||||
}
|
||||
elsif ($ARGV[0] eq '-w3') {
|
||||
find(\&tow3, '.');
|
||||
}
|
||||
elsif ($ARGV[0] eq '-w4') {
|
||||
find(\&tow4, '.');
|
||||
}
|
||||
elsif ($ARGV[0] eq '-ia64') {
|
||||
find(\&tovc64, '.');
|
||||
}
|
||||
elsif ($ARGV[0] eq '-d') {
|
||||
find(\&todebugpools, '.');
|
||||
}
|
||||
elsif ($ARGV[0] eq '-b') {
|
||||
find(\&tobrowse, '.');
|
||||
}
|
||||
elsif ($ARGV[0] eq '-mt') {
|
||||
find(\&addmt, '.');
|
||||
}
|
||||
elsif ($ARGV[0] eq '-m') {
|
||||
## 0 - conapp, 1 - dll lib, 2 - static lib
|
||||
$dsptype = 2;
|
||||
$name = "apr";
|
||||
onemake();
|
||||
}
|
||||
elsif ($ARGV[0] eq '-ossl11') {
|
||||
find(\&toossl1, '.');
|
||||
}
|
||||
elsif ($ARGV[0] eq '-apr16') {
|
||||
find(\&toapr16, '.');
|
||||
}
|
||||
else {
|
||||
print "Specify -5 or -6 for Visual Studio 5 or 6 (98) .dsp format\n";
|
||||
print "Specify -w3 or -w4 for .dsp build with warning level 3 or 4 (strict)\n\n";
|
||||
print "Specify -ia64 for build targeted at Itanium (req's psdk tools)\n\n";
|
||||
print "Specify -p for extreme pool debugging\n\n";
|
||||
print "Specify -mt to add .manifest embedding\n\n";
|
||||
die "Missing argument";
|
||||
}
|
||||
|
||||
sub addmt {
|
||||
my $outpath, $outtype;
|
||||
|
||||
if (m|\.dsp$|) {
|
||||
$oname = $_;
|
||||
$tname = '.#' . $_;
|
||||
$verchg = 0;
|
||||
$srcfl = new IO::File $oname, "r" || die;
|
||||
$dstfl = new IO::File $tname, "w" || die;
|
||||
while ($src = <$srcfl>) {
|
||||
if ($src =~ m|^# TARGTYPE .+ Application|) {
|
||||
$outtype = ".exe"
|
||||
}
|
||||
if ($src =~ m|^# TARGTYPE .+ Dynamic-Link|) {
|
||||
$outtype = ".dll"
|
||||
}
|
||||
if ($src =~ m|^# PROP Output_Dir "(.+)"|) {
|
||||
$outdir = $1;
|
||||
$outpath = $oname;
|
||||
$outpath =~ s|\.dsp||;
|
||||
$outpath = ".\\" . $outdir . "\\" . $outpath . $outtype;
|
||||
}
|
||||
if ($src =~ m|^# ADD (BASE )?LINK32 .+ /out:"([^"]+)"|) {
|
||||
$outpath = $2;
|
||||
$outpath =~ s|/|\\|;
|
||||
$outpath = ".\\" . $outpath if (!($outpath =~ m|^\.|));
|
||||
$src =~ s|/out:"([^"]+)"|/out:"$outpath"|;
|
||||
}
|
||||
if (defined($outpath) && ($src =~ m|^# Begin Special Build Tool|)) {
|
||||
undef $outpath;
|
||||
}
|
||||
if (defined($outpath) && defined($outtype) && ($src =~ m|^\s*$|)) {
|
||||
print $dstfl '# Begin Special Build Tool' . "\n";
|
||||
print $dstfl 'TargetPath=' . $outpath . "\n";
|
||||
print $dstfl 'SOURCE="$(InputPath)"' . "\n";
|
||||
print $dstfl 'PostBuild_Desc=Embed .manifest' . "\n";
|
||||
print $dstfl 'PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2' . "\n";
|
||||
print $dstfl '# End Special Build Tool' . "\n";
|
||||
$verchg = -1;
|
||||
undef $outpath;
|
||||
}
|
||||
print $dstfl $src;
|
||||
}
|
||||
undef $outtype if (defined($outtype));
|
||||
undef $outpath if (defined($outpath));
|
||||
undef $srcfl;
|
||||
undef $dstfl;
|
||||
if ($verchg) {
|
||||
unlink $oname || die;
|
||||
rename $tname, $oname || die;
|
||||
print "Added manifest to " . $oname . " in " . $File::Find::dir . "\n";
|
||||
}
|
||||
else {
|
||||
unlink $tname;
|
||||
}
|
||||
}
|
||||
}
|
||||
sub tovc5 {
|
||||
|
||||
if (m|\.dsp$|) {
|
||||
$oname = $_;
|
||||
$tname = '.#' . $_;
|
||||
$verchg = 0;
|
||||
$srcfl = new IO::File $oname, "r" || die;
|
||||
$dstfl = new IO::File $tname, "w" || die;
|
||||
while ($src = <$srcfl>) {
|
||||
if ($src =~ s|Format Version 6\.00|Format Version 5\.00|) {
|
||||
$verchg = -1;
|
||||
}
|
||||
if ($src =~ s|^(# ADD CPP .*)/ZI (.*)|$1/Zi $2|) {
|
||||
$verchg = -1;
|
||||
}
|
||||
if ($src =~ s|^(# ADD BASE CPP .*)/ZI (.*)|$1/Zi $2|) {
|
||||
$verchg = -1;
|
||||
}
|
||||
if ($src =~ s|^(# ADD CPP .*)/EHsc (.*)|$1/GX $2|) {
|
||||
$verchg = -1;
|
||||
}
|
||||
if ($src =~ s|^(# ADD BASE CPP .*)/EHsc (.*)|$1/GX $2|) {
|
||||
$verchg = -1;
|
||||
}
|
||||
while ($src =~ s|^(# ADD RSC .*)/d "([^ ="]+)=([^"]+)"|$1/d $2="$3"|) {
|
||||
$verchg = -1;
|
||||
}
|
||||
if ($src !~ m|^# PROP AllowPerConfigDependencies|) {
|
||||
print $dstfl $src; }
|
||||
else {
|
||||
$verchg = -1;
|
||||
}
|
||||
}
|
||||
undef $srcfl;
|
||||
undef $dstfl;
|
||||
if ($verchg) {
|
||||
unlink $oname || die;
|
||||
rename $tname, $oname || die;
|
||||
print "Converted VC6 project " . $oname . " to VC5 in " . $File::Find::dir . "\n";
|
||||
}
|
||||
else {
|
||||
unlink $tname;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub tovc6 {
|
||||
|
||||
if (m|\.dsp$|) {
|
||||
$oname = $_;
|
||||
$tname = '.#' . $_;
|
||||
$verchg = 0;
|
||||
$srcfl = new IO::File $_, "r" || die;
|
||||
$dstfl = new IO::File $tname, "w" || die;
|
||||
while ($src = <$srcfl>) {
|
||||
if ($src =~ s|Format Version 5\.00|Format Version 6\.00|) {
|
||||
$verchg = -1;
|
||||
}
|
||||
if ($src =~ s|^(!MESSAGE .*)\\\n|$1|) {
|
||||
$cont = <$srcfl>;
|
||||
$src = $src . $cont;
|
||||
$verchg = -1;
|
||||
}
|
||||
if ($src =~ s|^(# ADD CPP .*)/GX (.*)|$1/EHsc $2|) {
|
||||
$verchg = -1;
|
||||
}
|
||||
if ($src =~ s|^(# ADD BASE CPP .*)/GX (.*)|$1/EHsc $2|) {
|
||||
$verchg = -1;
|
||||
}
|
||||
while ($src =~ s|^(# ADD RSC .*)/d "([^ ="]+)=([^"]+)"|$1/d $2="$3"|) {
|
||||
$verchg = -1;
|
||||
}
|
||||
print $dstfl $src;
|
||||
if ($verchg && $src =~ m|^# Begin Project|) {
|
||||
print $dstfl "# PROP AllowPerConfigDependencies 0\n";
|
||||
}
|
||||
}
|
||||
undef $srcfl;
|
||||
undef $dstfl;
|
||||
if ($verchg) {
|
||||
unlink $oname || die;
|
||||
rename $tname, $oname || die;
|
||||
print "Converted VC5 project " . $oname . " to VC6 in " . $File::Find::dir . "\n";
|
||||
}
|
||||
else {
|
||||
unlink $tname;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub tovc2005 {
|
||||
|
||||
if (m|\.dsp$| || m|\.mak$|) {
|
||||
$oname = $_;
|
||||
$tname = '.#' . $_;
|
||||
$verchg = 0;
|
||||
$srcfl = new IO::File $_, "r" || die;
|
||||
$dstfl = new IO::File $tname, "w" || die;
|
||||
while ($src = <$srcfl>) {
|
||||
if ($src =~ s|(\bCPP.*) /GX(.*)|$1 /EHsc$2|) {
|
||||
$verchg = -1;
|
||||
}
|
||||
if ($src =~ s|(\bLINK32.*) /machine:I386(.*)|$1$2|) {
|
||||
$verchg = -1;
|
||||
}
|
||||
while ($src =~ s|^(# ADD RSC .*)/d ([^ ="]+)="([^"]+)"|$1/d "$2=$3"|) {
|
||||
$verchg = -1;
|
||||
}
|
||||
print $dstfl $src;
|
||||
}
|
||||
undef $srcfl;
|
||||
undef $dstfl;
|
||||
if ($verchg) {
|
||||
unlink $oname || die;
|
||||
rename $tname, $oname || die;
|
||||
print "Converted project " . $oname . " to 2005 in " . $File::Find::dir . "\n";
|
||||
}
|
||||
else {
|
||||
unlink $tname;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub toossl1 {
|
||||
|
||||
if (m|\.dsp$| || m|\.dsw$|) {
|
||||
$oname = $_;
|
||||
$tname = '.#' . $_;
|
||||
$verchg = 0;
|
||||
$srcfl = new IO::File $_, "r" || die;
|
||||
$dstfl = new IO::File $tname, "w" || die;
|
||||
while ($src = <$srcfl>) {
|
||||
if ($src =~ s|inc32\"|include\" /I \"../../srclib/openssl/ms\"|) {
|
||||
$verchg = -1;
|
||||
}
|
||||
if ($src =~ s|libeay32|libcrypto|) {
|
||||
$verchg = -1;
|
||||
}
|
||||
if ($src =~ s|ssleay32|libssl|) {
|
||||
$verchg = -1;
|
||||
}
|
||||
if ($src =~ s|(\\\|/)?out32dll||) {
|
||||
$verchg = -1;
|
||||
}
|
||||
# we must have apr-1.6+ to build with OpenSSL 1.1.0
|
||||
# deal with the moving of xml.mak
|
||||
if ($src =~ s|xml\\expat\\lib\\xml|xml\\xml|) {
|
||||
$verchg = -1;
|
||||
}
|
||||
print $dstfl $src;
|
||||
}
|
||||
undef $srcfl;
|
||||
undef $dstfl;
|
||||
if ($verchg) {
|
||||
unlink $oname || die;
|
||||
rename $tname, $oname || die;
|
||||
print "Converted project " . $oname . " to OpenSSL 1.1.0 in " . $File::Find::dir . "\n";
|
||||
}
|
||||
else {
|
||||
unlink $tname;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub toapr16 {
|
||||
|
||||
if (m|\.dsw$|) {
|
||||
$oname = $_;
|
||||
$tname = '.#' . $_;
|
||||
$verchg = 0;
|
||||
$srcfl = new IO::File $_, "r" || die;
|
||||
$dstfl = new IO::File $tname, "w" || die;
|
||||
while ($src = <$srcfl>) {
|
||||
if ($src =~ s|xml\\expat\\lib\\xml|xml\\xml|) {
|
||||
$verchg = -1;
|
||||
}
|
||||
print $dstfl $src;
|
||||
}
|
||||
undef $srcfl;
|
||||
undef $dstfl;
|
||||
if ($verchg) {
|
||||
unlink $oname || die;
|
||||
rename $tname, $oname || die;
|
||||
print "Converted project " . $oname . " to OpenSSL 1.1.0 in " . $File::Find::dir . "\n";
|
||||
}
|
||||
else {
|
||||
unlink $tname;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub tow3 {
|
||||
|
||||
if (m|\.dsp$| || m|\.mak$|) {
|
||||
$oname = $_;
|
||||
$tname = '.#' . $_;
|
||||
$verchg = 0;
|
||||
$srcfl = new IO::File $_, "r" || die;
|
||||
$dstfl = new IO::File $tname, "w" || die;
|
||||
while ($src = <$srcfl>) {
|
||||
while ($src =~ m|\\\n$|) {
|
||||
$src = $src . <$srcfl>
|
||||
}
|
||||
if ($src =~ s|(\bCPP.*) /W4(.*)|$1 /W3$2|) {
|
||||
$verchg = -1;
|
||||
}
|
||||
print $dstfl $src;
|
||||
}
|
||||
undef $srcfl;
|
||||
undef $dstfl;
|
||||
if ($verchg) {
|
||||
unlink $oname || die;
|
||||
rename $tname, $oname || die;
|
||||
print "Converted project " . $oname . " to warn:3 in " . $File::Find::dir . "\n";
|
||||
}
|
||||
else {
|
||||
unlink $tname;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub tow4 {
|
||||
|
||||
if (m|\.dsp$| || m|\.mak$|) {
|
||||
$oname = $_;
|
||||
$tname = '.#' . $_;
|
||||
$verchg = 0;
|
||||
$srcfl = new IO::File $_, "r" || die;
|
||||
$dstfl = new IO::File $tname, "w" || die;
|
||||
while ($src = <$srcfl>) {
|
||||
while ($src =~ m|\\\n$|) {
|
||||
$src = $src . <$srcfl>
|
||||
}
|
||||
if ($src =~ s|(\bCPP.*) /W3(.*)|$1 /W4$2|) {
|
||||
$verchg = -1;
|
||||
}
|
||||
print $dstfl $src;
|
||||
}
|
||||
undef $srcfl;
|
||||
undef $dstfl;
|
||||
if ($verchg) {
|
||||
unlink $oname || die;
|
||||
rename $tname, $oname || die;
|
||||
print "Converted project " . $oname . " to warn:4 " . $File::Find::dir . "\n";
|
||||
}
|
||||
else {
|
||||
unlink $tname;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub tovc64 {
|
||||
|
||||
if (m|\.dsp$| || m|\.mak$|) {
|
||||
$oname = $_;
|
||||
$tname = '.#' . $_;
|
||||
$verchg = 0;
|
||||
$srcfl = new IO::File $_, "r" || die;
|
||||
$dstfl = new IO::File $tname, "w" || die;
|
||||
while ($src = <$srcfl>) {
|
||||
while ($src =~ m|\\\n$|) {
|
||||
$src = $src . <$srcfl>
|
||||
}
|
||||
if ($src =~ s|Win32 \(x86\) (Release)|Win32 (IA64) $1|s) {
|
||||
$verchg = -1;
|
||||
}
|
||||
if ($src =~ s|Win32 \(x86\) (Debug)|Win32 (IA64) $1|s) {
|
||||
$verchg = -1;
|
||||
}
|
||||
if ($src =~ s| - Win32 (Release)| - Win32 (IA64) $1|s) {
|
||||
$verchg = -1;
|
||||
}
|
||||
if ($src =~ s| - Win32 (Debug)| - Win32 (IA64) $1|s) {
|
||||
$verchg = -1;
|
||||
}
|
||||
# Cross compilation exceptions
|
||||
if (!(m|gen[^/]*$| || m|dftables[^/]*$|)) {
|
||||
if ($src =~ s|(\bCPP.* /W3)(.*) /FD(.*)|$1 /As64 /Wp64$2$3|s) {
|
||||
$verchg = -1;
|
||||
}
|
||||
if ($src =~ s|(\bLINK.*/machine):I386(.*)|$1:IA64$2|s) {
|
||||
$verchg = -1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($src =~ s|(\bCPP.* /W3)(.*) /FD(.*)|$1 /As32 /Wp64$2$3|s) {
|
||||
$verchg = -1;
|
||||
}
|
||||
}
|
||||
print $dstfl $src;
|
||||
}
|
||||
undef $srcfl;
|
||||
undef $dstfl;
|
||||
if ($verchg) {
|
||||
unlink $oname || die;
|
||||
rename $tname, $oname || die;
|
||||
print "Converted build file " . $oname . " to Win64 in " . $File::Find::dir . "\n";
|
||||
}
|
||||
else {
|
||||
unlink $tname;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub todebugpools {
|
||||
|
||||
if (m|\.dsp$|) {
|
||||
$oname = $_;
|
||||
$tname = '.#' . $_;
|
||||
$verchg = 0;
|
||||
$srcfl = new IO::File $oname, "r" || die;
|
||||
$dstfl = new IO::File $tname, "w" || die;
|
||||
while ($src = <$srcfl>) {
|
||||
if ($src =~ s|^(# ADD CPP .* /D "_DEBUG" )|$1/D "APR_POOL_DEBUG" |) {
|
||||
$verchg = -1;
|
||||
if ($oname =~ /apr\.dsp$/) {
|
||||
$src =~ s|^(# ADD CPP .* /D "_DEBUG" )|$1/D "POOL_DEBUG" |;
|
||||
}
|
||||
}
|
||||
print $dstfl $src;
|
||||
}
|
||||
undef $srcfl;
|
||||
undef $dstfl;
|
||||
if ($verchg) {
|
||||
unlink $oname || die;
|
||||
rename $tname, $oname || die;
|
||||
print "Converted project " . $oname . " to debug pools in " . $File::Find::dir . "\n";
|
||||
}
|
||||
else {
|
||||
unlink $tname;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub tobrowsesources {
|
||||
|
||||
if (m|\.dsp$|) {
|
||||
$oname = $_;
|
||||
$tname = '.#' . $_;
|
||||
$verchg = 0;
|
||||
$srcfl = new IO::File $oname, "r" || die;
|
||||
$dstfl = new IO::File $tname, "w" || die;
|
||||
while ($src = <$srcfl>) {
|
||||
if ($src =~ s|^(# ADD CPP .*)( /Fd)|$1 /Fr "/httpd-2.0/srclib/apr"$2|) {
|
||||
$verchg = -1;
|
||||
}
|
||||
print $dstfl $src;
|
||||
}
|
||||
undef $srcfl;
|
||||
undef $dstfl;
|
||||
if ($verchg) {
|
||||
unlink $oname || die;
|
||||
rename $tname, $oname || die;
|
||||
print "Converted project " . $oname . " to browse sources in " . $File::Find::dir . "\n";
|
||||
}
|
||||
else {
|
||||
unlink $tname;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub frommakefiles {
|
||||
|
||||
if (m|\.mak\.in$|) {
|
||||
$oname = $_;
|
||||
$dname = $_;
|
||||
$_ =~ s/\.mak\.in/.dsp/;
|
||||
$verchg = 0;
|
||||
$srcfl = new IO::File $oname, "r" || die;
|
||||
$dstfl = new IO::File $tname, "w" || die;
|
||||
while ($src = <$srcfl>) {
|
||||
if ($src =~ s|^(# ADD CPP .*)( /Fd)|$1 /Fr "/httpd-2.0/srclib/apr"$2|) {
|
||||
$verchg = -1;
|
||||
}
|
||||
print $dstfl $src;
|
||||
}
|
||||
undef $srcfl;
|
||||
undef $dstfl;
|
||||
if ($verchg) {
|
||||
unlink $oname || die;
|
||||
rename $tname, $oname || die;
|
||||
print "Converted project " . $oname . " to browse sources in " . $File::Find::dir . "\n";
|
||||
}
|
||||
else {
|
||||
unlink $tname;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sub onemake {
|
||||
|
||||
if ($dsptype == 0) {
|
||||
$cdefs = qq{/D "WIN32" /D "_CONSOLE"};
|
||||
$lmodel = qq{/subsystem:console};
|
||||
$targname = "Win32 (x86) Console Application";
|
||||
$targid = "0x0103";
|
||||
$debpath = "Debug"; $relpath = "Release";
|
||||
} elsif ($dsptype == 1) {
|
||||
$cdefs = qq{/D "WIN32" /D "_WINDOWS"};
|
||||
$lmodel = qq{/subsystem:windows /dll};
|
||||
$targname = "Win32 (x86) Dynamic-Link Library";
|
||||
$targid = "0x0102";
|
||||
$debpath = "Debug"; $relpath = "Release";
|
||||
} elsif($dsptype == 2) {
|
||||
$cdefs = qq{/D "WIN32" /D "_CONSOLE"};
|
||||
$lmodel = qq{/subsystem:console};
|
||||
$targname = "Win32 (x86) Static Library";
|
||||
$targid = "0x0104";
|
||||
$debpath = "LibD"; $relpath = "LibR";
|
||||
}
|
||||
$file = dspheader();
|
||||
|
||||
|
||||
$second = "";
|
||||
|
||||
$model = "Release";
|
||||
$usedebuglib = "0";
|
||||
$debugdef = "NDEBUG";
|
||||
$cflags = "/MD /W3 /O2";
|
||||
$cincl = qq{/I "./include" /I "./os/win32" /I "./srclib/apr/include" /I "./srclib/apr-util/include"};
|
||||
$lflags = qq{/map};
|
||||
$file .= dsponemodel();
|
||||
|
||||
$second = "ELSE";
|
||||
$model = "Debug";
|
||||
$usedebuglib = "1";
|
||||
$debugdef = "_DEBUG";
|
||||
$cflags = "/MDd /W3 /GX /Zi /Od";
|
||||
$cincl = qq{/I "./include" /I "./os/win32" /I "./srclib/apr/include" /I "./srclib/apr-util/include"};
|
||||
$lflags = qq{/incremental:no /debug};
|
||||
$file .= dsponemodel();
|
||||
|
||||
$file .= qq{
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "$name - Win32 Release"
|
||||
# Name "$name - Win32 Debug"
|
||||
};
|
||||
|
||||
$toroot = ".";
|
||||
|
||||
#HERE IS OUR FOREACH!
|
||||
$file .= qq{# Begin Source File
|
||||
|
||||
SOURCE=./server/main.c
|
||||
# End Source File
|
||||
};
|
||||
|
||||
if ($dsptype == 0) {
|
||||
#HERE IS OUR ICON!
|
||||
$icon="$toroot/build/win32/apache.ico";
|
||||
$file .= qq{# Begin Source File
|
||||
|
||||
SOURCE=$icon
|
||||
# End Source File
|
||||
};
|
||||
$icon = "icon=" . $icon . " ";
|
||||
}
|
||||
if ($dsptype == 0 || $dsptype == 1) {
|
||||
$file .= qq{
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=./$name.rc
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=$toroot/include/ap_release.h
|
||||
# PROP Ignore_Default_Tool 1
|
||||
# Begin Custom Build - Creating Version Resource
|
||||
InputPath=$toroot/include/ap_release.h $toroot/build/win32/win32ver.awk
|
||||
|
||||
"./$name.rc" : \$(SOURCE) "\$(INTDIR)" "\$(OUTDIR)"
|
||||
awk -f $toroot/build/win32/win32ver.awk $name "Apache HTTP Server" $toroot/include/ap_release.h $icon> ./Apache.rc
|
||||
|
||||
# End Custom Build
|
||||
# End Source File
|
||||
};
|
||||
}
|
||||
$file .= qq{
|
||||
# End Target
|
||||
# End Project
|
||||
};
|
||||
print $file;
|
||||
}
|
||||
|
||||
sub dspheader {
|
||||
if ($dsptype == 1) {
|
||||
$midl = "MTL=midl.exe\n";
|
||||
} else {
|
||||
$midl = ""
|
||||
}
|
||||
qq{# Microsoft Developer Studio Project File - Name="$name" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "$targname" $targid
|
||||
|
||||
CFG=$name - Win32 Release
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "$name.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "$name.mak" CFG="$name - Win32 Release"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "$name - Win32 Release" (based on "$targname")
|
||||
!MESSAGE "$name - Win32 Debug" (based on "$targname")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
${midl}RSC=rc.exe
|
||||
};
|
||||
}
|
||||
sub dsponemodel {
|
||||
if ($model eq "Release") {
|
||||
$targpath = $relpath;
|
||||
} else {
|
||||
$targpath = $debpath;
|
||||
}
|
||||
if ($dsptype == 1) {
|
||||
$midl =
|
||||
qq{# ADD BASE MTL /nologo /D "$debugdef" /win32
|
||||
# ADD MTL /nologo /D "$debugdef" /mktyplib203 /win32
|
||||
}; }
|
||||
if ($dsptype == 2) {
|
||||
$linkop = qq{LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
};
|
||||
} else {
|
||||
$linkop = qq{LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib advapi32.lib ws2_32.lib mswsock.lib /nologo $lmodel $lflags /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib advapi32.lib ws2_32.lib mswsock.lib /nologo $lmodel $lflags /machine:I386
|
||||
};
|
||||
}
|
||||
|
||||
qq{
|
||||
!${second}IF "\$(CFG)" == "$name - Win32 $model"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries $usedebuglib
|
||||
# PROP BASE Output_Dir "$targpath"
|
||||
# PROP BASE Intermediate_Dir "$targpath"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries $usedebuglib
|
||||
# PROP Output_Dir "$targpath"
|
||||
# PROP Intermediate_Dir "$targpath"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo $cflags $cincl /D "$debugdef" $cdefs /FD /c
|
||||
# ADD CPP /nologo $cflags $cincl /D "$debugdef" $cdefs /Fd"$targpath/$name" /FD /c
|
||||
${midl}# ADD BASE RSC /l 0x409 /d "$debugdef"
|
||||
# ADD RSC /l 0x409 /d "$debugdef"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
$linkop};
|
||||
}
|
||||
+202
@@ -0,0 +1,202 @@
|
||||
dnl -------------------------------------------------------- -*- autoconf -*-
|
||||
dnl Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
dnl contributor license agreements. See the NOTICE file distributed with
|
||||
dnl this work for additional information regarding copyright ownership.
|
||||
dnl The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
dnl (the "License"); you may not use this file except in compliance with
|
||||
dnl the License. You may obtain a copy of the License at
|
||||
dnl
|
||||
dnl http://www.apache.org/licenses/LICENSE-2.0
|
||||
dnl
|
||||
dnl Unless required by applicable law or agreed to in writing, software
|
||||
dnl distributed under the License is distributed on an "AS IS" BASIS,
|
||||
dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
dnl See the License for the specific language governing permissions and
|
||||
dnl limitations under the License.
|
||||
|
||||
dnl
|
||||
dnl find_apr.m4 : locate the APR include files and libraries
|
||||
dnl
|
||||
dnl This macro file can be used by applications to find and use the APR
|
||||
dnl library. It provides a standardized mechanism for using APR. It supports
|
||||
dnl embedding APR into the application source, or locating an installed
|
||||
dnl copy of APR.
|
||||
dnl
|
||||
dnl APR_FIND_APR(srcdir, builddir, implicit-install-check, acceptable-majors,
|
||||
dnl detailed-check)
|
||||
dnl
|
||||
dnl where srcdir is the location of the bundled APR source directory, or
|
||||
dnl empty if source is not bundled.
|
||||
dnl
|
||||
dnl where builddir is the location where the bundled APR will will be built,
|
||||
dnl or empty if the build will occur in the srcdir.
|
||||
dnl
|
||||
dnl where implicit-install-check set to 1 indicates if there is no
|
||||
dnl --with-apr option specified, we will look for installed copies.
|
||||
dnl
|
||||
dnl where acceptable-majors is a space separated list of acceptable major
|
||||
dnl version numbers. Often only a single major version will be acceptable.
|
||||
dnl If multiple versions are specified, and --with-apr=PREFIX or the
|
||||
dnl implicit installed search are used, then the first (leftmost) version
|
||||
dnl in the list that is found will be used. Currently defaults to [0 1].
|
||||
dnl
|
||||
dnl where detailed-check is an M4 macro which sets the apr_acceptable to
|
||||
dnl either "yes" or "no". The macro will be invoked for each installed
|
||||
dnl copy of APR found, with the apr_config variable set appropriately.
|
||||
dnl Only installed copies of APR which are considered acceptable by
|
||||
dnl this macro will be considered found. If no installed copies are
|
||||
dnl considered acceptable by this macro, apr_found will be set to either
|
||||
dnl either "no" or "reconfig".
|
||||
dnl
|
||||
dnl Sets the following variables on exit:
|
||||
dnl
|
||||
dnl apr_found : "yes", "no", "reconfig"
|
||||
dnl
|
||||
dnl apr_config : If the apr-config tool exists, this refers to it. If
|
||||
dnl apr_found is "reconfig", then the bundled directory
|
||||
dnl should be reconfigured *before* using apr_config.
|
||||
dnl
|
||||
dnl Note: this macro file assumes that apr-config has been installed; it
|
||||
dnl is normally considered a required part of an APR installation.
|
||||
dnl
|
||||
dnl If a bundled source directory is available and needs to be (re)configured,
|
||||
dnl then apr_found is set to "reconfig". The caller should reconfigure the
|
||||
dnl (passed-in) source directory, placing the result in the build directory,
|
||||
dnl as appropriate.
|
||||
dnl
|
||||
dnl If apr_found is "yes" or "reconfig", then the caller should use the
|
||||
dnl value of apr_config to fetch any necessary build/link information.
|
||||
dnl
|
||||
|
||||
AC_DEFUN([APR_FIND_APR], [
|
||||
apr_found="no"
|
||||
|
||||
if test "$target_os" = "os2-emx"; then
|
||||
# Scripts don't pass test -x on OS/2
|
||||
TEST_X="test -f"
|
||||
else
|
||||
TEST_X="test -x"
|
||||
fi
|
||||
|
||||
ifelse([$4], [], [
|
||||
ifdef(AC_WARNING,AC_WARNING([$0: missing argument 4 (acceptable-majors): Defaulting to APR 0.x then APR 1.x]))
|
||||
acceptable_majors="0 1"],
|
||||
[acceptable_majors="$4"])
|
||||
|
||||
apr_temp_acceptable_apr_config=""
|
||||
for apr_temp_major in $acceptable_majors
|
||||
do
|
||||
case $apr_temp_major in
|
||||
0)
|
||||
apr_temp_acceptable_apr_config="$apr_temp_acceptable_apr_config apr-config"
|
||||
;;
|
||||
*)
|
||||
apr_temp_acceptable_apr_config="$apr_temp_acceptable_apr_config apr-$apr_temp_major-config"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
AC_MSG_CHECKING(for APR)
|
||||
AC_ARG_WITH(apr,
|
||||
[ --with-apr=PATH prefix for installed APR or the full path to
|
||||
apr-config],
|
||||
[
|
||||
if test "$withval" = "no" || test "$withval" = "yes"; then
|
||||
AC_MSG_ERROR([--with-apr requires a directory or file to be provided])
|
||||
fi
|
||||
|
||||
for apr_temp_apr_config_file in $apr_temp_acceptable_apr_config
|
||||
do
|
||||
for lookdir in "$withval/bin" "$withval"
|
||||
do
|
||||
if $TEST_X "$lookdir/$apr_temp_apr_config_file"; then
|
||||
apr_config="$lookdir/$apr_temp_apr_config_file"
|
||||
ifelse([$5], [], [], [
|
||||
apr_acceptable="yes"
|
||||
$5
|
||||
if test "$apr_acceptable" != "yes"; then
|
||||
AC_MSG_WARN([Found APR in $apr_config, but we think it is considered unacceptable])
|
||||
continue
|
||||
fi])
|
||||
apr_found="yes"
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
if test "$apr_found" != "yes" && $TEST_X "$withval" && $withval --help > /dev/null 2>&1 ; then
|
||||
apr_config="$withval"
|
||||
ifelse([$5], [], [apr_found="yes"], [
|
||||
apr_acceptable="yes"
|
||||
$5
|
||||
if test "$apr_acceptable" = "yes"; then
|
||||
apr_found="yes"
|
||||
fi])
|
||||
fi
|
||||
|
||||
dnl if --with-apr is used, it is a fatal error for its argument
|
||||
dnl to be invalid
|
||||
if test "$apr_found" != "yes"; then
|
||||
AC_MSG_ERROR([the --with-apr parameter is incorrect. It must specify an install prefix, a build directory, or an apr-config file.])
|
||||
fi
|
||||
],[
|
||||
dnl If we allow installed copies, check those before using bundled copy.
|
||||
if test -n "$3" && test "$3" = "1"; then
|
||||
for apr_temp_apr_config_file in $apr_temp_acceptable_apr_config
|
||||
do
|
||||
if $apr_temp_apr_config_file --help > /dev/null 2>&1 ; then
|
||||
apr_config="$apr_temp_apr_config_file"
|
||||
ifelse([$5], [], [], [
|
||||
apr_acceptable="yes"
|
||||
$5
|
||||
if test "$apr_acceptable" != "yes"; then
|
||||
AC_MSG_WARN([skipped APR at $apr_config, version not acceptable])
|
||||
continue
|
||||
fi])
|
||||
apr_found="yes"
|
||||
break
|
||||
else
|
||||
dnl look in some standard places
|
||||
for lookdir in /usr /usr/local /usr/local/apr /opt/apr; do
|
||||
if $TEST_X "$lookdir/bin/$apr_temp_apr_config_file"; then
|
||||
apr_config="$lookdir/bin/$apr_temp_apr_config_file"
|
||||
ifelse([$5], [], [], [
|
||||
apr_acceptable="yes"
|
||||
$5
|
||||
if test "$apr_acceptable" != "yes"; then
|
||||
AC_MSG_WARN([skipped APR at $apr_config, version not acceptable])
|
||||
continue
|
||||
fi])
|
||||
apr_found="yes"
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
fi
|
||||
done
|
||||
fi
|
||||
dnl if we have not found anything yet and have bundled source, use that
|
||||
if test "$apr_found" = "no" && test -d "$1"; then
|
||||
apr_temp_abs_srcdir="`cd \"$1\" && pwd`"
|
||||
apr_found="reconfig"
|
||||
apr_bundled_major="`sed -n '/#define.*APR_MAJOR_VERSION/s/^[^0-9]*\([0-9]*\).*$/\1/p' \"$1/include/apr_version.h\"`"
|
||||
case $apr_bundled_major in
|
||||
"")
|
||||
AC_MSG_ERROR([failed to find major version of bundled APR])
|
||||
;;
|
||||
0)
|
||||
apr_temp_apr_config_file="apr-config"
|
||||
;;
|
||||
*)
|
||||
apr_temp_apr_config_file="apr-$apr_bundled_major-config"
|
||||
;;
|
||||
esac
|
||||
if test -n "$2"; then
|
||||
apr_config="$2/$apr_temp_apr_config_file"
|
||||
else
|
||||
apr_config="$1/$apr_temp_apr_config_file"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
AC_MSG_RESULT($apr_found)
|
||||
])
|
||||
+167
@@ -0,0 +1,167 @@
|
||||
#
|
||||
# fixwin32mak.pl ::: Apache/Win32 maintanace program
|
||||
#
|
||||
# This program, launched from the build/ directory, replaces all nasty absoulute paths
|
||||
# in the win32 .mak files with the appropriate relative root.
|
||||
#
|
||||
# Run this program prior to committing or packaging any newly exported make files.
|
||||
|
||||
use Cwd;
|
||||
use IO::File;
|
||||
use File::Find;
|
||||
|
||||
$root = cwd;
|
||||
# ignore our own direcory (allowing us to move into any parallel tree)
|
||||
$root =~ s|^.:(.*)?$|cd "$1|;
|
||||
$root =~ s|/|\\\\|g;
|
||||
$altroot = $root;
|
||||
$altroot =~ s| ".:| "|;
|
||||
print "Stripping " . $root . " and " . $altroot . "\n";
|
||||
find(\&fixcwd, '.');
|
||||
|
||||
# Given this pattern that disregarded the RECURSE flag...
|
||||
#
|
||||
# !IF "$(RECURSE)" == "0"
|
||||
#
|
||||
# ALL : "$(OUTDIR)\mod_charset_lite.so"
|
||||
#
|
||||
# !ELSE
|
||||
#
|
||||
# ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_charset_lite.so"
|
||||
#
|
||||
# !ENDIF
|
||||
#...
|
||||
# DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
|
||||
#...
|
||||
# ALL : $(DS_POSTBUILD_DEP)
|
||||
#
|
||||
# $(DS_POSTBUILD_DEP) : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_charset_lite.so"
|
||||
#
|
||||
# we will axe the final ALL : clause,
|
||||
# strip all but the final element from $(DS_POSTBUILD_DEP) : clause
|
||||
# move the DS_POSTBUILD_DEP assignment above the IF (for true ALL : targets)
|
||||
# and in pass 2, append the $(DS_POSTBUILD_DEP) to the valid ALL : targets
|
||||
|
||||
|
||||
sub fixcwd {
|
||||
if (m|.mak$|) {
|
||||
$thisroot = $File::Find::dir;
|
||||
$thisroot =~ s|^./(.*)$|$1|;
|
||||
$thisroot =~ s|/|\\\\|g;
|
||||
$thisroot = $root . "\\\\" . $thisroot;
|
||||
$thisaltroot = $altroot . "\\\\" . $thisroot;
|
||||
$oname = $_;
|
||||
$tname = '.#' . $_;
|
||||
$verchg = 0;
|
||||
$postdep = 0;
|
||||
$srcfl = new IO::File $_, "r" || die;
|
||||
$dstfl = new IO::File $tname, "w" || die;
|
||||
while ($src = <$srcfl>) {
|
||||
if ($src =~ m|^DS_POSTBUILD_DEP=.+$|) {
|
||||
$postdepval = $src;
|
||||
}
|
||||
if ($src =~ s|^ALL : \$\(DS_POSTBUILD_DEP\)||) {
|
||||
$postdep = -1;
|
||||
$verchg = -1;
|
||||
$src = <$srcfl>;
|
||||
$src = <$srcfl> if ($src =~ m|^$|);
|
||||
}
|
||||
if ($postdep) {
|
||||
$src =~ s|^(\$\(DS_POSTBUILD_DEP\)) :.+(\"[^\"]+\")$|"$1" : $2|;
|
||||
}
|
||||
if ($src =~ m|^\s*($root[^\"]*)\".*$|) {
|
||||
$orig = $thisroot;
|
||||
} elsif ($src =~ m|^\s*($altroot[^\"]*)\".*$|) {
|
||||
$orig = $thisaltroot;
|
||||
}
|
||||
if (defined($orig)) {
|
||||
$repl = "cd \".";
|
||||
while (!($src =~ s|$orig|$repl|)) {
|
||||
if (!($orig =~ s|^(.*)\\\\[^\\]+$|$1|)) {
|
||||
break;
|
||||
}
|
||||
$repl .= "\\..";
|
||||
}
|
||||
print "Replaced " . $orig . " with " . $repl . "\n";
|
||||
$verchg = -1;
|
||||
undef $orig;
|
||||
}
|
||||
# With modern LINK.EXE linkers, there is a different LINK for
|
||||
# each platform, and it's determined by the file path. Best
|
||||
# that here, after we compiled the code to the default CPU,
|
||||
# that we also link here to the default CPU. Omitting the
|
||||
# /machine spec from the .dsp was not enough, MSVC put it back.
|
||||
#
|
||||
if ($src =~ s#^(LINK32_FLAGS=.*) /machine:(x|IX|I3)86 #$1 #) {
|
||||
$verchg = -1;
|
||||
}
|
||||
print $dstfl $src;
|
||||
}
|
||||
undef $srcfl;
|
||||
undef $dstfl;
|
||||
if ($verchg) {
|
||||
if ($postdep) {
|
||||
$srcfl = new IO::File $tname, "r" || die;
|
||||
$dstfl = new IO::File $oname, "w" || die;
|
||||
while ($src = <$srcfl>) {
|
||||
if ($src =~ m|^INTDIR=|) {
|
||||
print $dstfl $src;
|
||||
$src = $postdepval;
|
||||
}
|
||||
$src =~ s|^(ALL : .+)$|$1 "\$\(DS_POSTBUILD_DEP\)"|;
|
||||
print $dstfl $src;
|
||||
}
|
||||
undef $srcfl;
|
||||
undef $dstfl;
|
||||
unlink $tname || die;
|
||||
print "Corrected post-dependency within " . $oname . " in " . $File::Find::dir . "\n";
|
||||
}
|
||||
else {
|
||||
unlink $oname || die;
|
||||
rename $tname, $oname || die;
|
||||
print "Corrected absolute paths within " . $oname . " in " . $File::Find::dir . "\n";
|
||||
}
|
||||
}
|
||||
else {
|
||||
unlink $tname;
|
||||
}
|
||||
$dname = $oname;
|
||||
$dname =~ s/.mak$/.dsp/;
|
||||
@dstat = stat($dname);
|
||||
@ostat = stat($oname);
|
||||
if ($ostat[9] && $dstat[9] && ($ostat[9] != $dstat[9])) {
|
||||
@onames = ($oname);
|
||||
utime $dstat[9], $dstat[9], @onames;
|
||||
print "Touched datestamp for " . $oname . " in " . $File::Find::dir . "\n";
|
||||
}
|
||||
$oname =~ s/.mak$/.dep/;
|
||||
$verchg = 0;
|
||||
$srcfl = new IO::File $oname, "r" || die;
|
||||
$dstfl = new IO::File $tname, "w" || die;
|
||||
while ($src = <$srcfl>) {
|
||||
if (($src =~ m/^\t"(\.\.\\)+(apr|apr-util|apr-iconv)\\.*"\\/) ||
|
||||
($src =~ m/^\t\{\$\(INCLUDE\)\}".*"\\/)) {
|
||||
$verchg = -1;
|
||||
}
|
||||
else {
|
||||
print $dstfl $src;
|
||||
}
|
||||
}
|
||||
undef $srcfl;
|
||||
undef $dstfl;
|
||||
if ($verchg) {
|
||||
unlink $oname || die;
|
||||
rename $tname, $oname || die;
|
||||
print "Stripped external dependencies from " . $oname . " in " . $File::Find::dir . "\n";
|
||||
}
|
||||
else {
|
||||
unlink $tname || die;
|
||||
}
|
||||
@ostat = stat($oname);
|
||||
if ($ostat[9] && $dstat[9] && ($ostat[9] != $dstat[9])) {
|
||||
@onames = ($oname);
|
||||
utime $dstat[9], $dstat[9], @onames;
|
||||
print "Touched datestamp for " . $oname . " in " . $File::Find::dir . "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
+230
@@ -0,0 +1,230 @@
|
||||
#!/usr/bin/env python
|
||||
#
|
||||
# USAGE: gen-build.py TYPE
|
||||
#
|
||||
# where TYPE is one of: make, dsp, vcproj
|
||||
#
|
||||
# It reads build.conf from the current directory, and produces its output
|
||||
# into the current directory.
|
||||
#
|
||||
|
||||
|
||||
import os
|
||||
import ConfigParser
|
||||
import getopt
|
||||
import string
|
||||
import glob
|
||||
import re
|
||||
|
||||
#import ezt
|
||||
|
||||
#
|
||||
# legal platforms: aix, beos, netware, os2, os390, unix, win32
|
||||
# 'make' users: aix, beos, os2, os390, unix, win32 (mingw)
|
||||
#
|
||||
PLATFORMS = [ 'aix', 'beos', 'netware', 'os2', 'os390', 'unix', 'win32' ]
|
||||
MAKE_PLATFORMS = [
|
||||
('unix', None),
|
||||
('aix', 'unix'),
|
||||
('beos', 'unix'),
|
||||
('os2', 'unix'),
|
||||
('os390', 'unix'),
|
||||
('win32', 'unix'),
|
||||
]
|
||||
# note: MAKE_PLATFORMS is an ordered set. we want to generate unix symbols
|
||||
# first, so that the later platforms can reference them.
|
||||
|
||||
|
||||
def main():
|
||||
parser = ConfigParser.ConfigParser()
|
||||
parser.read('build.conf')
|
||||
|
||||
if parser.has_option('options', 'dsp'):
|
||||
dsp_file = parser.get('options', 'dsp')
|
||||
else:
|
||||
dsp_file = None
|
||||
|
||||
headers = get_files(parser.get('options', 'headers'))
|
||||
|
||||
# compute the relevant headers, along with the implied includes
|
||||
legal_deps = { }
|
||||
for fname in headers:
|
||||
legal_deps[os.path.basename(fname)] = fname
|
||||
|
||||
h_deps = { }
|
||||
for fname in headers:
|
||||
h_deps[os.path.basename(fname)] = extract_deps(fname, legal_deps)
|
||||
resolve_deps(h_deps)
|
||||
|
||||
f = open('build-outputs.mk', 'w')
|
||||
f.write('# DO NOT EDIT. AUTOMATICALLY GENERATED.\n\n')
|
||||
|
||||
# write out the platform-independent files
|
||||
files = get_files(parser.get('options', 'paths'))
|
||||
objects, dirs = write_objects(f, legal_deps, h_deps, files)
|
||||
f.write('\nOBJECTS_all = %s\n\n' % string.join(objects))
|
||||
|
||||
# for each platform and each subdirectory holding platform-specific files,
|
||||
# write out their compilation rules, and an OBJECT_<subdir>_<plat> symbol.
|
||||
for platform, parent in MAKE_PLATFORMS:
|
||||
|
||||
# record the object symbols to build for each platform
|
||||
group = [ '$(OBJECTS_all)' ]
|
||||
|
||||
# If we're doing win32, we're going to look in the libapr.dsp file
|
||||
# for those files that we have to manually add to our list.
|
||||
inherit_parent = { }
|
||||
if platform == 'win32' and dsp_file:
|
||||
for line in open(dsp_file).readlines():
|
||||
if line[:7] != 'SOURCE=':
|
||||
continue
|
||||
if line[7:].find('unix') != -1:
|
||||
# skip the leading .\ and split it out
|
||||
inherit_files = line[9:].strip().split('\\')
|
||||
# change the .c to .lo
|
||||
assert inherit_files[-1][-2:] == '.c'
|
||||
inherit_files[-1] = inherit_files[-1][:-2] + '.lo'
|
||||
# replace the \\'s with /'s
|
||||
inherit_line = '/'.join(inherit_files)
|
||||
if not inherit_parent.has_key(inherit_files[0]):
|
||||
inherit_parent[inherit_files[0]] = []
|
||||
inherit_parent[inherit_files[0]].append(inherit_line)
|
||||
|
||||
for subdir in string.split(parser.get('options', 'platform_dirs')):
|
||||
path = '%s/%s' % (subdir, platform)
|
||||
if not os.path.exists(path):
|
||||
# this subdir doesn't have a subdir for this platform, so we'll
|
||||
# use the parent-platform's set of symbols
|
||||
if parent:
|
||||
group.append('$(OBJECTS_%s_%s)' % (subdir, parent))
|
||||
continue
|
||||
|
||||
# remember that this directory has files/objects
|
||||
dirs[path] = None
|
||||
|
||||
# write out the compilation lines for this subdir
|
||||
files = get_files(path + '/*.c')
|
||||
objects, _unused = write_objects(f, legal_deps, h_deps, files)
|
||||
|
||||
if inherit_parent.has_key(subdir):
|
||||
objects = objects + inherit_parent[subdir]
|
||||
|
||||
symname = 'OBJECTS_%s_%s' % (subdir, platform)
|
||||
|
||||
objects.sort()
|
||||
|
||||
# and write the symbol for the whole group
|
||||
f.write('\n%s = %s\n\n' % (symname, string.join(objects)))
|
||||
|
||||
# and include that symbol in the group
|
||||
group.append('$(%s)' % symname)
|
||||
|
||||
group.sort()
|
||||
|
||||
# write out a symbol which contains the necessary files
|
||||
f.write('OBJECTS_%s = %s\n\n' % (platform, string.join(group)))
|
||||
|
||||
f.write('HEADERS = $(top_srcdir)/%s\n\n' % string.join(headers, ' $(top_srcdir)/'))
|
||||
f.write('SOURCE_DIRS = %s $(EXTRA_SOURCE_DIRS)\n\n' % string.join(dirs.keys()))
|
||||
|
||||
if parser.has_option('options', 'modules'):
|
||||
modules = parser.get('options', 'modules')
|
||||
|
||||
for mod in string.split(modules):
|
||||
files = get_files(parser.get(mod, 'paths'))
|
||||
objects, _unused = write_objects(f, legal_deps, h_deps, files)
|
||||
flat_objects = string.join(objects)
|
||||
f.write('OBJECTS_%s = %s\n' % (mod, flat_objects))
|
||||
|
||||
if parser.has_option(mod, 'target'):
|
||||
target = parser.get(mod, 'target')
|
||||
f.write('MODULE_%s = %s\n' % (mod, target))
|
||||
f.write('%s: %s\n' % (target, flat_objects))
|
||||
f.write('\t$(LINK_MODULE) -o $@ $(OBJECTS_%s) $(LDADD_%s)\n' % (mod, mod))
|
||||
|
||||
f.write('\n')
|
||||
|
||||
# Build a list of all necessary directories in build tree
|
||||
alldirs = { }
|
||||
for dir in dirs.keys():
|
||||
d = dir
|
||||
while d:
|
||||
alldirs[d] = None
|
||||
d = os.path.dirname(d)
|
||||
|
||||
# Sort so 'foo' is before 'foo/bar'
|
||||
keys = alldirs.keys()
|
||||
keys.sort()
|
||||
f.write('BUILD_DIRS = %s\n\n' % string.join(keys))
|
||||
|
||||
f.write('.make.dirs: $(srcdir)/build-outputs.mk\n' \
|
||||
'\t@for d in $(BUILD_DIRS); do test -d $$d || mkdir $$d; done\n' \
|
||||
'\t@echo timestamp > $@\n')
|
||||
|
||||
|
||||
def write_objects(f, legal_deps, h_deps, files):
|
||||
dirs = { }
|
||||
objects = [ ]
|
||||
|
||||
for file in files:
|
||||
if file[-10:] == '/apr_app.c':
|
||||
continue
|
||||
assert file[-2:] == '.c'
|
||||
obj = file[:-2] + '.lo'
|
||||
objects.append(obj)
|
||||
|
||||
dirs[os.path.dirname(file)] = None
|
||||
|
||||
# what headers does this file include, along with the implied headers
|
||||
deps = extract_deps(file, legal_deps)
|
||||
for hdr in deps.keys():
|
||||
deps.update(h_deps.get(hdr, {}))
|
||||
|
||||
vals = deps.values()
|
||||
vals.sort()
|
||||
f.write('%s: %s .make.dirs %s\n' % (obj, file, string.join(vals)))
|
||||
|
||||
objects.sort()
|
||||
|
||||
return objects, dirs
|
||||
|
||||
|
||||
def extract_deps(fname, legal_deps):
|
||||
"Extract the headers this file includes."
|
||||
deps = { }
|
||||
for line in open(fname).readlines():
|
||||
if line[:8] != '#include':
|
||||
continue
|
||||
inc = _re_include.match(line).group(1)
|
||||
if inc in legal_deps.keys():
|
||||
deps[inc] = legal_deps[inc]
|
||||
return deps
|
||||
_re_include = re.compile('#include *["<](.*)[">]')
|
||||
|
||||
|
||||
def resolve_deps(header_deps):
|
||||
"Alter the provided dictionary to flatten includes-of-includes."
|
||||
altered = 1
|
||||
while altered:
|
||||
altered = 0
|
||||
for hdr, deps in header_deps.items():
|
||||
# print hdr, deps
|
||||
start = len(deps)
|
||||
for dep in deps.keys():
|
||||
deps.update(header_deps.get(dep, {}))
|
||||
if len(deps) != start:
|
||||
altered = 1
|
||||
|
||||
def clean_path(path):
|
||||
return path.replace("\\", "/")
|
||||
|
||||
def get_files(patterns):
|
||||
files = [ ]
|
||||
for pat in string.split(patterns):
|
||||
files.extend(map(clean_path, glob.glob(pat)))
|
||||
files.sort()
|
||||
return files
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# extract version numbers from a header file
|
||||
#
|
||||
# USAGE: get-version.sh CMD VERSION_HEADER PREFIX
|
||||
# where CMD is one of: all, major, libtool
|
||||
# where PREFIX is the prefix to {MAJOR|MINOR|PATCH}_VERSION defines
|
||||
#
|
||||
# get-version.sh all returns a dotted version number
|
||||
# get-version.sh major returns just the major version number
|
||||
# get-version.sh libtool returns a version "libtool -version-info" format
|
||||
#
|
||||
|
||||
if test $# != 3; then
|
||||
echo "USAGE: $0 CMD VERSION_HEADER PREFIX"
|
||||
echo " where CMD is one of: all, major, libtool"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
major_sed="/#define.*$3_MAJOR_VERSION/s/^[^0-9]*\([0-9]*\).*$/\1/p"
|
||||
minor_sed="/#define.*$3_MINOR_VERSION/s/^[^0-9]*\([0-9]*\).*$/\1/p"
|
||||
patch_sed="/#define.*$3_PATCH_VERSION/s/^[^0-9]*\([0-9]*\).*$/\1/p"
|
||||
major="`sed -n $major_sed $2`"
|
||||
minor="`sed -n $minor_sed $2`"
|
||||
patch="`sed -n $patch_sed $2`"
|
||||
|
||||
if test "$1" = "all"; then
|
||||
echo ${major}.${minor}.${patch}
|
||||
elif test "$1" = "major"; then
|
||||
echo ${major}
|
||||
elif test "$1" = "libtool"; then
|
||||
# Yes, ${minor}:${patch}:${minor} is correct due to libtool idiocy.
|
||||
echo ${minor}:${patch}:${minor}
|
||||
else
|
||||
echo "ERROR: unknown version CMD ($1)"
|
||||
exit 1
|
||||
fi
|
||||
+112
@@ -0,0 +1,112 @@
|
||||
#!/bin/sh
|
||||
##
|
||||
## install.sh -- install a program, script or datafile
|
||||
##
|
||||
## Based on `install-sh' from the X Consortium's X11R5 distribution
|
||||
## as of 89/12/18 which is freely available.
|
||||
## Cleaned up for Apache's Autoconf-style Interface (APACI)
|
||||
## by Ralf S. Engelschall <rse@apache.org>
|
||||
##
|
||||
#
|
||||
# This script falls under the Apache License.
|
||||
# See http://www.apache.org/docs/LICENSE
|
||||
|
||||
|
||||
#
|
||||
# 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}"
|
||||
|
||||
#
|
||||
# parse argument line
|
||||
#
|
||||
instcmd="$mvprog"
|
||||
chmodcmd=""
|
||||
chowncmd=""
|
||||
chgrpcmd=""
|
||||
stripcmd=""
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
ext=""
|
||||
src=""
|
||||
dst=""
|
||||
while [ "x$1" != "x" ]; do
|
||||
case $1 in
|
||||
-c) instcmd="$cpprog"
|
||||
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
|
||||
;;
|
||||
-S) stripcmd="$stripprog $2"
|
||||
shift; shift; continue
|
||||
;;
|
||||
-e) ext="$2"
|
||||
shift; shift; continue
|
||||
;;
|
||||
*) if [ "x$src" = "x" ]; then
|
||||
src=$1
|
||||
else
|
||||
dst=$1
|
||||
fi
|
||||
shift; continue
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ "x$src" = "x" ]; then
|
||||
echo "install.sh: no input file specified"
|
||||
exit 1
|
||||
fi
|
||||
if [ "x$dst" = "x" ]; then
|
||||
echo "install.sh: no destination specified"
|
||||
exit 1
|
||||
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`"
|
||||
fi
|
||||
|
||||
# Add a possible extension (such as ".exe") to src and dst
|
||||
src="$src$ext"
|
||||
dst="$dst$ext"
|
||||
|
||||
# Make a temp file name in the proper directory.
|
||||
dstdir=`dirname $dst`
|
||||
dsttmp=$dstdir/#inst.$$#
|
||||
|
||||
# Move or copy the file name to the temp name
|
||||
$instcmd $src $dsttmp
|
||||
|
||||
# And set any options; do chmod last to preserve setuid bits
|
||||
if [ "x$chowncmd" != "x" ]; then $chowncmd $dsttmp; fi
|
||||
if [ "x$chgrpcmd" != "x" ]; then $chgrpcmd $dsttmp; fi
|
||||
if [ "x$stripcmd" != "x" ]; then $stripcmd $dsttmp; fi
|
||||
if [ "x$chmodcmd" != "x" ]; then $chmodcmd $dsttmp; fi
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$rmcmd $dst
|
||||
$mvcmd $dsttmp $dst
|
||||
|
||||
exit 0
|
||||
|
||||
+2056
File diff suppressed because it is too large
Load Diff
+63
@@ -0,0 +1,63 @@
|
||||
# Microsoft Developer Studio Generated Dependency File, included by libaprapp.mak
|
||||
|
||||
..\misc\win32\apr_app.c : \
|
||||
"..\include\apr.h"\
|
||||
"..\include\apr_allocator.h"\
|
||||
"..\include\apr_dso.h"\
|
||||
"..\include\apr_errno.h"\
|
||||
"..\include\apr_file_info.h"\
|
||||
"..\include\apr_file_io.h"\
|
||||
"..\include\apr_general.h"\
|
||||
"..\include\apr_getopt.h"\
|
||||
"..\include\apr_global_mutex.h"\
|
||||
"..\include\apr_inherit.h"\
|
||||
"..\include\apr_lib.h"\
|
||||
"..\include\apr_network_io.h"\
|
||||
"..\include\apr_poll.h"\
|
||||
"..\include\apr_pools.h"\
|
||||
"..\include\apr_portable.h"\
|
||||
"..\include\apr_proc_mutex.h"\
|
||||
"..\include\apr_shm.h"\
|
||||
"..\include\apr_tables.h"\
|
||||
"..\include\apr_thread_mutex.h"\
|
||||
"..\include\apr_thread_proc.h"\
|
||||
"..\include\apr_time.h"\
|
||||
"..\include\apr_user.h"\
|
||||
"..\include\apr_want.h"\
|
||||
"..\include\arch\apr_private_common.h"\
|
||||
"..\include\arch\win32\apr_arch_file_io.h"\
|
||||
"..\include\arch\win32\apr_arch_misc.h"\
|
||||
"..\include\arch\win32\apr_arch_utf8.h"\
|
||||
"..\include\arch\win32\apr_private.h"\
|
||||
|
||||
|
||||
..\misc\win32\internal.c : \
|
||||
"..\include\apr.h"\
|
||||
"..\include\apr_allocator.h"\
|
||||
"..\include\apr_dso.h"\
|
||||
"..\include\apr_errno.h"\
|
||||
"..\include\apr_file_info.h"\
|
||||
"..\include\apr_file_io.h"\
|
||||
"..\include\apr_general.h"\
|
||||
"..\include\apr_getopt.h"\
|
||||
"..\include\apr_global_mutex.h"\
|
||||
"..\include\apr_inherit.h"\
|
||||
"..\include\apr_lib.h"\
|
||||
"..\include\apr_network_io.h"\
|
||||
"..\include\apr_poll.h"\
|
||||
"..\include\apr_pools.h"\
|
||||
"..\include\apr_portable.h"\
|
||||
"..\include\apr_proc_mutex.h"\
|
||||
"..\include\apr_shm.h"\
|
||||
"..\include\apr_tables.h"\
|
||||
"..\include\apr_thread_mutex.h"\
|
||||
"..\include\apr_thread_proc.h"\
|
||||
"..\include\apr_time.h"\
|
||||
"..\include\apr_user.h"\
|
||||
"..\include\apr_want.h"\
|
||||
"..\include\arch\apr_private_common.h"\
|
||||
"..\include\arch\win32\apr_arch_file_io.h"\
|
||||
"..\include\arch\win32\apr_arch_misc.h"\
|
||||
"..\include\arch\win32\apr_arch_utf8.h"\
|
||||
"..\include\arch\win32\apr_private.h"\
|
||||
|
||||
+195
@@ -0,0 +1,195 @@
|
||||
# Microsoft Developer Studio Project File - Name="libaprapp" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||
|
||||
CFG=libaprapp - Win32 Release
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "libaprapp.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "libaprapp.mak" CFG="libaprapp - Win32 Release"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "libaprapp - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "libaprapp - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "libaprapp - Win32 Release9x" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "libaprapp - Win32 Debug9x" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "libaprapp - x64 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "libaprapp - x64 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "libaprapp - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "..\Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "..\Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "NDEBUG" /D "WINNT" /D "WIN32" /D "_WINDOWS" /D "APR_APP" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\libaprapp-1" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"..\Release\libaprapp-1.lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "libaprapp - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "..\Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "..\Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "_DEBUG" /D "WINNT" /D "WIN32" /D "_WINDOWS" /D "APR_APP" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\libaprapp-1" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"..\Debug\libaprapp-1.lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "libaprapp - Win32 Release9x"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "..\9x\Release"
|
||||
# PROP BASE Intermediate_Dir "9x\Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "..\9x\Release"
|
||||
# PROP Intermediate_Dir "9x\Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APR_APP" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\libaprapp-1" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"..\9x\Release\libaprapp-1.lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "libaprapp - Win32 Debug9x"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "..\9x\Debug"
|
||||
# PROP BASE Intermediate_Dir "9x\Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "..\9x\Debug"
|
||||
# PROP Intermediate_Dir "9x\Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APR_APP" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\libaprapp-1" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"..\9x\Debug\libaprapp-1.lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "libaprapp - x64 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "..\x64\Release"
|
||||
# PROP BASE Intermediate_Dir "x64\Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "..\x64\Release"
|
||||
# PROP Intermediate_Dir "x64\Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "NDEBUG" /D "WINNT" /D "WIN32" /D "_WINDOWS" /D "APR_APP" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\libaprapp-1" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"..\x64\Release\libaprapp-1.lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "libaprapp - x64 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "..\x64\Debug"
|
||||
# PROP BASE Intermediate_Dir "x64\Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "..\x64\Debug"
|
||||
# PROP Intermediate_Dir "x64\Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "_DEBUG" /D "WINNT" /D "WIN32" /D "_WINDOWS" /D "APR_APP" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\libaprapp-1" /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"..\x64\Debug\libaprapp-1.lib"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "libaprapp - Win32 Release"
|
||||
# Name "libaprapp - Win32 Debug"
|
||||
# Name "libaprapp - Win32 Release9x"
|
||||
# Name "libaprapp - Win32 Debug9x"
|
||||
# Name "libaprapp - x64 Release"
|
||||
# Name "libaprapp - x64 Debug"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\misc\win32\apr_app.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\misc\win32\internal.c
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
+632
@@ -0,0 +1,632 @@
|
||||
# Microsoft Developer Studio Generated NMAKE File, Based on libaprapp.dsp
|
||||
!IF "$(CFG)" == ""
|
||||
CFG=libaprapp - Win32 Release
|
||||
!MESSAGE No configuration specified. Defaulting to libaprapp - Win32 Release.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" != "libaprapp - Win32 Release" && "$(CFG)" != "libaprapp - Win32 Debug" && "$(CFG)" != "libaprapp - Win32 Release9x" && "$(CFG)" != "libaprapp - Win32 Debug9x" && "$(CFG)" != "libaprapp - x64 Release" && "$(CFG)" != "libaprapp - x64 Debug"
|
||||
!MESSAGE Invalid configuration "$(CFG)" specified.
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "libaprapp.mak" CFG="libaprapp - Win32 Release"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "libaprapp - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "libaprapp - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "libaprapp - Win32 Release9x" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "libaprapp - Win32 Debug9x" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "libaprapp - x64 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "libaprapp - x64 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
!ERROR An invalid configuration is specified.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(OS)" == "Windows_NT"
|
||||
NULL=
|
||||
!ELSE
|
||||
NULL=nul
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" == "libaprapp - Win32 Release"
|
||||
|
||||
OUTDIR=.\..\Release
|
||||
INTDIR=.\Release
|
||||
# Begin Custom Macros
|
||||
OutDir=.\..\Release
|
||||
# End Custom Macros
|
||||
|
||||
!IF "$(RECURSE)" == "0"
|
||||
|
||||
ALL : "$(OUTDIR)\libaprapp-1.lib"
|
||||
|
||||
!ELSE
|
||||
|
||||
ALL : "prelibaprapp - Win32 Release" "$(OUTDIR)\libaprapp-1.lib"
|
||||
|
||||
!ENDIF
|
||||
|
||||
!IF "$(RECURSE)" == "1"
|
||||
CLEAN :"prelibaprapp - Win32 ReleaseCLEAN"
|
||||
!ELSE
|
||||
CLEAN :
|
||||
!ENDIF
|
||||
-@erase "$(INTDIR)\apr_app.obj"
|
||||
-@erase "$(INTDIR)\internal.obj"
|
||||
-@erase "$(OUTDIR)\libaprapp-1.lib"
|
||||
-@erase "..\Release\libaprapp-1.idb"
|
||||
-@erase "..\Release\libaprapp-1.pdb"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
"$(INTDIR)" :
|
||||
if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "NDEBUG" /D "WINNT" /D "WIN32" /D "_WINDOWS" /D "APR_APP" /Fo"$(INTDIR)\\" /Fd"$(OUTDIR)\libaprapp-1" /FD /c
|
||||
|
||||
.c{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.c{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
RSC=rc.exe
|
||||
BSC32=bscmake.exe
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)\libaprapp.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LIB32=link.exe -lib
|
||||
LIB32_FLAGS=/nologo /out:"$(OUTDIR)\libaprapp-1.lib"
|
||||
LIB32_OBJS= \
|
||||
"$(INTDIR)\apr_app.obj" \
|
||||
"$(INTDIR)\internal.obj"
|
||||
|
||||
"$(OUTDIR)\libaprapp-1.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
|
||||
$(LIB32) @<<
|
||||
$(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
|
||||
<<
|
||||
|
||||
!ELSEIF "$(CFG)" == "libaprapp - Win32 Debug"
|
||||
|
||||
OUTDIR=.\..\Debug
|
||||
INTDIR=.\Debug
|
||||
# Begin Custom Macros
|
||||
OutDir=.\..\Debug
|
||||
# End Custom Macros
|
||||
|
||||
!IF "$(RECURSE)" == "0"
|
||||
|
||||
ALL : "$(OUTDIR)\libaprapp-1.lib"
|
||||
|
||||
!ELSE
|
||||
|
||||
ALL : "prelibaprapp - Win32 Debug" "$(OUTDIR)\libaprapp-1.lib"
|
||||
|
||||
!ENDIF
|
||||
|
||||
!IF "$(RECURSE)" == "1"
|
||||
CLEAN :"prelibaprapp - Win32 DebugCLEAN"
|
||||
!ELSE
|
||||
CLEAN :
|
||||
!ENDIF
|
||||
-@erase "$(INTDIR)\apr_app.obj"
|
||||
-@erase "$(INTDIR)\internal.obj"
|
||||
-@erase "$(OUTDIR)\libaprapp-1.lib"
|
||||
-@erase "..\Debug\libaprapp-1.idb"
|
||||
-@erase "..\Debug\libaprapp-1.pdb"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
"$(INTDIR)" :
|
||||
if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "_DEBUG" /D "WINNT" /D "WIN32" /D "_WINDOWS" /D "APR_APP" /Fo"$(INTDIR)\\" /Fd"$(OUTDIR)\libaprapp-1" /FD /EHsc /c
|
||||
|
||||
.c{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.c{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
RSC=rc.exe
|
||||
BSC32=bscmake.exe
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)\libaprapp.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LIB32=link.exe -lib
|
||||
LIB32_FLAGS=/nologo /out:"$(OUTDIR)\libaprapp-1.lib"
|
||||
LIB32_OBJS= \
|
||||
"$(INTDIR)\apr_app.obj" \
|
||||
"$(INTDIR)\internal.obj"
|
||||
|
||||
"$(OUTDIR)\libaprapp-1.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
|
||||
$(LIB32) @<<
|
||||
$(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
|
||||
<<
|
||||
|
||||
!ELSEIF "$(CFG)" == "libaprapp - Win32 Release9x"
|
||||
|
||||
OUTDIR=.\..\9x\Release
|
||||
INTDIR=.\9x\Release
|
||||
# Begin Custom Macros
|
||||
OutDir=.\..\9x\Release
|
||||
# End Custom Macros
|
||||
|
||||
!IF "$(RECURSE)" == "0"
|
||||
|
||||
ALL : "$(OUTDIR)\libaprapp-1.lib"
|
||||
|
||||
!ELSE
|
||||
|
||||
ALL : "prelibaprapp - Win32 Release9x" "$(OUTDIR)\libaprapp-1.lib"
|
||||
|
||||
!ENDIF
|
||||
|
||||
!IF "$(RECURSE)" == "1"
|
||||
CLEAN :"prelibaprapp - Win32 Release9xCLEAN"
|
||||
!ELSE
|
||||
CLEAN :
|
||||
!ENDIF
|
||||
-@erase "$(INTDIR)\apr_app.obj"
|
||||
-@erase "$(INTDIR)\internal.obj"
|
||||
-@erase "$(OUTDIR)\libaprapp-1.lib"
|
||||
-@erase "..\9x\Release\libaprapp-1.idb"
|
||||
-@erase "..\9x\Release\libaprapp-1.pdb"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
"$(INTDIR)" :
|
||||
if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APR_APP" /Fo"$(INTDIR)\\" /Fd"$(OUTDIR)\libaprapp-1" /FD /c
|
||||
|
||||
.c{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.c{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
RSC=rc.exe
|
||||
BSC32=bscmake.exe
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)\libaprapp.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LIB32=link.exe -lib
|
||||
LIB32_FLAGS=/nologo /out:"$(OUTDIR)\libaprapp-1.lib"
|
||||
LIB32_OBJS= \
|
||||
"$(INTDIR)\apr_app.obj" \
|
||||
"$(INTDIR)\internal.obj"
|
||||
|
||||
"$(OUTDIR)\libaprapp-1.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
|
||||
$(LIB32) @<<
|
||||
$(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
|
||||
<<
|
||||
|
||||
!ELSEIF "$(CFG)" == "libaprapp - Win32 Debug9x"
|
||||
|
||||
OUTDIR=.\..\9x\Debug
|
||||
INTDIR=.\9x\Debug
|
||||
# Begin Custom Macros
|
||||
OutDir=.\..\9x\Debug
|
||||
# End Custom Macros
|
||||
|
||||
!IF "$(RECURSE)" == "0"
|
||||
|
||||
ALL : "$(OUTDIR)\libaprapp-1.lib"
|
||||
|
||||
!ELSE
|
||||
|
||||
ALL : "prelibaprapp - Win32 Debug9x" "$(OUTDIR)\libaprapp-1.lib"
|
||||
|
||||
!ENDIF
|
||||
|
||||
!IF "$(RECURSE)" == "1"
|
||||
CLEAN :"prelibaprapp - Win32 Debug9xCLEAN"
|
||||
!ELSE
|
||||
CLEAN :
|
||||
!ENDIF
|
||||
-@erase "$(INTDIR)\apr_app.obj"
|
||||
-@erase "$(INTDIR)\internal.obj"
|
||||
-@erase "$(OUTDIR)\libaprapp-1.lib"
|
||||
-@erase "..\9x\Debug\libaprapp-1.idb"
|
||||
-@erase "..\9x\Debug\libaprapp-1.pdb"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
"$(INTDIR)" :
|
||||
if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APR_APP" /Fo"$(INTDIR)\\" /Fd"$(OUTDIR)\libaprapp-1" /FD /EHsc /c
|
||||
|
||||
.c{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.c{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
RSC=rc.exe
|
||||
BSC32=bscmake.exe
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)\libaprapp.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LIB32=link.exe -lib
|
||||
LIB32_FLAGS=/nologo /out:"$(OUTDIR)\libaprapp-1.lib"
|
||||
LIB32_OBJS= \
|
||||
"$(INTDIR)\apr_app.obj" \
|
||||
"$(INTDIR)\internal.obj"
|
||||
|
||||
"$(OUTDIR)\libaprapp-1.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
|
||||
$(LIB32) @<<
|
||||
$(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
|
||||
<<
|
||||
|
||||
!ELSEIF "$(CFG)" == "libaprapp - x64 Release"
|
||||
|
||||
OUTDIR=.\..\x64\Release
|
||||
INTDIR=.\x64\Release
|
||||
# Begin Custom Macros
|
||||
OutDir=.\..\x64\Release
|
||||
# End Custom Macros
|
||||
|
||||
!IF "$(RECURSE)" == "0"
|
||||
|
||||
ALL : "$(OUTDIR)\libaprapp-1.lib"
|
||||
|
||||
!ELSE
|
||||
|
||||
ALL : "prelibaprapp - x64 Release" "$(OUTDIR)\libaprapp-1.lib"
|
||||
|
||||
!ENDIF
|
||||
|
||||
!IF "$(RECURSE)" == "1"
|
||||
CLEAN :"prelibaprapp - x64 ReleaseCLEAN"
|
||||
!ELSE
|
||||
CLEAN :
|
||||
!ENDIF
|
||||
-@erase "$(INTDIR)\apr_app.obj"
|
||||
-@erase "$(INTDIR)\internal.obj"
|
||||
-@erase "$(OUTDIR)\libaprapp-1.lib"
|
||||
-@erase "..\x64\Release\libaprapp-1.idb"
|
||||
-@erase "..\x64\Release\libaprapp-1.pdb"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
"$(INTDIR)" :
|
||||
if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "NDEBUG" /D "WINNT" /D "WIN32" /D "_WINDOWS" /D "APR_APP" /Fo"$(INTDIR)\\" /Fd"$(OUTDIR)\libaprapp-1" /FD /c
|
||||
|
||||
.c{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.c{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
RSC=rc.exe
|
||||
BSC32=bscmake.exe
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)\libaprapp.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LIB32=link.exe -lib
|
||||
LIB32_FLAGS=/nologo /out:"$(OUTDIR)\libaprapp-1.lib"
|
||||
LIB32_OBJS= \
|
||||
"$(INTDIR)\apr_app.obj" \
|
||||
"$(INTDIR)\internal.obj"
|
||||
|
||||
"$(OUTDIR)\libaprapp-1.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
|
||||
$(LIB32) @<<
|
||||
$(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
|
||||
<<
|
||||
|
||||
!ELSEIF "$(CFG)" == "libaprapp - x64 Debug"
|
||||
|
||||
OUTDIR=.\..\x64\Debug
|
||||
INTDIR=.\x64\Debug
|
||||
# Begin Custom Macros
|
||||
OutDir=.\..\x64\Debug
|
||||
# End Custom Macros
|
||||
|
||||
!IF "$(RECURSE)" == "0"
|
||||
|
||||
ALL : "$(OUTDIR)\libaprapp-1.lib"
|
||||
|
||||
!ELSE
|
||||
|
||||
ALL : "prelibaprapp - x64 Debug" "$(OUTDIR)\libaprapp-1.lib"
|
||||
|
||||
!ENDIF
|
||||
|
||||
!IF "$(RECURSE)" == "1"
|
||||
CLEAN :"prelibaprapp - x64 DebugCLEAN"
|
||||
!ELSE
|
||||
CLEAN :
|
||||
!ENDIF
|
||||
-@erase "$(INTDIR)\apr_app.obj"
|
||||
-@erase "$(INTDIR)\internal.obj"
|
||||
-@erase "$(OUTDIR)\libaprapp-1.lib"
|
||||
-@erase "..\x64\Debug\libaprapp-1.idb"
|
||||
-@erase "..\x64\Debug\libaprapp-1.pdb"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
"$(INTDIR)" :
|
||||
if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "_DEBUG" /D "WINNT" /D "WIN32" /D "_WINDOWS" /D "APR_APP" /Fo"$(INTDIR)\\" /Fd"$(OUTDIR)\libaprapp-1" /FD /EHsc /c
|
||||
|
||||
.c{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.c{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
RSC=rc.exe
|
||||
BSC32=bscmake.exe
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)\libaprapp.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LIB32=link.exe -lib
|
||||
LIB32_FLAGS=/nologo /out:"$(OUTDIR)\libaprapp-1.lib"
|
||||
LIB32_OBJS= \
|
||||
"$(INTDIR)\apr_app.obj" \
|
||||
"$(INTDIR)\internal.obj"
|
||||
|
||||
"$(OUTDIR)\libaprapp-1.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
|
||||
$(LIB32) @<<
|
||||
$(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
|
||||
<<
|
||||
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IF "$(NO_EXTERNAL_DEPS)" != "1"
|
||||
!IF EXISTS("libaprapp.dep")
|
||||
!INCLUDE "libaprapp.dep"
|
||||
!ELSE
|
||||
!MESSAGE Warning: cannot find "libaprapp.dep"
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IF "$(CFG)" == "libaprapp - Win32 Release" || "$(CFG)" == "libaprapp - Win32 Debug" || "$(CFG)" == "libaprapp - Win32 Release9x" || "$(CFG)" == "libaprapp - Win32 Debug9x" || "$(CFG)" == "libaprapp - x64 Release" || "$(CFG)" == "libaprapp - x64 Debug"
|
||||
|
||||
!IF "$(CFG)" == "libaprapp - Win32 Release"
|
||||
|
||||
"prelibaprapp - Win32 Release" :
|
||||
cd "."
|
||||
NMAKE /nologo /f NUL
|
||||
cd "."
|
||||
|
||||
"prelibaprapp - Win32 ReleaseCLEAN" :
|
||||
cd "."
|
||||
cd "."
|
||||
|
||||
!ELSEIF "$(CFG)" == "libaprapp - Win32 Debug"
|
||||
|
||||
"prelibaprapp - Win32 Debug" :
|
||||
cd "."
|
||||
NMAKE /nologo /f NUL
|
||||
cd "."
|
||||
|
||||
"prelibaprapp - Win32 DebugCLEAN" :
|
||||
cd "."
|
||||
cd "."
|
||||
|
||||
!ELSEIF "$(CFG)" == "libaprapp - Win32 Release9x"
|
||||
|
||||
"prelibaprapp - Win32 Release9x" :
|
||||
cd "."
|
||||
NMAKE /nologo /f NUL
|
||||
cd "."
|
||||
|
||||
"prelibaprapp - Win32 Release9xCLEAN" :
|
||||
cd "."
|
||||
cd "."
|
||||
|
||||
!ELSEIF "$(CFG)" == "libaprapp - Win32 Debug9x"
|
||||
|
||||
"prelibaprapp - Win32 Debug9x" :
|
||||
cd "."
|
||||
NMAKE /nologo /f NUL
|
||||
cd "."
|
||||
|
||||
"prelibaprapp - Win32 Debug9xCLEAN" :
|
||||
cd "."
|
||||
cd "."
|
||||
|
||||
!ELSEIF "$(CFG)" == "libaprapp - x64 Release"
|
||||
|
||||
"prelibaprapp - x64 Release" :
|
||||
cd "."
|
||||
NMAKE /nologo /f NUL
|
||||
cd "."
|
||||
|
||||
"prelibaprapp - x64 ReleaseCLEAN" :
|
||||
cd "."
|
||||
cd "."
|
||||
|
||||
!ELSEIF "$(CFG)" == "libaprapp - x64 Debug"
|
||||
|
||||
"prelibaprapp - x64 Debug" :
|
||||
cd "."
|
||||
NMAKE /nologo /f NUL
|
||||
cd "."
|
||||
|
||||
"prelibaprapp - x64 DebugCLEAN" :
|
||||
cd "."
|
||||
cd "."
|
||||
|
||||
!ENDIF
|
||||
|
||||
SOURCE=..\misc\win32\apr_app.c
|
||||
|
||||
"$(INTDIR)\apr_app.obj" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
SOURCE=..\misc\win32\internal.c
|
||||
|
||||
"$(INTDIR)\internal.obj" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
+8372
File diff suppressed because it is too large
Load Diff
+150
@@ -0,0 +1,150 @@
|
||||
#!/usr/local/bin/perl
|
||||
#
|
||||
# Heuristically converts line endings to the current OS's preferred format
|
||||
#
|
||||
# All existing line endings must be identical (e.g. lf's only, or even
|
||||
# the accidental cr.cr.lf sequence.) If some lines end lf, and others as
|
||||
# cr.lf, the file is presumed binary. If the cr character appears anywhere
|
||||
# except prefixed to an lf, the file is presumed binary. If there is no
|
||||
# change in the resulting file size, or the file is binary, the conversion
|
||||
# is discarded.
|
||||
#
|
||||
# Todo: Handle NULL stdin characters gracefully.
|
||||
#
|
||||
|
||||
use IO::File;
|
||||
use File::Find;
|
||||
|
||||
# The ignore list is '-' seperated, with this leading hyphen and
|
||||
# trailing hyphens in ever concatinated list below.
|
||||
$ignore = "-";
|
||||
|
||||
# Image formats
|
||||
$ignore .= "gif-jpg-jpeg-png-ico-bmp-";
|
||||
|
||||
# Archive formats
|
||||
$ignore .= "tar-gz-z-zip-jar-war-bz2-tgz-";
|
||||
|
||||
# Many document formats
|
||||
$ignore .= "eps-psd-pdf-chm-ai-";
|
||||
|
||||
# Some encodings
|
||||
$ignore .= "ucs2-ucs4-";
|
||||
|
||||
# Some binary objects
|
||||
$ignore .= "class-so-dll-exe-obj-lib-a-o-lo-slo-sl-dylib-";
|
||||
|
||||
# Some build env files
|
||||
$ignore .= "mcp-xdc-ncb-opt-pdb-ilk-exp-res-pch-idb-sbr-";
|
||||
|
||||
$preservedate = 1;
|
||||
|
||||
$forceending = 0;
|
||||
|
||||
$givenpaths = 0;
|
||||
|
||||
$notnative = 0;
|
||||
|
||||
while (defined @ARGV[0]) {
|
||||
if (@ARGV[0] eq '--touch') {
|
||||
$preservedate = 0;
|
||||
}
|
||||
elsif (@ARGV[0] eq '--nocr') {
|
||||
$notnative = -1;
|
||||
}
|
||||
elsif (@ARGV[0] eq '--cr') {
|
||||
$notnative = 1;
|
||||
}
|
||||
elsif (@ARGV[0] eq '--force') {
|
||||
$forceending = 1;
|
||||
}
|
||||
elsif (@ARGV[0] eq '--FORCE') {
|
||||
$forceending = 2;
|
||||
}
|
||||
elsif (@ARGV[0] =~ m/^-/) {
|
||||
die "What is " . @ARGV[0] . " supposed to mean?\n\n"
|
||||
. "Syntax:\t$0 [option()s] [path(s)]\n\n" . <<'OUTCH'
|
||||
Where: paths specifies the top level directory to convert (default of '.')
|
||||
options are;
|
||||
|
||||
--cr keep/add one ^M
|
||||
--nocr remove ^M's
|
||||
--touch the datestamp (default: keeps date/attribs)
|
||||
--force mismatched corrections (unbalanced ^M's)
|
||||
--FORCE all files regardless of file name!
|
||||
|
||||
OUTCH
|
||||
}
|
||||
else {
|
||||
find(\&totxt, @ARGV[0]);
|
||||
print "scanned " . @ARGV[0] . "\n";
|
||||
$givenpaths = 1;
|
||||
}
|
||||
shift @ARGV;
|
||||
}
|
||||
|
||||
if (!$givenpaths) {
|
||||
find(\&totxt, '.');
|
||||
print "did .\n";
|
||||
}
|
||||
|
||||
sub totxt {
|
||||
$oname = $_;
|
||||
$tname = '.#' . $_;
|
||||
if (!-f) {
|
||||
return;
|
||||
}
|
||||
@exts = split /\./;
|
||||
if ($forceending < 2) {
|
||||
while ($#exts && ($ext = pop(@exts))) {
|
||||
if ($ignore =~ m|-$ext-|i) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
return if ($File::Find::dir =~ m|^(.+/)?.svn(/.+)?$|);
|
||||
@ostat = stat($oname);
|
||||
$srcfl = new IO::File $oname, "r" or die;
|
||||
$dstfl = new IO::File $tname, "w" or die;
|
||||
binmode $srcfl;
|
||||
if ($notnative) {
|
||||
binmode $dstfl;
|
||||
}
|
||||
undef $t;
|
||||
while (<$srcfl>) {
|
||||
if (s/(\r*)\n$/\n/) {
|
||||
$n = length $1;
|
||||
if (!defined $t) {
|
||||
$t = $n;
|
||||
}
|
||||
if (!$forceending && (($n != $t) || m/\r/)) {
|
||||
print "mismatch in " .$oname. ":" .$n. " expected " .$t. "\n";
|
||||
undef $t;
|
||||
last;
|
||||
}
|
||||
elsif ($notnative > 0) {
|
||||
s/\n$/\r\n/;
|
||||
}
|
||||
}
|
||||
print $dstfl $_;
|
||||
}
|
||||
if (defined $t && (tell $srcfl == tell $dstfl)) {
|
||||
undef $t;
|
||||
}
|
||||
undef $srcfl;
|
||||
undef $dstfl;
|
||||
if (defined $t) {
|
||||
unlink $oname or die;
|
||||
rename $tname, $oname or die;
|
||||
@anames = ($oname);
|
||||
if ($preservedate) {
|
||||
utime $ostat[9], $ostat[9], @anames;
|
||||
}
|
||||
chmod $ostat[2] & 07777, @anames;
|
||||
chown $ostat[5], $ostat[6], @anames;
|
||||
print "Converted file " . $oname . " to text in " . $File::Find::dir . "\n";
|
||||
}
|
||||
else {
|
||||
unlink $tname or die;
|
||||
}
|
||||
}
|
||||
+11147
File diff suppressed because it is too large
Load Diff
+437
@@ -0,0 +1,437 @@
|
||||
# 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])])
|
||||
+124
@@ -0,0 +1,124 @@
|
||||
# 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
|
||||
])
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
# 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)
|
||||
])
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
# 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])])
|
||||
+150
@@ -0,0 +1,150 @@
|
||||
|
||||
BEGIN {
|
||||
printf("/*\n")
|
||||
printf(" * THIS FILE WAS AUTOGENERATED BY make_exports.awk\n")
|
||||
printf(" *\n")
|
||||
printf(" * This is an ugly hack that needs to be here, so\n")
|
||||
printf(" * that libtool will link all of the APR functions\n")
|
||||
printf(" * into server regardless of whether the base server\n")
|
||||
printf(" * uses them.\n")
|
||||
printf(" */\n")
|
||||
printf("\n")
|
||||
printf("#define CORE_PRIVATE\n")
|
||||
printf("\n")
|
||||
|
||||
for (i = 1; i < ARGC; i++) {
|
||||
file = ARGV[i]
|
||||
sub("([^/]*[/])*", "", file)
|
||||
printf("#include \"%s\"\n", file)
|
||||
}
|
||||
|
||||
printf("\n")
|
||||
printf("const void *ap_ugly_hack = NULL;\n")
|
||||
printf("\n")
|
||||
|
||||
TYPE_NORMAL = 0
|
||||
TYPE_HEADER = 1
|
||||
|
||||
stackptr = 0
|
||||
}
|
||||
|
||||
function push(line) {
|
||||
stack[stackptr] = line
|
||||
stackptr++
|
||||
}
|
||||
|
||||
function do_output() {
|
||||
printf("/*\n")
|
||||
printf(" * %s\n", FILENAME)
|
||||
printf(" */\n")
|
||||
|
||||
for (i = 0; i < stackptr; i++) {
|
||||
printf("%s\n", stack[i])
|
||||
}
|
||||
|
||||
stackptr = 0
|
||||
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
function enter_scope(type) {
|
||||
scope++
|
||||
scope_type[scope] = type
|
||||
scope_stack[scope] = stackptr
|
||||
delete scope_used[scope]
|
||||
}
|
||||
|
||||
function leave_scope() {
|
||||
used = scope_used[scope]
|
||||
|
||||
if (!used)
|
||||
stackptr = scope_stack[scope]
|
||||
|
||||
scope--
|
||||
if (used) {
|
||||
scope_used[scope] = 1
|
||||
|
||||
if (!scope)
|
||||
do_output()
|
||||
}
|
||||
}
|
||||
|
||||
function add_symbol(symbol) {
|
||||
if (!index(symbol, "#")) {
|
||||
push("const void *ap_hack_" symbol " = (const void *)" symbol ";")
|
||||
scope_used[scope] = 1
|
||||
}
|
||||
}
|
||||
|
||||
/^[ \t]*AP[RUI]?_(CORE_)?DECLARE[^(]*[(][^)]*[)]([^ ]* )*[^(]+[(]/ {
|
||||
sub("[ \t]*AP[RUI]?_(CORE_)?DECLARE[^(]*[(][^)]*[)][ \t]*", "")
|
||||
sub("[(].*", "")
|
||||
sub("([^ ]* (^([ \t]*[(])))+", "")
|
||||
|
||||
add_symbol($0)
|
||||
next
|
||||
}
|
||||
|
||||
/^[ \t]*AP_DECLARE_HOOK[^(]*[(][^)]*/ {
|
||||
split($0, args, ",")
|
||||
symbol = args[2]
|
||||
sub("^[ \t]+", "", symbol)
|
||||
sub("[ \t]+$", "", symbol)
|
||||
|
||||
add_symbol("ap_hook_" symbol)
|
||||
add_symbol("ap_hook_get_" symbol)
|
||||
add_symbol("ap_run_" symbol)
|
||||
next
|
||||
}
|
||||
|
||||
/^[ \t]*APR_POOL_DECLARE_ACCESSOR[^(]*[(][^)]*[)]/ {
|
||||
sub("[ \t]*APR_POOL_DECLARE_ACCESSOR[^(]*[(]", "", $0)
|
||||
sub("[)].*$", "", $0)
|
||||
add_symbol("apr_" $0 "_pool_get")
|
||||
next
|
||||
}
|
||||
|
||||
/^[ \t]*APR_DECLARE_INHERIT_SET[^(]*[(][^)]*[)]/ {
|
||||
sub("[ \t]*APR_DECLARE_INHERIT_SET[^(]*[(]", "", $0)
|
||||
sub("[)].*$", "", $0)
|
||||
add_symbol("apr_" $0 "_inherit_set")
|
||||
next
|
||||
}
|
||||
|
||||
/^[ \t]*APR_DECLARE_INHERIT_UNSET[^(]*[(][^)]*[)]/ {
|
||||
sub("[ \t]*APR_DECLARE_INHERIT_UNSET[^(]*[(]", "", $0)
|
||||
sub("[)].*$", "", $0)
|
||||
add_symbol("apr_" $0 "_inherit_unset")
|
||||
next
|
||||
}
|
||||
|
||||
/^#[ \t]*if(ndef| !defined[(])([^_]*_)*H/ {
|
||||
enter_scope(TYPE_HEADER)
|
||||
next
|
||||
}
|
||||
|
||||
/^#[ \t]*if([n]?def)? / {
|
||||
enter_scope(TYPE_NORMAL)
|
||||
push($0)
|
||||
next
|
||||
}
|
||||
|
||||
/^#[ \t]*endif/ {
|
||||
if (scope_type[scope] == TYPE_NORMAL)
|
||||
push($0)
|
||||
|
||||
leave_scope()
|
||||
next
|
||||
}
|
||||
|
||||
/^#[ \t]*else/ {
|
||||
push($0)
|
||||
next
|
||||
}
|
||||
|
||||
/^#[ \t]*elif/ {
|
||||
push($0)
|
||||
next
|
||||
}
|
||||
|
||||
|
||||
+108
@@ -0,0 +1,108 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You 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.
|
||||
#
|
||||
# Based on apr's make_export.awk, which is
|
||||
# based on Ryan Bloom's make_export.pl
|
||||
#
|
||||
|
||||
BEGIN {
|
||||
add_symbol("apr_wait_for_io_or_timeout")
|
||||
}
|
||||
|
||||
function add_symbol(sym_name) {
|
||||
sub(" ", "", sym_name)
|
||||
exports[++idx] = sym_name
|
||||
}
|
||||
|
||||
# List of functions that we don't support, yet??
|
||||
#/apr_##name##_set_inherit/{next}
|
||||
#/apr_##name##_unset_inherit/{next}
|
||||
#/apr_##name##_perms_set/{next}
|
||||
/apr_socket_perms_set/{next}
|
||||
|
||||
/^[ \t]*AP[RUI]?_DECLARE[^(]*[(][^)]*[)]([^ ]* )*[^(]+[(]/ {
|
||||
sub("[ \t]*AP[RUI]?_DECLARE[^(]*[(][^)]*[)][ \t]*", "")
|
||||
sub("[(].*", "")
|
||||
sub("([^ ]* (^([ \t]*[(])))+", "")
|
||||
add_symbol($0)
|
||||
next
|
||||
}
|
||||
|
||||
/^[ \t]*AP_DECLARE_HOOK[^(]*[(][^)]*/ {
|
||||
split($0, args, ",")
|
||||
symbol = args[2]
|
||||
sub("^[ \t]+", "", symbol)
|
||||
sub("[ \t]+$", "", symbol)
|
||||
add_symbol("ap_hook_" symbol)
|
||||
add_symbol("ap_hook_get_" symbol)
|
||||
add_symbol("ap_run_" symbol)
|
||||
next
|
||||
}
|
||||
|
||||
/^[ \t]*APR_POOL_DECLARE_ACCESSOR[^(]*[(][^)]*[)]/ {
|
||||
sub("[ \t]*APR_POOL_DECLARE_ACCESSOR[^(]*[(]", "", $0)
|
||||
sub("[)].*$", "", $0)
|
||||
add_symbol("apr_" $0 "_pool_get")
|
||||
next
|
||||
}
|
||||
|
||||
/^[ \t]*APR_DECLARE_INHERIT_SET[^(]*[(][^)]*[)]/ {
|
||||
sub("[ \t]*APR_DECLARE_INHERIT_SET[^(]*[(]", "", $0)
|
||||
sub("[)].*$", "", $0)
|
||||
add_symbol("apr_" $0 "_inherit_set")
|
||||
next
|
||||
}
|
||||
|
||||
/^[ \t]*APR_DECLARE_INHERIT_UNSET[^(]*[(][^)]*[)]/ {
|
||||
sub("[ \t]*APR_DECLARE_INHERIT_UNSET[^(]*[(]", "", $0)
|
||||
sub("[)].*$", "", $0)
|
||||
add_symbol("apr_" $0 "_inherit_unset")
|
||||
next
|
||||
}
|
||||
|
||||
/^[ \t]*AP[RUI]?_DECLARE_DATA .*;/ {
|
||||
gsub(/[*;\n\r]/, "", $NF)
|
||||
gsub(/\[.*\]/, "", $NF)
|
||||
add_symbol($NF)
|
||||
}
|
||||
|
||||
|
||||
END {
|
||||
printf("Added %d symbols to export list.\n", idx) > "/dev/stderr"
|
||||
# sort symbols with shell sort
|
||||
increment = int(idx / 2)
|
||||
while (increment > 0) {
|
||||
for (i = increment+1; i <= idx; i++) {
|
||||
j = i
|
||||
temp = exports[i]
|
||||
while ((j >= increment+1) && (exports[j-increment] > temp)) {
|
||||
exports[j] = exports[j-increment]
|
||||
j -= increment
|
||||
}
|
||||
exports[j] = temp
|
||||
}
|
||||
if (increment == 2)
|
||||
increment = 1
|
||||
else
|
||||
increment = int(increment*5/11)
|
||||
}
|
||||
# print the array
|
||||
printf(" (%s)\n", EXPPREFIX)
|
||||
while (x < idx - 1) {
|
||||
printf(" %s,\n", exports[++x])
|
||||
}
|
||||
printf(" %s\n", exports[++x])
|
||||
}
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
# Based on apr's make_export.awk, which is
|
||||
# based on Ryan Bloom's make_export.pl
|
||||
|
||||
/^#[ \t]*if(def)? (AP[RUI]?_|!?defined).*/ {
|
||||
if (old_filename != FILENAME) {
|
||||
if (old_filename != "") printf("%s", line)
|
||||
macro_no = 0
|
||||
found = 0
|
||||
count = 0
|
||||
old_filename = FILENAME
|
||||
line = ""
|
||||
}
|
||||
macro_stack[macro_no++] = macro
|
||||
macro = substr($0, length($1)+2)
|
||||
count++
|
||||
line = line "#ifdef " macro "\n"
|
||||
next
|
||||
}
|
||||
|
||||
/^#[ \t]*endif/ {
|
||||
if (count > 0) {
|
||||
count--
|
||||
line = line "#endif /* " macro " */\n"
|
||||
macro = macro_stack[--macro_no]
|
||||
}
|
||||
if (count == 0) {
|
||||
if (found != 0) {
|
||||
printf("%s", line)
|
||||
}
|
||||
line = ""
|
||||
}
|
||||
next
|
||||
}
|
||||
|
||||
function add_symbol (sym_name) {
|
||||
if (count) {
|
||||
found++
|
||||
}
|
||||
for (i = 0; i < count; i++) {
|
||||
line = line "\t"
|
||||
}
|
||||
line = line sym_name "\n"
|
||||
|
||||
if (count == 0) {
|
||||
printf("%s", line)
|
||||
line = ""
|
||||
}
|
||||
}
|
||||
|
||||
/^[ \t]*(extern[ \t]+)?AP[RUI]?_DECLARE_DATA .*;$/ {
|
||||
varname = $NF;
|
||||
gsub( /[*;]/, "", varname);
|
||||
gsub( /\[.*\]/, "", varname);
|
||||
add_symbol(varname);
|
||||
}
|
||||
|
||||
END {
|
||||
printf("%s", line)
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
#!/bin/sh
|
||||
##
|
||||
## mkdir.sh -- make directory hierarchy
|
||||
##
|
||||
## Based on `mkinstalldirs' from Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
## as of 1994-03-25, which was placed in the Public Domain.
|
||||
## Cleaned up for Apache's Autoconf-style Interface (APACI)
|
||||
## by Ralf S. Engelschall <rse@apache.org>
|
||||
##
|
||||
#
|
||||
# This script falls under the Apache License.
|
||||
# See http://www.apache.org/docs/LICENSE
|
||||
|
||||
|
||||
umask 022
|
||||
errstatus=0
|
||||
for file in ${1+"$@"} ; do
|
||||
set fnord `echo ":$file" |\
|
||||
sed -e 's/^:\//%/' -e 's/^://' -e 's/\// /g' -e 's/^%/\//'`
|
||||
shift
|
||||
pathcomp=
|
||||
for d in ${1+"$@"}; do
|
||||
pathcomp="$pathcomp$d"
|
||||
case "$pathcomp" in
|
||||
-* ) pathcomp=./$pathcomp ;;
|
||||
?: ) pathcomp="$pathcomp/"
|
||||
continue ;;
|
||||
esac
|
||||
if test ! -d "$pathcomp"; then
|
||||
echo "mkdir $pathcomp" 1>&2
|
||||
thiserrstatus=0
|
||||
mkdir "$pathcomp" || thiserrstatus=$?
|
||||
# ignore errors due to races if a parallel mkdir.sh already
|
||||
# created the dir
|
||||
if test $thiserrstatus != 0 && test ! -d "$pathcomp" ; then
|
||||
errstatus=$thiserrstatus
|
||||
fi
|
||||
fi
|
||||
pathcomp="$pathcomp/"
|
||||
done
|
||||
done
|
||||
exit $errstatus
|
||||
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
/* Must include apr.h first so that we can undefine
|
||||
the standard prototypes macros after it messes with
|
||||
them. */
|
||||
#include "apr.h"
|
||||
|
||||
#undef APR_DECLARE
|
||||
#undef APR_DECLARE_NONSTD
|
||||
#undef APR_DECLARE_HOOK
|
||||
#undef APR_POOL_DECLARE_ACCESSOR
|
||||
#undef APR_DECLARE_DATA
|
||||
|
||||
/* Preprocess all of the standard APR headers. */
|
||||
#include "apr_allocator.h"
|
||||
#include "apr_atomic.h"
|
||||
#include "apr_dso.h"
|
||||
#include "apr_env.h"
|
||||
#include "apr_errno.h"
|
||||
#include "apr_escape.h"
|
||||
#include "apr_file_info.h"
|
||||
#include "apr_file_io.h"
|
||||
#include "apr_fnmatch.h"
|
||||
#include "apr_general.h"
|
||||
#include "apr_getopt.h"
|
||||
#include "apr_global_mutex.h"
|
||||
#include "apr_hash.h"
|
||||
#include "apr_inherit.h"
|
||||
#include "apr_lib.h"
|
||||
#include "apr_mmap.h"
|
||||
#include "apr_network_io.h"
|
||||
#include "apr_poll.h"
|
||||
#include "apr_pools.h"
|
||||
#include "apr_portable.h"
|
||||
#include "apr_proc_mutex.h"
|
||||
#include "apr_ring.h"
|
||||
#include "apr_random.h"
|
||||
#include "apr_shm.h"
|
||||
#include "apr_signal.h"
|
||||
#include "apr_skiplist.h"
|
||||
#include "apr_strings.h"
|
||||
#include "apr_support.h"
|
||||
#include "apr_tables.h"
|
||||
#include "apr_thread_cond.h"
|
||||
#include "apr_thread_mutex.h"
|
||||
#include "apr_thread_proc.h"
|
||||
#include "apr_thread_rwlock.h"
|
||||
#include "apr_time.h"
|
||||
#include "apr_user.h"
|
||||
#include "apr_version.h"
|
||||
#include "apr_want.h"
|
||||
|
||||
#include "nw_apu_export.inc"
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You 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.
|
||||
#
|
||||
# Based on apr's make_export.awk, which is
|
||||
# based on Ryan Bloom's make_export.pl
|
||||
#
|
||||
|
||||
/^\#define APR_HAS_LDAP / {
|
||||
sub($3, WITH_LDAP ,$0)
|
||||
}
|
||||
|
||||
{
|
||||
print
|
||||
}
|
||||
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You 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.
|
||||
|
||||
BEGIN {
|
||||
|
||||
# fetch APR version numbers from input file and write them to STDOUT
|
||||
|
||||
while ((getline < ARGV[1]) > 0) {
|
||||
if (match ($0, /^#define APR_MAJOR_VERSION/)) {
|
||||
ver_major = $3;
|
||||
}
|
||||
else if (match ($0, /^#define APR_MINOR_VERSION/)) {
|
||||
ver_minor = $3;
|
||||
}
|
||||
else if (match ($0, /^#define APR_PATCH_VERSION/)) {
|
||||
ver_patch = $3;
|
||||
}
|
||||
else if (match ($0, /^#define APR_IS_DEV_VERSION/)) {
|
||||
ver_devbuild = 1;
|
||||
}
|
||||
}
|
||||
ver_str = ver_major "." ver_minor "." ver_patch (ver_devbuild ? "-dev" : "");
|
||||
if (WANTED) {
|
||||
ver_num = ver_major * 1000000 + ver_minor * 1000 + ver_patch;
|
||||
if (ver_num < WANTED) {
|
||||
print "ERROR: APR version " ver_str " does NOT match!";
|
||||
exit 1;
|
||||
} else if (ver_num > (WANTED + 1000)) {
|
||||
print "WARNING: APR version " ver_str " higher than expected!";
|
||||
exit 0;
|
||||
} else {
|
||||
print "OK: APR version " ver_str "";
|
||||
exit 0;
|
||||
}
|
||||
} else {
|
||||
ver_nlm = ver_major "," ver_minor "," ver_patch;
|
||||
print "VERSION = " ver_nlm "";
|
||||
print "VERSION_STR = " ver_str "";
|
||||
print "VERSION_MAJMIN = " ver_major ver_minor "";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
The script in this directory will attempt to build a Solaris package
|
||||
out of a source tree for APR.
|
||||
|
||||
To build a package, make sure you are in the root of the source tree,
|
||||
and run:
|
||||
|
||||
build/pkg/buildpkg.sh
|
||||
|
||||
A Solaris package called apr-<version>-<architecture>-local.gz will be
|
||||
created in the root of the source tree.
|
||||
|
||||
By default, if you attempt to build packages for apr-util, it will
|
||||
search for the sources for apr in:
|
||||
|
||||
../apr
|
||||
|
||||
You may override the location of apr like so:
|
||||
|
||||
build/pkg/buildpkg.sh --with-apr=some/other/path
|
||||
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
#!/bin/sh
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You 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.
|
||||
#
|
||||
#
|
||||
|
||||
# buildpkg.sh: This script builds a Solaris PKG from the source tree
|
||||
# provided.
|
||||
|
||||
PREFIX=/usr/local
|
||||
TEMPDIR=/var/tmp/$USER/apr-root
|
||||
rm -rf $TEMPDIR
|
||||
|
||||
apr_src_dir=.
|
||||
|
||||
while test $# -gt 0
|
||||
do
|
||||
# Normalize
|
||||
case "$1" in
|
||||
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
|
||||
*) optarg= ;;
|
||||
esac
|
||||
|
||||
case "$1" in
|
||||
--with-apr=*)
|
||||
apr_src_dir=$optarg
|
||||
;;
|
||||
esac
|
||||
|
||||
shift
|
||||
done
|
||||
|
||||
if [ -f "$apr_src_dir/configure.in" ]; then
|
||||
cd $apr_src_dir
|
||||
else
|
||||
echo "The apr source could not be found within $apr_src_dir"
|
||||
echo "Usage: buildpkg [--with-apr=dir]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
./configure --prefix=$PREFIX
|
||||
make
|
||||
make install DESTDIR=$TEMPDIR
|
||||
rm $TEMPDIR$PREFIX/lib/apr.exp
|
||||
. build/pkg/pkginfo
|
||||
cp build/pkg/pkginfo $TEMPDIR$PREFIX
|
||||
|
||||
current=`pwd`
|
||||
cd $TEMPDIR$PREFIX
|
||||
echo "i pkginfo=./pkginfo" > prototype
|
||||
find . -print | grep -v ./prototype | grep -v ./pkginfo | pkgproto | awk '{print $1" "$2" "$3" "$4" root bin"}' >> prototype
|
||||
mkdir $TEMPDIR/pkg
|
||||
pkgmk -r $TEMPDIR$PREFIX -d $TEMPDIR/pkg
|
||||
|
||||
cd $current
|
||||
pkgtrans -s $TEMPDIR/pkg $current/$NAME-$VERSION-$ARCH-local
|
||||
gzip $current/$NAME-$VERSION-$ARCH-local
|
||||
|
||||
rm -rf $TEMPDIR
|
||||
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
PKG="ASFapr-1"
|
||||
NAME="apr"
|
||||
ARCH="@target_cpu@"
|
||||
VERSION="@APR_DOTTED_VERSION@"
|
||||
CATEGORY="application"
|
||||
VENDOR="Apache Software Foundation"
|
||||
EMAIL="dev@apr.apache.org"
|
||||
PSTAMP="dev@apr.apache.org"
|
||||
BASEDIR="@prefix@"
|
||||
CLASSES="none"
|
||||
|
||||
+179
@@ -0,0 +1,179 @@
|
||||
# Microsoft Developer Studio Project File - Name="preaprapp" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) External Target" 0x0106
|
||||
|
||||
CFG=preaprapp - Win32 Release
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "preaprapp.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "preaprapp.mak" CFG="preaprapp - Win32 Release"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "preaprapp - Win32 Release" (based on "Win32 (x86) External Target")
|
||||
!MESSAGE "preaprapp - Win32 Debug" (based on "Win32 (x86) External Target")
|
||||
!MESSAGE "preaprapp - Win32 Release9x" (based on "Win32 (x86) External Target")
|
||||
!MESSAGE "preaprapp - Win32 Debug9x" (based on "Win32 (x86) External Target")
|
||||
!MESSAGE "preaprapp - x64 Release" (based on "Win32 (x86) External Target")
|
||||
!MESSAGE "preaprapp - x64 Debug" (based on "Win32 (x86) External Target")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
|
||||
!IF "$(CFG)" == "preaprapp - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir ""
|
||||
# PROP BASE Intermediate_Dir ""
|
||||
# PROP BASE Cmd_Line "NMAKE /nologo /f NUL"
|
||||
# PROP BASE Rebuild_Opt "/a"
|
||||
# PROP BASE Target_File "preaprapp.exe"
|
||||
# PROP BASE Bsc_Name "preaprapp.bsc"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir ""
|
||||
# PROP Intermediate_Dir ""
|
||||
# PROP Cmd_Line "NMAKE /nologo /f NUL"
|
||||
# PROP Rebuild_Opt "/a"
|
||||
# PROP Bsc_Name ""
|
||||
# PROP Target_Dir ""
|
||||
|
||||
!ELSEIF "$(CFG)" == "preaprapp - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir ""
|
||||
# PROP BASE Intermediate_Dir ""
|
||||
# PROP BASE Cmd_Line "NMAKE /nologo /f NUL"
|
||||
# PROP BASE Rebuild_Opt "/a"
|
||||
# PROP BASE Target_File "preaprapp.exe"
|
||||
# PROP BASE Bsc_Name "preaprapp.bsc"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir ""
|
||||
# PROP Intermediate_Dir ""
|
||||
# PROP Cmd_Line "NMAKE /nologo /f NUL"
|
||||
# PROP Rebuild_Opt "/a"
|
||||
# PROP Bsc_Name ""
|
||||
# PROP Target_Dir ""
|
||||
|
||||
!ELSEIF "$(CFG)" == "preaprapp - Win32 Release9x"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir ""
|
||||
# PROP BASE Intermediate_Dir ""
|
||||
# PROP BASE Cmd_Line "NMAKE /nologo /f NUL"
|
||||
# PROP BASE Rebuild_Opt "/a"
|
||||
# PROP BASE Target_File "preaprapp.exe"
|
||||
# PROP BASE Bsc_Name "preaprapp.bsc"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir ""
|
||||
# PROP Intermediate_Dir ""
|
||||
# PROP Cmd_Line "NMAKE /nologo /f NUL"
|
||||
# PROP Rebuild_Opt "/a"
|
||||
# PROP Bsc_Name ""
|
||||
# PROP Target_Dir ""
|
||||
|
||||
!ELSEIF "$(CFG)" == "preaprapp - Win32 Debug9x"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir ""
|
||||
# PROP BASE Intermediate_Dir ""
|
||||
# PROP BASE Cmd_Line "NMAKE /nologo /f NUL"
|
||||
# PROP BASE Rebuild_Opt "/a"
|
||||
# PROP BASE Target_File "preaprapp.exe"
|
||||
# PROP BASE Bsc_Name "preaprapp.bsc"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir ""
|
||||
# PROP Intermediate_Dir ""
|
||||
# PROP Cmd_Line "NMAKE /nologo /f NUL"
|
||||
# PROP Rebuild_Opt "/a"
|
||||
# PROP Bsc_Name ""
|
||||
# PROP Target_Dir ""
|
||||
|
||||
!ELSEIF "$(CFG)" == "preaprapp - x64 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir ""
|
||||
# PROP BASE Intermediate_Dir ""
|
||||
# PROP BASE Cmd_Line "NMAKE /nologo /f NUL"
|
||||
# PROP BASE Rebuild_Opt "/a"
|
||||
# PROP BASE Target_File "preaprapp.exe"
|
||||
# PROP BASE Bsc_Name "preaprapp.bsc"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir ""
|
||||
# PROP Intermediate_Dir ""
|
||||
# PROP Cmd_Line "NMAKE /nologo /f NUL"
|
||||
# PROP Rebuild_Opt "/a"
|
||||
# PROP Bsc_Name ""
|
||||
# PROP Target_Dir ""
|
||||
|
||||
!ELSEIF "$(CFG)" == "preaprapp - x64 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir ""
|
||||
# PROP BASE Intermediate_Dir ""
|
||||
# PROP BASE Cmd_Line "NMAKE /nologo /f NUL"
|
||||
# PROP BASE Rebuild_Opt "/a"
|
||||
# PROP BASE Target_File "preaprapp.exe"
|
||||
# PROP BASE Bsc_Name "preaprapp.bsc"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir ""
|
||||
# PROP Intermediate_Dir ""
|
||||
# PROP Cmd_Line "NMAKE /nologo /f NUL"
|
||||
# PROP Rebuild_Opt "/a"
|
||||
# PROP Bsc_Name ""
|
||||
# PROP Target_Dir ""
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "preaprapp - Win32 Release"
|
||||
# Name "preaprapp - Win32 Debug"
|
||||
# Name "preaprapp - Win32 Release9x"
|
||||
# Name "preaprapp - Win32 Debug9x"
|
||||
# Name "preaprapp - x64 Release"
|
||||
# Name "preaprapp - x64 Debug"
|
||||
|
||||
!IF "$(CFG)" == "preaprapp - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "preaprapp - Win32 Debug"
|
||||
|
||||
!ELSEIF "$(CFG)" == "preaprapp - Win32 Release9x"
|
||||
|
||||
!ELSEIF "$(CFG)" == "preaprapp - Win32 Debug9x"
|
||||
|
||||
!ELSEIF "$(CFG)" == "preaprapp - x64 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "preaprapp - x64 Debug"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Target
|
||||
# End Project
|
||||
+179
@@ -0,0 +1,179 @@
|
||||
# Microsoft Developer Studio Project File - Name="prelibaprapp" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) External Target" 0x0106
|
||||
|
||||
CFG=prelibaprapp - Win32 Release
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "prelibaprapp.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "prelibaprapp.mak" CFG="prelibaprapp - Win32 Release"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "prelibaprapp - Win32 Release" (based on "Win32 (x86) External Target")
|
||||
!MESSAGE "prelibaprapp - Win32 Debug" (based on "Win32 (x86) External Target")
|
||||
!MESSAGE "prelibaprapp - Win32 Release9x" (based on "Win32 (x86) External Target")
|
||||
!MESSAGE "prelibaprapp - Win32 Debug9x" (based on "Win32 (x86) External Target")
|
||||
!MESSAGE "prelibaprapp - x64 Release" (based on "Win32 (x86) External Target")
|
||||
!MESSAGE "prelibaprapp - x64 Debug" (based on "Win32 (x86) External Target")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
|
||||
!IF "$(CFG)" == "prelibaprapp - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir ""
|
||||
# PROP BASE Intermediate_Dir ""
|
||||
# PROP BASE Cmd_Line "NMAKE /nologo /f NUL"
|
||||
# PROP BASE Rebuild_Opt "/a"
|
||||
# PROP BASE Target_File "prelibaprapp.exe"
|
||||
# PROP BASE Bsc_Name "prelibaprapp.bsc"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir ""
|
||||
# PROP Intermediate_Dir ""
|
||||
# PROP Cmd_Line "NMAKE /nologo /f NUL"
|
||||
# PROP Rebuild_Opt "/a"
|
||||
# PROP Bsc_Name ""
|
||||
# PROP Target_Dir ""
|
||||
|
||||
!ELSEIF "$(CFG)" == "prelibaprapp - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir ""
|
||||
# PROP BASE Intermediate_Dir ""
|
||||
# PROP BASE Cmd_Line "NMAKE /nologo /f NUL"
|
||||
# PROP BASE Rebuild_Opt "/a"
|
||||
# PROP BASE Target_File "prelibaprapp.exe"
|
||||
# PROP BASE Bsc_Name "prelibaprapp.bsc"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir ""
|
||||
# PROP Intermediate_Dir ""
|
||||
# PROP Cmd_Line "NMAKE /nologo /f NUL"
|
||||
# PROP Rebuild_Opt "/a"
|
||||
# PROP Bsc_Name ""
|
||||
# PROP Target_Dir ""
|
||||
|
||||
!ELSEIF "$(CFG)" == "prelibaprapp - Win32 Release9x"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir ""
|
||||
# PROP BASE Intermediate_Dir ""
|
||||
# PROP BASE Cmd_Line "NMAKE /nologo /f NUL"
|
||||
# PROP BASE Rebuild_Opt "/a"
|
||||
# PROP BASE Target_File "prelibaprapp.exe"
|
||||
# PROP BASE Bsc_Name "prelibaprapp.bsc"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir ""
|
||||
# PROP Intermediate_Dir ""
|
||||
# PROP Cmd_Line "NMAKE /nologo /f NUL"
|
||||
# PROP Rebuild_Opt "/a"
|
||||
# PROP Bsc_Name ""
|
||||
# PROP Target_Dir ""
|
||||
|
||||
!ELSEIF "$(CFG)" == "prelibaprapp - Win32 Debug9x"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir ""
|
||||
# PROP BASE Intermediate_Dir ""
|
||||
# PROP BASE Cmd_Line "NMAKE /nologo /f NUL"
|
||||
# PROP BASE Rebuild_Opt "/a"
|
||||
# PROP BASE Target_File "prelibaprapp.exe"
|
||||
# PROP BASE Bsc_Name "prelibaprapp.bsc"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir ""
|
||||
# PROP Intermediate_Dir ""
|
||||
# PROP Cmd_Line "NMAKE /nologo /f NUL"
|
||||
# PROP Rebuild_Opt "/a"
|
||||
# PROP Bsc_Name ""
|
||||
# PROP Target_Dir ""
|
||||
|
||||
!ELSEIF "$(CFG)" == "prelibaprapp - x64 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir ""
|
||||
# PROP BASE Intermediate_Dir ""
|
||||
# PROP BASE Cmd_Line "NMAKE /nologo /f NUL"
|
||||
# PROP BASE Rebuild_Opt "/a"
|
||||
# PROP BASE Target_File "prelibaprapp.exe"
|
||||
# PROP BASE Bsc_Name "prelibaprapp.bsc"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir ""
|
||||
# PROP Intermediate_Dir ""
|
||||
# PROP Cmd_Line "NMAKE /nologo /f NUL"
|
||||
# PROP Rebuild_Opt "/a"
|
||||
# PROP Bsc_Name ""
|
||||
# PROP Target_Dir ""
|
||||
|
||||
!ELSEIF "$(CFG)" == "prelibaprapp - x64 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir ""
|
||||
# PROP BASE Intermediate_Dir ""
|
||||
# PROP BASE Cmd_Line "NMAKE /nologo /f NUL"
|
||||
# PROP BASE Rebuild_Opt "/a"
|
||||
# PROP BASE Target_File "prelibaprapp.exe"
|
||||
# PROP BASE Bsc_Name "prelibaprapp.bsc"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir ""
|
||||
# PROP Intermediate_Dir ""
|
||||
# PROP Cmd_Line "NMAKE /nologo /f NUL"
|
||||
# PROP Rebuild_Opt "/a"
|
||||
# PROP Bsc_Name ""
|
||||
# PROP Target_Dir ""
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "prelibaprapp - Win32 Release"
|
||||
# Name "prelibaprapp - Win32 Debug"
|
||||
# Name "prelibaprapp - Win32 Release9x"
|
||||
# Name "prelibaprapp - Win32 Debug9x"
|
||||
# Name "prelibaprapp - x64 Release"
|
||||
# Name "prelibaprapp - x64 Debug"
|
||||
|
||||
!IF "$(CFG)" == "prelibaprapp - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "prelibaprapp - Win32 Debug"
|
||||
|
||||
!ELSEIF "$(CFG)" == "prelibaprapp - Win32 Release9x"
|
||||
|
||||
!ELSEIF "$(CFG)" == "prelibaprapp - Win32 Debug9x"
|
||||
|
||||
!ELSEIF "$(CFG)" == "prelibaprapp - x64 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "prelibaprapp - x64 Debug"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Target
|
||||
# End Project
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
|
||||
%define aprver 1
|
||||
|
||||
Summary: Apache Portable Runtime library
|
||||
Name: apr
|
||||
Version: APR_VERSION
|
||||
Release: APR_RELEASE
|
||||
License: Apache Software License
|
||||
Group: System Environment/Libraries
|
||||
URL: http://apr.apache.org/
|
||||
Source0: http://www.apache.org/dist/apr/%{name}-%{version}.tar.bz2
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
||||
BuildRequires: autoconf, libtool, doxygen, libuuid-devel, python
|
||||
|
||||
%description
|
||||
The mission of the Apache Portable Runtime (APR) is to provide a
|
||||
free library of C data structures and routines, forming a system
|
||||
portability layer to as many operating systems as possible,
|
||||
including Unices, MS Win32, BeOS and OS/2.
|
||||
|
||||
%package devel
|
||||
Group: Development/Libraries
|
||||
Summary: APR library development kit
|
||||
Requires: apr = %{version}
|
||||
|
||||
%description devel
|
||||
This package provides the support files which can be used to
|
||||
build applications using the APR library. The mission of the
|
||||
Apache Portable Runtime (APR) is to provide a free library of
|
||||
C data structures and routines.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
# regenerate configure script etc.
|
||||
./buildconf
|
||||
%configure \
|
||||
--prefix=/usr \
|
||||
--includedir=%{_includedir}/apr-%{aprver} \
|
||||
--with-installbuilddir=%{_libdir}/apr/build-%{aprver} \
|
||||
--with-devrandom=/dev/urandom \
|
||||
CC=gcc CXX=g++
|
||||
make %{?_smp_mflags} && make dox
|
||||
|
||||
%check
|
||||
# Run non-interactive tests
|
||||
pushd test
|
||||
make %{?_smp_mflags} all CFLAGS=-fno-strict-aliasing
|
||||
make check || exit 1
|
||||
popd
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
|
||||
# Move docs to more convenient location
|
||||
mv docs/dox/html html
|
||||
|
||||
# Unpackaged files:
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/apr.exp
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc CHANGES LICENSE NOTICE
|
||||
%{_libdir}/libapr-%{aprver}.so.*
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
%doc docs/APRDesign.html docs/canonical_filenames.html
|
||||
%doc docs/incomplete_types docs/non_apr_programs
|
||||
%doc html
|
||||
%{_bindir}/apr*config
|
||||
%{_libdir}/libapr-%{aprver}.*a
|
||||
%{_libdir}/libapr-%{aprver}.so
|
||||
%dir %{_libdir}/apr
|
||||
%dir %{_libdir}/apr/build-%{aprver}
|
||||
%{_libdir}/apr/build-%{aprver}/*
|
||||
%{_libdir}/pkgconfig/apr-%{aprver}.pc
|
||||
%dir %{_includedir}/apr-%{aprver}
|
||||
%{_includedir}/apr-%{aprver}/*.h
|
||||
|
||||
%changelog
|
||||
* Sat Aug 30 2008 Graham Leggett <minfrin@sharp.fm> 1.3.3
|
||||
- update to depend on the bzip2 binary
|
||||
- build depends on python
|
||||
|
||||
* Tue Jun 22 2004 Graham Leggett <minfrin@sharp.fm> 1.0.0-1
|
||||
- update to support v1.0.0 of APR
|
||||
|
||||
* Tue Jun 22 2004 Graham Leggett <minfrin@sharp.fm> 1.0.0-1
|
||||
- derived from Fedora Core apr.spec
|
||||
|
||||
+130
@@ -0,0 +1,130 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ ! -d coverage ]; then
|
||||
mkdir coverage
|
||||
fi
|
||||
cd coverage
|
||||
|
||||
# It would be really nice to find a better way to do this than copying the
|
||||
# HTML into this script. But, I am being lazy right now.
|
||||
cat > index.html << EOF
|
||||
<!-- This is a generated file, do not edit -->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
|
||||
<meta name="author" content="APR Developers" /><meta name="email" content="dev@apr.apache.org" />
|
||||
<title>Test Coverage</title>
|
||||
</head>
|
||||
<body bgcolor="#ffffff" text="#000000" link="#525D76">
|
||||
<p><a href="/"><img src="./images/apr_logo_wide.png" alt="The Apache Portable Runtime Project" border="0"/></a></p>
|
||||
<table border="0" width="100%" cellspacing="4">
|
||||
<tr>
|
||||
<!-- LEFT SIDE NAVIGATION -->
|
||||
<td valign="top" nowrap="nowrap">
|
||||
<a href="http://apachecon.com/"
|
||||
><img src="http://www.apache.org/images/ac2003-150.gif" height="86"
|
||||
width="150" border="0" alt="ApacheCon" /></a>
|
||||
<p><b>Get Involved</b></p>
|
||||
<menu compact="compact">
|
||||
<li><a href="/anoncvs.txt">CVS</a></li>
|
||||
<li><a href="/mailing-lists.html">Mailing Lists</a></li>
|
||||
<li><a href="http://cvs.apache.org/snapshots/apr/">Snapshots</a></li>
|
||||
<li><a href="/compiling_win32.html">Build on Win32</a></li>
|
||||
<li><a href="/compiling_unix.html">Build on Unix</a></li>
|
||||
</menu>
|
||||
<p><b>Download!</b></p>
|
||||
<menu compact="compact">
|
||||
<li><a href="http://www.apache.org/dyn/closer.cgi/apr/">from a mirror</a></li>
|
||||
</menu>
|
||||
<p><b>Docs</b></p>
|
||||
<menu compact="compact">
|
||||
<li><a href="/docs/apr/">APR</a></li>
|
||||
<li><a href="/docs/apr-util/">APR-util</a></li>
|
||||
<li>APR-iconv</li>
|
||||
</menu>
|
||||
<p><b>Guidelines</b></p>
|
||||
<menu compact="compact">
|
||||
<li><a href="/guidelines.html">Project Guidelines</a></li>
|
||||
<li><a href="/patches.html">Contributing</a></li>
|
||||
<li><a href="/versioning.html">Version Numbers</a></li>
|
||||
</menu>
|
||||
<p><b><a href="/info/">Miscellaneous</a></b></p>
|
||||
<menu compact="compact">
|
||||
<li><a href="http://www.apache.org/LICENSE.txt">License</a></li>
|
||||
<li><a href="/projects.html">Projects using APR</a></li>
|
||||
</menu>
|
||||
</td>
|
||||
<!-- RIGHT SIDE INFORMATION -->
|
||||
<td align="left" valign="top">
|
||||
<table border="0" cellspacing="0" cellpadding="2" width="100%">
|
||||
<tr><td bgcolor="#525D76">
|
||||
<font color="#ffffff" face="arial,helvetica,sanserif">
|
||||
<strong>APR Test Coverage</strong>
|
||||
</font>
|
||||
</td></tr>
|
||||
<tr><td>
|
||||
<blockquote>
|
||||
<p>This should give us some idea of how well our tests actually stress our
|
||||
code. To generate this data, do the following:</p>
|
||||
<menu compact="compact">
|
||||
<li>./buildconf</li>
|
||||
<li>CFLAGS="-fprofile-arcs -ftest-coverage ./configure</li>
|
||||
<li>make</li>
|
||||
<li>cd test</li>
|
||||
<li>make</li>
|
||||
<li>./testall</li>
|
||||
<li>cd ..</li>
|
||||
<li>make gcov</li>
|
||||
</menu>
|
||||
<p>Note that this will only generate test coverage data for the testall script,
|
||||
but all tests should be moving to the unified framework, so this is correct.</p>
|
||||
</blockquote>
|
||||
|
||||
<table border="0" width="100%" cellspacing="0">
|
||||
EOF
|
||||
|
||||
for i in `find .. -name "*.bb" -maxdepth 1 | sort`; do
|
||||
percent=`gcov $i -o .. | grep "%" | awk -F'%' {'print $1'}`
|
||||
name=`echo $i | awk -F'/' {'print $2'}`
|
||||
basename=`echo $name | awk -F'.' {'print $1'}`
|
||||
|
||||
if [ "x$percent" = "x" ]; then
|
||||
echo "<tr>" >> index.html
|
||||
echo "<td bgcolor=#ffffff> Error generating data for $basename<br>" >> index.html
|
||||
continue;
|
||||
fi
|
||||
intpercent=`echo "$percent/1" | bc`
|
||||
if [ $intpercent -lt 33 ]; then
|
||||
color="#ffaaaa"
|
||||
else if [ $intpercent -lt 66 ]; then
|
||||
color="#ffff77"
|
||||
else
|
||||
color="#aaffaa"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "<tr>" >> index.html
|
||||
echo "<td bgcolor=$color><a href=\"$basename.c.gcov\">$basename</a><br>" >> index.html
|
||||
echo "<td bgcolor=$color>$percent% tested" >> index.html
|
||||
done
|
||||
|
||||
echo "</table><p>Last generated `date`</p>" >> index.html
|
||||
|
||||
cat >> index.html << EOF
|
||||
</td></tr>
|
||||
</table>
|
||||
<!-- FOOTER -->
|
||||
<tr><td colspan="2"><hr noshade="noshade" size="1"/></td></tr>
|
||||
<tr><td colspan="2" align="center">
|
||||
<font size="-1">
|
||||
<em>Copyright © 1999-2004, The Apache Software Foundation</em>
|
||||
</font>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
EOF
|
||||
+124
@@ -0,0 +1,124 @@
|
||||
BEGIN {
|
||||
|
||||
# ff bits: 1(debug), 2(prerelease), 4(patched), 8(vendor) and 32(special)
|
||||
# debug is summed based on the /Define _DEBUG
|
||||
# prerelease is based on the -dev extension,
|
||||
# patched is based on a non-standard "-ver" extension,
|
||||
# special and vendor are toggled by their args.
|
||||
#
|
||||
ff = 0;
|
||||
|
||||
file=ARGV[1];
|
||||
desc=ARGV[2];
|
||||
rel_h=ARGV[3];
|
||||
|
||||
filename = file;
|
||||
if (match(file, /\./)) {
|
||||
sub(/\.[^\.]*$/, "", file);
|
||||
}
|
||||
|
||||
i = 4;
|
||||
while (length(ARGV[i])) {
|
||||
if (match(ARGV[i], /icon=/)) {
|
||||
icon = substr(ARGV[i], 6);
|
||||
}
|
||||
if (match(ARGV[i], /vendor=/)) {
|
||||
vendor = substr(ARGV[i], 8);
|
||||
ff = ff + 8;
|
||||
}
|
||||
if (match(ARGV[i], /special=/)) {
|
||||
special = substr(ARGV[i], 9);
|
||||
ff = ff + 32;
|
||||
}
|
||||
i = i + 1
|
||||
}
|
||||
|
||||
i = i - 1;
|
||||
while (i) {
|
||||
delete ARGV[i];
|
||||
i = i - 1;
|
||||
}
|
||||
|
||||
while ((getline < rel_h) > 0) {
|
||||
if (match ($0, /^#define AP._MAJOR_VERSION/)) {
|
||||
ver_major = $3;
|
||||
}
|
||||
if (match ($0, /^#define AP._MINOR_VERSION/)) {
|
||||
ver_minor = $3;
|
||||
}
|
||||
if (match ($0, /^#define AP._PATCH_VERSION/)) {
|
||||
ver_patch = $3;
|
||||
}
|
||||
if (match ($0, /^#define AP._IS_DEV_VERSION/)) {
|
||||
ver_suffix = "-dev";
|
||||
ver_build = "0";
|
||||
}
|
||||
if (match ($0, /^#undef AP._IS_DEV_VERSION/)) {
|
||||
ver_build = "100";
|
||||
}
|
||||
if (match ($0, /^.*Copyright /)) {
|
||||
copyright = substr($0, RLENGTH + 1);
|
||||
}
|
||||
}
|
||||
ver = ver_major "." ver_minor "." ver_patch ver_suffix;
|
||||
verc = ver_major "," ver_minor "," ver_patch "," ver_build;
|
||||
|
||||
if (length(vendor)) {
|
||||
ff = ff + 8;
|
||||
}
|
||||
|
||||
if (length(icon)) {
|
||||
print "1 ICON DISCARDABLE \"" icon "\"";
|
||||
}
|
||||
print "1 VERSIONINFO";
|
||||
print " FILEVERSION " verc "";
|
||||
print " PRODUCTVERSION " verc "";
|
||||
print " FILEFLAGSMASK 0x3fL";
|
||||
print "#if defined(_DEBUG)"
|
||||
print " FILEFLAGS 0x" sprintf("%02x", ff + 1) "L";
|
||||
print "#else"
|
||||
print " FILEFLAGS 0x" sprintf("%02x", ff) "L";
|
||||
print "#endif"
|
||||
print " FILEOS 0x40004L";
|
||||
print " FILETYPE 0x1L";
|
||||
print " FILESUBTYPE 0x0L";
|
||||
print "BEGIN";
|
||||
print " BLOCK \"StringFileInfo\"";
|
||||
print " BEGIN";
|
||||
print " BLOCK \"040904b0\"";
|
||||
print " BEGIN";
|
||||
print " VALUE \"Comments\", "\
|
||||
"\"Licensed to the Apache Software Foundation (ASF) under one or more " \
|
||||
"contributor license agreements. See the NOTICE file distributed with " \
|
||||
"this work for additional information regarding copyright ownership. " \
|
||||
"The ASF licenses this file to You 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\\r\\n\\r\\n" \
|
||||
"http://www.apache.org/licenses/LICENSE-2.0\\r\\n\\r\\n" \
|
||||
"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.\\0\"";
|
||||
print " VALUE \"CompanyName\", \"Apache Software Foundation\\0\"";
|
||||
print " VALUE \"FileDescription\", \"" desc "\\0\"";
|
||||
print " VALUE \"FileVersion\", \"" ver "\\0\"";
|
||||
print " VALUE \"InternalName\", \"" file "\\0\"";
|
||||
print " VALUE \"LegalCopyright\", \"Copyright " copyright "\\0\"";
|
||||
print " VALUE \"OriginalFilename\", \"" filename "\\0\"";
|
||||
if (vendor) {
|
||||
print " VALUE \"PrivateBuild\", \"" vendor "\\0\"";
|
||||
}
|
||||
if (special) {
|
||||
print " VALUE \"SpecialBuild\", \"" vendor "\\0\"";
|
||||
}
|
||||
print " VALUE \"ProductName\", \"Apache Portable Runtime\\0\"";
|
||||
print " VALUE \"ProductVersion\", \"" ver "\\0\"";
|
||||
print " END";
|
||||
print " END";
|
||||
print " BLOCK \"VarFileInfo\"";
|
||||
print " BEGIN";
|
||||
print " VALUE \"Translation\", 0x409, 1200";
|
||||
print " END";
|
||||
print "END";
|
||||
}
|
||||
Reference in New Issue
Block a user