* Fixed compilation

git-svn-id: trunk@7028 -
This commit is contained in:
michael 2007-03-29 20:42:54 +00:00
parent 027b91a1f7
commit 3c10213ddd
3 changed files with 164 additions and 1015 deletions

View File

@ -1,8 +1,8 @@
#
# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/04]
# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/03/25]
#
default: all
MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
MAKEFILETARGETS=x86_64-linux
BSDs = freebsd netbsd openbsd darwin
UNIXs = linux $(BSDs) solaris qnx
LIMIT83fs = go32v2 os2 emx watcom
@ -230,318 +230,12 @@ ifeq ($(UNITSDIR),)
UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
endif
PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
ifeq ($(FULL_TARGET),i386-linux)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),i386-go32v2)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),i386-win32)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),i386-os2)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),i386-freebsd)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),i386-beos)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),i386-netbsd)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),i386-solaris)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),i386-qnx)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),i386-netware)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),i386-openbsd)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),i386-wdosx)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),i386-darwin)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),i386-emx)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),i386-watcom)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),i386-netwlibc)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),i386-wince)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),i386-embedded)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),i386-symbian)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),m68k-linux)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),m68k-freebsd)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),m68k-netbsd)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),m68k-amiga)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),m68k-atari)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),m68k-openbsd)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),m68k-palmos)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),m68k-embedded)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),powerpc-linux)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),powerpc-netbsd)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),powerpc-amiga)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),powerpc-macos)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),powerpc-darwin)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),powerpc-morphos)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),powerpc-embedded)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),sparc-linux)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),sparc-netbsd)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),sparc-solaris)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),sparc-embedded)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),x86_64-linux)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),x86_64-freebsd)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),x86_64-win64)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),x86_64-embedded)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),arm-linux)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),arm-palmos)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),arm-wince)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),arm-gba)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),arm-nds)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),arm-embedded)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),arm-symbian)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),powerpc64-linux)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),powerpc64-darwin)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),powerpc64-embedded)
override TARGET_PROGRAMS+=mod_example mod_hello mod_spelling testmodule
endif
ifeq ($(FULL_TARGET),i386-linux)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),i386-go32v2)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),i386-win32)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),i386-os2)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),i386-freebsd)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),i386-beos)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),i386-netbsd)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),i386-solaris)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),i386-qnx)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),i386-netware)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),i386-openbsd)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),i386-wdosx)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),i386-darwin)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),i386-emx)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),i386-watcom)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),i386-netwlibc)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),i386-wince)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),i386-embedded)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),i386-symbian)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),m68k-linux)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),m68k-freebsd)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),m68k-netbsd)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),m68k-amiga)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),m68k-atari)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),m68k-openbsd)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),m68k-palmos)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),m68k-embedded)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),powerpc-linux)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),powerpc-netbsd)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),powerpc-amiga)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),powerpc-macos)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),powerpc-darwin)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),powerpc-morphos)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),powerpc-embedded)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),sparc-linux)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),sparc-netbsd)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),sparc-solaris)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),sparc-embedded)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),x86_64-linux)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),x86_64-freebsd)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),x86_64-win64)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),x86_64-embedded)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),arm-linux)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),arm-palmos)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),arm-wince)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),arm-gba)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),arm-nds)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),arm-embedded)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),arm-symbian)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),powerpc64-linux)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),powerpc64-darwin)
override TARGET_UNITS+=minimain
endif
ifeq ($(FULL_TARGET),powerpc64-embedded)
override TARGET_UNITS+=minimain
endif
override INSTALL_FPCPACKAGE=y
ifdef REQUIRE_UNITSDIR
override UNITSDIR+=$(REQUIRE_UNITSDIR)
@ -1321,214 +1015,10 @@ else
TAROPT=vz
TAREXT=.tar.gz
endif
override REQUIRE_PACKAGES=rtl httpd/httpd-2.0
ifeq ($(FULL_TARGET),i386-linux)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),i386-go32v2)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),i386-win32)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),i386-os2)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),i386-freebsd)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),i386-beos)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),i386-netbsd)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),i386-solaris)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),i386-qnx)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),i386-netware)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),i386-openbsd)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),i386-wdosx)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),i386-darwin)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),i386-emx)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),i386-watcom)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),i386-netwlibc)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),i386-wince)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),i386-embedded)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),i386-symbian)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),m68k-linux)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),m68k-freebsd)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),m68k-netbsd)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),m68k-amiga)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),m68k-atari)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),m68k-openbsd)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),m68k-palmos)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),m68k-embedded)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),powerpc-linux)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),powerpc-netbsd)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),powerpc-amiga)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),powerpc-macos)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),powerpc-darwin)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),powerpc-morphos)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),powerpc-embedded)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),sparc-linux)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),sparc-netbsd)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),sparc-solaris)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),sparc-embedded)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
override REQUIRE_PACKAGES=rtl httpd/httpd-2.2
ifeq ($(FULL_TARGET),x86_64-linux)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),x86_64-freebsd)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),x86_64-win64)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),x86_64-embedded)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),arm-linux)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),arm-palmos)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),arm-wince)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),arm-gba)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),arm-nds)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),arm-embedded)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),arm-symbian)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),powerpc64-linux)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),powerpc64-darwin)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
endif
ifeq ($(FULL_TARGET),powerpc64-embedded)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.0=1
REQUIRE_PACKAGES_HTTPD/HTTPD-2.2=1
endif
ifdef REQUIRE_PACKAGES_RTL
PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR))))))
@ -1556,30 +1046,30 @@ ifdef UNITDIR_RTL
override COMPILER_UNITDIR+=$(UNITDIR_RTL)
endif
endif
ifdef REQUIRE_PACKAGES_HTTPD/HTTPD-2.0
PACKAGEDIR_HTTPD/HTTPD-2.0:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /httpd/httpd-2.0/Makefile.fpc,$(PACKAGESDIR))))))
ifneq ($(PACKAGEDIR_HTTPD/HTTPD-2.0),)
ifneq ($(wildcard $(PACKAGEDIR_HTTPD/HTTPD-2.0)/units/$(TARGETSUFFIX)),)
UNITDIR_HTTPD/HTTPD-2.0=$(PACKAGEDIR_HTTPD/HTTPD-2.0)/units/$(TARGETSUFFIX)
ifdef REQUIRE_PACKAGES_HTTPD/HTTPD-2.2
PACKAGEDIR_HTTPD/HTTPD-2.2:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /httpd/httpd-2.2/Makefile.fpc,$(PACKAGESDIR))))))
ifneq ($(PACKAGEDIR_HTTPD/HTTPD-2.2),)
ifneq ($(wildcard $(PACKAGEDIR_HTTPD/HTTPD-2.2)/units/$(TARGETSUFFIX)),)
UNITDIR_HTTPD/HTTPD-2.2=$(PACKAGEDIR_HTTPD/HTTPD-2.2)/units/$(TARGETSUFFIX)
else
UNITDIR_HTTPD/HTTPD-2.0=$(PACKAGEDIR_HTTPD/HTTPD-2.0)
UNITDIR_HTTPD/HTTPD-2.2=$(PACKAGEDIR_HTTPD/HTTPD-2.2)
endif
ifdef CHECKDEPEND
$(PACKAGEDIR_HTTPD/HTTPD-2.0)/$(FPCMADE):
$(MAKE) -C $(PACKAGEDIR_HTTPD/HTTPD-2.0) $(FPCMADE)
override ALLDEPENDENCIES+=$(PACKAGEDIR_HTTPD/HTTPD-2.0)/$(FPCMADE)
$(PACKAGEDIR_HTTPD/HTTPD-2.2)/$(FPCMADE):
$(MAKE) -C $(PACKAGEDIR_HTTPD/HTTPD-2.2) $(FPCMADE)
override ALLDEPENDENCIES+=$(PACKAGEDIR_HTTPD/HTTPD-2.2)/$(FPCMADE)
endif
else
PACKAGEDIR_HTTPD/HTTPD-2.0=
UNITDIR_HTTPD/HTTPD-2.0:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /httpd/httpd-2.0/Package.fpc,$(UNITSDIR)))))
ifneq ($(UNITDIR_HTTPD/HTTPD-2.0),)
UNITDIR_HTTPD/HTTPD-2.0:=$(firstword $(UNITDIR_HTTPD/HTTPD-2.0))
PACKAGEDIR_HTTPD/HTTPD-2.2=
UNITDIR_HTTPD/HTTPD-2.2:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /httpd/httpd-2.2/Package.fpc,$(UNITSDIR)))))
ifneq ($(UNITDIR_HTTPD/HTTPD-2.2),)
UNITDIR_HTTPD/HTTPD-2.2:=$(firstword $(UNITDIR_HTTPD/HTTPD-2.2))
else
UNITDIR_HTTPD/HTTPD-2.0=
UNITDIR_HTTPD/HTTPD-2.2=
endif
endif
ifdef UNITDIR_HTTPD/HTTPD-2.0
override COMPILER_UNITDIR+=$(UNITDIR_HTTPD/HTTPD-2.0)
ifdef UNITDIR_HTTPD/HTTPD-2.2
override COMPILER_UNITDIR+=$(UNITDIR_HTTPD/HTTPD-2.2)
endif
endif
ifndef NOCPUDEF

View File

@ -7,7 +7,7 @@ units=minimain
programs=mod_example mod_hello mod_spelling testmodule
[require]
packages=httpd/httpd-2.0
packages=httpd/httpd-2.2
[install]
fpcpackage=y

View File

@ -1,484 +1,143 @@
<?xml version="1.0"?>
<CONFIG>
<ProjectOptions>
<PathDelim Value="\"/>
<Version Value="5"/>
<General>
<MainUnit Value="0"/>
<TargetFileExt Value=".exe"/>
<ActiveEditorIndexAtStart Value="10"/>
</General>
<VersionInfo>
<UseVersionInfo Value="False"/>
<AutoIncrementBuild Value="False"/>
<CurrentVersionNr Value="0"/>
<CurrentMajorRevNr Value="0"/>
<CurrentMinorRevNr Value="0"/>
<CurrentBuildNr Value="0"/>
<ProjectVersion Value=""/>
<Language Value=""/>
<CharSet Value=""/>
<Comments Value=""/>
<CompanyName Value=""/>
<FileDescription Value=""/>
<InternalName Value=""/>
<LegalCopyright Value=""/>
<LegalTrademarks Value=""/>
<OriginalFilename Value=""/>
<ProductName Value=""/>
</VersionInfo>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local>
</RunParams>
<Units Count="37">
<Unit0>
<Filename Value="mod_hello.lpr"/>
<IsPartOfProject Value="True"/>
<UnitName Value="mod_hello"/>
<CursorPos X="19" Y="8"/>
<TopLine Value="1"/>
<EditorIndex Value="0"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
</Unit0>
<Unit1>
<Filename Value="mod_hello.pp"/>
<UnitName Value="mod_hello"/>
<CursorPos X="7" Y="4"/>
<TopLine Value="1"/>
<UsageCount Value="10"/>
</Unit1>
<Unit2>
<Filename Value="..\httpd-1.3\httpd.pas"/>
<UnitName Value="httpd"/>
<CursorPos X="6" Y="23"/>
<TopLine Value="19"/>
<UsageCount Value="10"/>
</Unit2>
<Unit3>
<Filename Value="define.inc"/>
<CursorPos X="8" Y="16"/>
<TopLine Value="12"/>
<UsageCount Value="10"/>
</Unit3>
<Unit4>
<Filename Value="..\httpd-1.3\ap.inc"/>
<CursorPos X="10" Y="40"/>
<TopLine Value="25"/>
<EditorIndex Value="1"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit4>
<Unit5>
<Filename Value="..\httpd-1.3\ap_alloc.inc"/>
<CursorPos X="9" Y="397"/>
<TopLine Value="382"/>
<EditorIndex Value="2"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit5>
<Unit6>
<Filename Value="..\httpd-1.3\ap_config.inc"/>
<CursorPos X="31" Y="1185"/>
<TopLine Value="1170"/>
<EditorIndex Value="3"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit6>
<Unit7>
<Filename Value="..\httpd-1.3\ap_mmn.inc"/>
<CursorPos X="54" Y="95"/>
<TopLine Value="80"/>
<EditorIndex Value="4"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit7>
<Unit8>
<Filename Value="..\httpd-1.3\buff.inc"/>
<CursorPos X="21" Y="227"/>
<TopLine Value="204"/>
<EditorIndex Value="5"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit8>
<Unit9>
<Filename Value="..\httpd-1.3\hsregex.inc"/>
<CursorPos X="8" Y="8"/>
<TopLine Value="1"/>
<EditorIndex Value="6"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit9>
<Unit10>
<Filename Value="..\httpd-1.3\httpd.inc"/>
<CursorPos X="16" Y="1132"/>
<TopLine Value="1117"/>
<EditorIndex Value="7"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit10>
<Unit11>
<Filename Value="..\httpd-1.3\http_core.inc"/>
<CursorPos X="16" Y="330"/>
<TopLine Value="315"/>
<EditorIndex Value="8"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit11>
<Unit12>
<Filename Value="..\httpd-1.3\http_log.inc"/>
<CursorPos X="9" Y="50"/>
<TopLine Value="35"/>
<EditorIndex Value="9"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit12>
<Unit13>
<Filename Value="..\httpd-1.3\readdir.inc"/>
<CursorPos X="18" Y="41"/>
<TopLine Value="28"/>
<EditorIndex Value="10"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit13>
<Unit14>
<Filename Value="..\httpd-1.3\win32_os.inc"/>
<CursorPos X="15" Y="44"/>
<TopLine Value="20"/>
<EditorIndex Value="11"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit14>
<Unit15>
<Filename Value="..\httpd-2.0\httpd.pas"/>
<UnitName Value="httpd"/>
<CursorPos X="9" Y="34"/>
<TopLine Value="19"/>
<EditorIndex Value="12"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit15>
<Unit16>
<Filename Value="..\httpd-2.0\ap_config.inc"/>
<CursorPos X="14" Y="227"/>
<TopLine Value="212"/>
<EditorIndex Value="13"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit16>
<Unit17>
<Filename Value="..\httpd-2.0\ap_mmn.inc"/>
<CursorPos X="60" Y="80"/>
<TopLine Value="65"/>
<EditorIndex Value="14"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit17>
<Unit18>
<Filename Value="..\httpd-2.0\httpd.inc"/>
<CursorPos X="58" Y="1457"/>
<TopLine Value="1442"/>
<EditorIndex Value="15"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit18>
<Unit19>
<Filename Value="..\httpd-2.0\apr\apr.pas"/>
<UnitName Value="apr"/>
<CursorPos X="9" Y="36"/>
<TopLine Value="21"/>
<EditorIndex Value="16"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit19>
<Unit20>
<Filename Value="..\httpd-2.0\apr\apr_errno.inc"/>
<CursorPos X="9" Y="274"/>
<TopLine Value="259"/>
<EditorIndex Value="17"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit20>
<Unit21>
<Filename Value="..\httpd-2.0\apr\apr_user.inc"/>
<CursorPos X="9" Y="186"/>
<TopLine Value="167"/>
<EditorIndex Value="18"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit21>
<Unit22>
<Filename Value="..\httpd-2.0\apr\apr_thread_proc.inc"/>
<CursorPos X="21" Y="134"/>
<TopLine Value="119"/>
<EditorIndex Value="19"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit22>
<Unit23>
<Filename Value="..\httpd-2.0\apr\apr_general.inc"/>
<CursorPos X="59" Y="167"/>
<TopLine Value="152"/>
<EditorIndex Value="20"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit23>
<Unit24>
<Filename Value="..\httpd-2.0\apr\apr_file_info.inc"/>
<CursorPos X="72" Y="325"/>
<TopLine Value="310"/>
<EditorIndex Value="21"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit24>
<Unit25>
<Filename Value="..\httpd-2.0\apriconv\apriconv.pas"/>
<UnitName Value="apriconv"/>
<CursorPos X="9" Y="36"/>
<TopLine Value="21"/>
<EditorIndex Value="22"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit25>
<Unit26>
<Filename Value="..\httpd-2.0\apriconv\apr_iconv.inc"/>
<CursorPos X="16" Y="49"/>
<TopLine Value="34"/>
<EditorIndex Value="23"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit26>
<Unit27>
<Filename Value="..\httpd-2.0\aprutil\aprutil.pas"/>
<UnitName Value="aprutil"/>
<CursorPos X="9" Y="36"/>
<TopLine Value="21"/>
<EditorIndex Value="24"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit27>
<Unit28>
<Filename Value="..\httpd-2.2\httpd.pas"/>
<UnitName Value="httpd"/>
<CursorPos X="9" Y="34"/>
<TopLine Value="19"/>
<EditorIndex Value="25"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit28>
<Unit29>
<Filename Value="..\httpd-2.2\ap_config.inc"/>
<CursorPos X="14" Y="227"/>
<TopLine Value="212"/>
<EditorIndex Value="26"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit29>
<Unit30>
<Filename Value="..\httpd-2.2\apr\apr_file_info.inc"/>
<CursorPos X="14" Y="122"/>
<TopLine Value="107"/>
<EditorIndex Value="27"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit30>
<Unit31>
<Filename Value="..\httpd-2.2\apr\apr_user.inc"/>
<CursorPos X="16" Y="154"/>
<TopLine Value="131"/>
<EditorIndex Value="29"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit31>
<Unit32>
<Filename Value="..\httpd-2.2\apriconv\apriconv.pas"/>
<UnitName Value="apriconv"/>
<CursorPos X="9" Y="36"/>
<TopLine Value="21"/>
<EditorIndex Value="30"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit32>
<Unit33>
<Filename Value="..\httpd-2.2\aprutil\aprutil.pas"/>
<UnitName Value="aprutil"/>
<CursorPos X="9" Y="36"/>
<TopLine Value="21"/>
<EditorIndex Value="31"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit33>
<Unit34>
<Filename Value="..\httpd-2.2\apriconv\apr_iconv.inc"/>
<CursorPos X="16" Y="49"/>
<TopLine Value="34"/>
<EditorIndex Value="32"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit34>
<Unit35>
<Filename Value="..\httpd-2.2\apr\apr_thread_proc.inc"/>
<CursorPos X="21" Y="134"/>
<TopLine Value="119"/>
<EditorIndex Value="33"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit35>
<Unit36>
<Filename Value="..\httpd-2.2\apr\apr.pas"/>
<UnitName Value="apr"/>
<CursorPos X="9" Y="36"/>
<TopLine Value="21"/>
<EditorIndex Value="28"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit36>
</Units>
<JumpHistory Count="30" HistoryIndex="29">
<Position1>
<Filename Value="..\httpd-2.0\apr\apr_thread_proc.inc"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position1>
<Position2>
<Filename Value="..\httpd-2.0\apr\apr_general.inc"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position2>
<Position3>
<Filename Value="..\httpd-2.0\apr\apr_file_info.inc"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position3>
<Position4>
<Filename Value="..\httpd-2.0\apriconv\apriconv.pas"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position4>
<Position5>
<Filename Value="..\httpd-2.0\apriconv\apr_iconv.inc"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position5>
<Position6>
<Filename Value="..\httpd-2.0\aprutil\aprutil.pas"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position6>
<Position7>
<Filename Value="..\httpd-2.0\aprutil\aprutil.pas"/>
<Caret Line="36" Column="9" TopLine="21"/>
</Position7>
<Position8>
<Filename Value="..\httpd-2.2\httpd.pas"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position8>
<Position9>
<Filename Value="..\httpd-2.2\ap_config.inc"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position9>
<Position10>
<Filename Value="..\httpd-2.2\ap_config.inc"/>
<Caret Line="54" Column="16" TopLine="39"/>
</Position10>
<Position11>
<Filename Value="..\httpd-2.2\ap_config.inc"/>
<Caret Line="101" Column="14" TopLine="86"/>
</Position11>
<Position12>
<Filename Value="..\httpd-2.2\ap_config.inc"/>
<Caret Line="111" Column="14" TopLine="96"/>
</Position12>
<Position13>
<Filename Value="..\httpd-2.2\apr\apr_file_info.inc"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position13>
<Position14>
<Filename Value="..\httpd-2.2\apr\apr_user.inc"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position14>
<Position15>
<Filename Value="..\httpd-2.2\apr\apr_user.inc"/>
<Caret Line="46" Column="16" TopLine="53"/>
</Position15>
<Position16>
<Filename Value="..\httpd-2.2\apr\apr_user.inc"/>
<Caret Line="115" Column="16" TopLine="112"/>
</Position16>
<Position17>
<Filename Value="..\httpd-2.2\apriconv\apriconv.pas"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position17>
<Position18>
<Filename Value="..\httpd-2.2\aprutil\aprutil.pas"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position18>
<Position19>
<Filename Value="..\httpd-2.2\apriconv\apr_iconv.inc"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position19>
<Position20>
<Filename Value="..\httpd-2.2\apr\apr_thread_proc.inc"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position20>
<Position21>
<Filename Value="..\httpd-2.2\apr\apr_file_info.inc"/>
<Caret Line="122" Column="21" TopLine="107"/>
</Position21>
<Position22>
<Filename Value="..\httpd-2.2\apr\apr.pas"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position22>
<Position23>
<Filename Value="..\httpd-2.2\httpd.pas"/>
<Caret Line="34" Column="9" TopLine="19"/>
</Position23>
<Position24>
<Filename Value="..\httpd-2.0\aprutil\aprutil.pas"/>
<Caret Line="36" Column="9" TopLine="21"/>
</Position24>
<Position25>
<Filename Value="..\httpd-2.0\apriconv\apriconv.pas"/>
<Caret Line="36" Column="9" TopLine="21"/>
</Position25>
<Position26>
<Filename Value="..\httpd-2.0\apr\apr_user.inc"/>
<Caret Line="186" Column="16" TopLine="167"/>
</Position26>
<Position27>
<Filename Value="..\httpd-2.0\apr\apr.pas"/>
<Caret Line="36" Column="9" TopLine="21"/>
</Position27>
<Position28>
<Filename Value="..\httpd-2.0\httpd.pas"/>
<Caret Line="34" Column="9" TopLine="19"/>
</Position28>
<Position29>
<Filename Value="..\httpd-1.3\win32_os.inc"/>
<Caret Line="190" Column="19" TopLine="161"/>
</Position29>
<Position30>
<Filename Value="..\httpd-1.3\readdir.inc"/>
<Caret Line="72" Column="19" TopLine="43"/>
</Position30>
</JumpHistory>
</ProjectOptions>
<CompilerOptions>
<Version Value="5"/>
<PathDelim Value="\"/>
<CodeGeneration>
<Generate Value="Faster"/>
</CodeGeneration>
<Linking>
<Options>
<ExecutableType Value="Library"/>
</Options>
</Linking>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
</CONFIG>
{*******************************************************************
* Test library of the Apache Pascal Headers
*******************************************************************}
library mod_hello;
{*******************************************************************
* The mode must be objfpc on this unit because the unix code uses
* some extensions introduced on Free Pascal
*******************************************************************}
{$ifdef fpc}
{$mode objfpc}{$H+}
{$endif}
{$IFDEF WIN32}
{$DEFINE WINDOWS}
{$ENDIF}
{$define Apache2_2}
uses SysUtils, httpd {$ifndef Apache1_3}, apr{$endif};
var
test_module: module; public name 'hello_module';
default_module_ptr: Pmodule;
const
MODULE_NAME = 'mod_hello.so';
{*******************************************************************
* Free Pascal only supports exporting variables on Windows
*******************************************************************}
{$ifdef WINDOWS}
exports
test_module name 'test_module';
{$endif}
{*******************************************************************
* Handles apache requests
*******************************************************************}
function DefaultHandler(r: Prequest_rec): Integer; cdecl;
var
RequestedHandler: string;
begin
RequestedHandler := r^.handler;
{ We decline to handle a request if hello-handler is not the value of r->handler }
if not SameText(RequestedHandler, 'testapache-handler') then
begin
Result := DECLINED;
Exit;
end;
{ The following line just prints a message to the errorlog }
ap_log_error(MODULE_NAME, 54, APLOG_NOERRNO or APLOG_NOTICE,
{$ifndef Apache1_3}0,{$endif} r^.server,
'mod_hello: %s', [PChar('Before content is output')]);
{ We set the content type before doing anything else }
{$ifdef Apache1_3}
r^.content_type := 'text/html';
// ap_send_http_header(r);
{$else}
ap_set_content_type(r, 'text/html');
{$endif}
{ If the request is for a header only, and not a request for
the whole content, then return OK now. We don't have to do
anything else. }
if (r^.header_only <> 0) then
begin
Result := OK;
Exit;
end;
{ Now we just print the contents of the document using the
ap_rputs and ap_rprintf functions. More information about
the use of these can be found in http_protocol.inc }
ap_rputs('<HTML>' + LineEnding, r);
ap_rputs('<HEAD>' + LineEnding, r);
ap_rputs('<TITLE>Hello There</TITLE>' + LineEnding, r);
ap_rputs('</HEAD>' + LineEnding, r);
ap_rputs('<BODY BGCOLOR="#FFFFFF">' + LineEnding ,r);
ap_rputs('<H1>Hello world</H1>' + LineEnding, r);
ap_rputs('This is the first Apache Module working with the new binding from Free Pascal' + LineEnding, r);
// ap_rprintf(r, '<br>A sample line generated by ap_rprintf<br>' + LineEnding, []);
ap_rputs('</BODY></HTML>' + LineEnding, r);
{ We can either return OK or DECLINED at this point. If we return
* OK, then no other modules will attempt to process this request }
Result := OK;
end;
{*******************************************************************
* Registers the hooks
*******************************************************************}
{$ifdef apache1_3}
procedure hw_init(s: PServer_rec; p: PPool); cdecl;
begin
end;
var
hw_handlers: array[0..0] of handler_rec =
(
(content_type: 'hw_app'; handler: @DefaultHandler)
);
{$else}
procedure RegisterHooks(p: Papr_pool_t); cdecl;
begin
ap_hook_handler(@DefaultHandler, nil, nil, APR_HOOK_MIDDLE);
end;
{$endif}
{*******************************************************************
* Library initialization code
*******************************************************************}
begin
default_module_ptr := @test_module;
FillChar(default_module_ptr^, SizeOf(default_module_ptr^), 0);
{$ifdef apache1_3}
STANDARD_MODULE_STUFF(test_module);
with test_module do
begin
name := MODULE_NAME;
init := @hw_init;
handlers := hw_handlers;
end;
{$else}
STANDARD20_MODULE_STUFF(test_module);
with test_module do
begin
name := MODULE_NAME;
register_hooks := @RegisterHooks;
end;
{$endif}
end.