Commits

Anonymous committed 696a436

- mv cmake, netware, vms and windows build script to root dir

  • Participants
  • Parent commits 56e9d05

Comments (0)

Files changed (45)

File CMakeLists.txt

+CMAKE_MINIMUM_REQUIRED(VERSION 2.4.3 FATAL_ERROR)
+PROJECT(GD)
+
+SET(CMAKE_MODULE_PATH "${GD_SOURCE_DIR}/cmake/modules")
+
+if (BUILD_TEST)
+	ENABLE_TESTING()
+endif(BUILD_TEST)
+
+if (USE_EXT_GD)
+	message("Using GD at: ${USE_EXT_GD}")
+	INCLUDE_DIRECTORIES(BEFORE ${GD_INCLUDE_DIR})
+	FIND_PACKAGE(GD)
+	if (GD_FOUND)
+		INCLUDE_DIRECTORIES(BEFORE ${GD_INCLUDE_DIR})
+		LINK_DIRECTORIES(BEFORE ${GD_LIBRARIES})
+		SET(GD_LIB ${GD_LIBRARIES})
+		SET(GD_LIBS_DIR ${GD_LIBRARY})
+
+		message("GD libs #: ${GD_LIBRARIES}")
+		message("GD lib #: ${GD_LIBRARY}")
+		message("GD include: ${GD_INCLUDE_DIR}")
+	else (GD_FOUND)
+		message("No gd found")
+	endif (GD_FOUND)
+else (USE_EXT_GD)
+	SET(GD_VERSION_MAJOR "2")
+	SET(GD_VERSION_MINOR "1")
+	SET(GD_VERSION_PATCH "0")
+	SET(GD_VERSION "${GD_VERSION_MAJOR}.${GD_VERSION_MINOR}.${GD_VERSION_PATCH}")
+	SET(GD_VERSION_STRING "${GD_VERSION}")
+
+	SET(GD_VERSION_INT "20234")
+
+	SET(PACKAGE GD)
+	SET(PACKAGE_NAME GD)
+
+	SET(CMAKE_REQUIRED_INCLUDES "/usr/include" "/usr/local/include")
+
+	message(STATUS "ft2build: ${CMAKE_REQUIRED_INCLUDES}")
+
+	include(CheckIncludeFiles)
+	include(CheckIncludeFile)
+
+	include(AC_HEADER_STDC)
+	include(CheckPrototypeExists)
+	SET(FONTCONFIG_FIND_QUIETLY, 1)
+
+	FIND_PACKAGE(PNG REQUIRED)
+	FIND_PACKAGE(ZLIB)
+	FIND_PACKAGE(JPEG)
+IF (NOT WIN32)
+	FIND_PACKAGE(PTHREAD)
+ENDIF (NOT WIN32)
+	FIND_PACKAGE(Freetype)
+	FIND_PACKAGE(XPM)
+	FIND_PACKAGE(Fontconfig)
+
+	if (FREETYPE_FOUND)
+		INCLUDE_DIRECTORIES(${FREETYPE_INCLUDE_DIR})
+		SET(HAVE_FT2BUILD_H 1)
+		SET(HAVE_LIBFREETYPE 1)
+	ENDIF(FREETYPE_FOUND)
+
+	IF(ZLIB_FOUND)
+		INCLUDE_DIRECTORIES(${PNG_INCLUDE_DIR})
+		SET(HAVE_LIBZ 1)
+		SET(HAVE_LIBPNG_PNG_H 1)
+	ENDIF(ZLIB_FOUND)
+
+	IF(PNG_FOUND)
+		INCLUDE_DIRECTORIES(${PNG_INCLUDE_DIR})
+		SET(HAVE_LIBPNG 1)
+	ENDIF(PNG_FOUND)
+
+	IF(XPM_FOUND)
+		INCLUDE_DIRECTORIES(${XPM_INCLUDE_DIR})
+		SET(HAVE_LIBXPM 1)
+	ENDIF(XPM_FOUND)
+
+	IF(JPEG_FOUND)
+		INCLUDE_DIRECTORIES(${PNG_INCLUDE_DIR})
+		SET(HAVE_LIBJPEG 1)
+	ENDIF(JPEG_FOUND)
+
+	IF(FONTCONFIG_FOUND)
+		INCLUDE_DIRECTORIES(${FONTCONFIG_INCLUDE_DIR})
+		SET(HAVE_LIBFONTCONFIG 1)
+	ELSE (FONTCONFIG_FOUND)
+		SET(FONTCONFIG_LIBRARIES "")
+	ENDIF(FONTCONFIG_FOUND)
+
+	SET(HAVE_CONFIG_H 1)
+
+	ADD_DEFINITIONS(-DHAVE_CONFIG_H)
+
+	INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/  ${GD_SOURCE_DIR})
+	
+	CONFIGURE_FILE(${GD_SOURCE_DIR}/config.h.cmake ${CMAKE_BINARY_DIR}/config.h ESCAPE_QUOTES)
+
+	SET (LIBGD_SRC_FILES
+		gd.c
+		gdfx.c
+		gd_security.c
+		gd_gd.c
+		gd_gd2.c
+		gd_io.c
+		gd_io_dp.c
+		gd_gif_in.c
+		gd_gif_out.c
+		gd_io_file.c
+		gd_io_ss.c
+		gd_jpeg.c
+		gd_png.c
+		gd_ss.c
+		gd_topal.c
+		gd_wbmp.c
+		gdcache.c
+		gdfontg.c
+		gdfontl.c
+		gdfontmb.c
+		gdfonts.c
+		gdfontt.c
+		gdft.c
+		gdhelpers.c
+		gdhelpers.h
+		gdkanji.c
+		gdtables.c
+		gdxpm.c
+		jisx0208.h
+		wbmp.c
+		wbmp.h
+	)
+
+	set(BUILD_SHARED_LIBS On)
+
+	if (WIN32)
+		SET(GD_LIB bgd)
+		ADD_DEFINITIONS( -DWIN32 -D_WIN32 -DMSWIN32 -DBGDWIN32)
+	else(WIN32)
+		SET(GD_LIB gd)
+	endif(WIN32)
+
+	add_library(${GD_LIB} ${LIBGD_SRC_FILES})
+
+	if (WIN32)
+		SET_TARGET_PROPERTIES(${GD_LIB} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:msvcrt.lib")
+	ENDIF(WIN32)
+
+	target_link_libraries(${GD_LIB} ${FREETYPE_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES} ${XPM_LIBRARIES} ${FONTCONFIG_LIBRARIES})
+
+endif (USE_EXT_GD)
+
+add_subdirectory(tests)

File VMS/CONFIGURE.COM

+$! (c) Alexey Chupahin  18-APR-2006
+$! GNU
+$!
+$!
+$DEF SYS$ERROR _NL0:
+$ SET NOON
+$WRITE SYS$OUTPUT " "
+$WRITE SYS$OUTPUT "Configuring GD library for OpenVMS"
+$WRITE SYS$OUTPUT "(c) Alexey Chupahin "
+$! Checking architecture
+$! Checking architecture
+$    IF F$GETSYI("ARCH_TYPE").EQ.1 THEN CPU = "VAX"
+$    IF F$GETSYI("ARCH_TYPE").EQ.2 THEN CPU = "Alpha"
+$    IF F$GETSYI("ARCH_TYPE").EQ.3 THEN CPU = "I64"
+$WRITE SYS$OUTPUT "Checking architecture   ...  ", CPU
+$SHARED=0
+$IF ( (CPU.EQS."Alpha").OR.(CPU.EQS."I64") )
+$  THEN
+$       SHARED=64
+$  ELSE
+$       SHARED=32
+$ENDIF
+$DECC = F$SEARCH("SYS$SYSTEM:DECC$COMPILER.EXE") .NES. ""
+$IF (DECC) THEN $WRITE SYS$OUTPUT  "Compiler		...  DEC C"
+$IF (.NOT. DECC) THEN $WRITE SYS$OUTPUT  "BAD compiler" GOTO EXIT
+$MMS = F$SEARCH("SYS$SYSTEM:MMS.EXE") .NES. ""
+$MMK = F$TYPE(MMK) 
+$IF (MMS .OR. MMK) THEN GOTO TEST_LIBRARIES
+$! I cant find any make tool
+$GOTO EXIT
+$!
+$!
+$TEST_LIBRARIES:
+$!   Setting as MAKE utility one of MMS or MMK. I prefer MMS.
+$IF (MMK) THEN MAKE="MMK/IGN=WAR"
+$IF (MMS) THEN MAKE="MMS/IGN=WAR"
+$WRITE SYS$OUTPUT "Checking build utility	...  ''MAKE'"
+$WRITE SYS$OUTPUT " "
+$!
+$IF (P1.EQS."STATIC") .OR. (P1.EQS."static")
+$ THEN
+$       WRITE SYS$OUTPUT "Configuring for static only"
+$       SHARED=0
+$ENDIF
+$!
+$! Is it package root directory? If no, go to [-]
+$ IF (F$SEARCH("[]VMS.DIR").EQS."") .AND. (F$SEARCH("[]vms.dir").EQS."")
+$  THEN
+$	SET DEF [-]
+$ ENDIF
+$!
+$!Checking for iconv
+$!
+$ DEFINE SYS$OUTPUT _NLA0:
+$ CC/OBJECT=TEST.OBJ SYS$INPUT
+      #include <iconv.h>
+   int main()
+     {
+        iconv_t cd;
+	cd = iconv_open ((const char *)0, (const char *)0);
+     }
+$TMP = $STATUS
+$DEAS  SYS$OUTPUT
+$IF (TMP .NE. %X10B90001)
+$  THEN
+$       HAVE_ICONV=0
+$ENDIF
+$DEFINE SYS$OUTPUT _NLA0:
+$LINK/EXE=TEST TEST
+$TMP = $STATUS
+$!WRITE SYS$OUTPUT TMP
+$IF (TMP .NE. %X10000001)
+$  THEN
+$       HAVE_ICONV=0
+$  ELSE
+$       HAVE_ICONV=1
+$ENDIF
+$DEAS  SYS$OUTPUT
+$IF (HAVE_ICONV.EQ.1)
+$  THEN
+$       WRITE SYS$OUTPUT "Checking for system iconv library...   Yes"
+$  ELSE
+$       WRITE SYS$OUTPUT "Checking for system iconv library...   No"
+$ENDIF
+$!
+$!"Checking for correct zlib library    "
+$ ZLIB_STATIC=0
+$ DEFINE SYS$OUTPUT _NLA0:
+$ CC/OBJECT=TEST.OBJ/INCLUDE=(ZLIB) SYS$INPUT
+      #include <stdlib.h>
+      #include <stdio.h>
+      #include <zlib.h>
+   int main()
+     {
+        printf("checking version zlib:  %s\n",zlibVersion());
+     }
+$TMP = $STATUS
+$DEAS  SYS$OUTPUT
+$IF (TMP .NE. %X10B90001)
+$  THEN
+$       HAVE_ZLIB=0
+$       GOTO EXIT
+$ENDIF
+$DEFINE SYS$OUTPUT _NLA0:
+$!Testing for shared ZLIB
+$COPY SYS$INPUT OPT.OPT
+SYS$SHARE:LIBZSHR/SHARE
+$LINK/EXE=TEST TEST,OPT/OPT
+$TMP = $STATUS
+$DEL OPT.OPT;*
+$!WRITE SYS$OUTPUT TMP
+$IF (TMP .NE. %X10000001)
+$  THEN
+$	LINK/EXE=TEST TEST,ZLIB:LIBZ/LIB
+$	TMP = $STATUS
+$	IF (TMP .NE. %X10000001)
+$	  THEN
+$       	HAVE_ZLIB=0
+$	  ELSE
+$		HAVE_ZLIB=1
+$		ZLIB_STATIC=1
+$	ENDIF
+$  ELSE
+$       HAVE_ZLIB=1
+$ENDIF
+$DEAS  SYS$OUTPUT
+$IF (HAVE_ZLIB.EQ.1)
+$  THEN
+$       WRITE SYS$OUTPUT "Checking for correct zlib library ...   Yes"
+$  ELSE
+$       WRITE SYS$OUTPUT "Checking for correct zlib library ...   No"
+$       WRITE SYS$OUTPUT "This is fatal. Please download and install good library from fafner.dyndns.org/~alexey/libsdl/public.html"
+$	GOTO EXIT
+$ENDIF
+$RUN TEST
+$!
+$!
+$FREETYPE_STATIC=0
+$!"Checking for correct Freetype2 library"
+$ DEFINE SYS$OUTPUT _NLA0:
+$ CC/OBJECT=TEST.OBJ/INCLUDE=(FREETYPE2) SYS$INPUT
+#include <ft2build.h>
+#include <freetype/freetype.h>
+int main(int argc, char *argv[])
+{
+
+#if FREETYPE_MAJOR == 2 && FREETYPE_MINOR <= 1 
+        printf("This version is too old. Please get newest\n");
+        printf("From fafner.dyndns.org/~alexey/libsdl/required.html\n");
+	exit(2);
+#endif
+        printf("checking version FreeType  : %d.%d.%d\n",
+                        FREETYPE_MAJOR,
+                        FREETYPE_MINOR,
+                        FREETYPE_PATCH);
+        return(0);
+}
+$TMP = $STATUS
+$DEAS  SYS$OUTPUT
+$IF (TMP .NE. %X10B90001)
+$  THEN
+$       HAVE_FREETYPE=0
+$       GOTO NEXT0
+$ENDIF
+$DEAS  SYS$OUTPUT
+$DEFINE SYS$OUTPUT _NLA0:
+$LINK/EXE=TEST TEST,FREETYPE2:FREETYPE/OPT
+$TMP = $STATUS
+$IF (TMP .NE. %X10000001)
+$  THEN
+$	LINK/EXE=TEST TEST,FREETYPE2:FREETYPE/LIB,ZLIB:LIBZ/LIB
+$	TMP = $STATUS
+$	IF (TMP .NE. %X10000001)
+$  	  THEN
+$		TMP = $STATUS
+$       	HAVE_FREETYPE=0
+$       	GOTO NEXT0
+$	  ELSE
+$		FREETYPE_STATIC=1
+$	ENDIF
+$ENDIF
+$!
+$RUN TEST
+$IF ($STATUS .NE. %X00000001)
+$  THEN
+$       HAVE_FREETYPE=0
+$	GOTO NEXT0
+$  ELSE
+$        HAVE_FREETYPE=1
+$ENDIF
+$NEXT0:
+$DEAS  SYS$OUTPUT
+$IF (HAVE_FREETYPE.EQ.1)
+$  THEN
+$       WRITE SYS$OUTPUT "Checking for correct FreeType  ...   Yes"
+$	RUN TEST
+$  ELSE
+$       WRITE SYS$OUTPUT "Checking for correct FreeType  ...   No"
+$	WRITE SYS$OUTPUT "This is required library "
+$	WRITE SYS$OUTPUT "install it first from fafner.dyndns.org/~alexey/libsdl/required.html"
+$	GOTO EXIT
+$ENDIF
+$!
+$!
+$HAVE_LIBTIFF=0
+$!"Checking for libPNG "
+$ DEFINE SYS$OUTPUT _NLA0:
+$ CC/OBJECT=TEST.OBJ/INCLUDE=(PNG,ZLIB) SYS$INPUT
+	#include <stdlib.h>
+        #include  <png.h>
+        int main()
+        {
+	 png_uint_32 n,n1,n2,n3;
+	 n=png_access_version_number();
+	 n3=n%100; n=n/100;
+	 n2=n%100; n=n/100;
+	 n1=n%100; 
+	if ( (n1<=1)&&(n2<2) ) 
+		{ printf("checking version  libPNG:  %d.%d.%d\n",n1,n2,n3);
+		  printf("This version is too old. Please get newest\n");
+		  printf("From fafner.dyndns.org/~alexey/libsdl/public.html\n");
+		  exit(2);
+		}
+	printf("checking version  libPNG:  %d.%d.%d\n",n1,n2,n3);
+        }
+$!
+$TMP = $STATUS
+$DEAS  SYS$OUTPUT
+$IF (TMP .NE. %X10B90001)
+$  THEN
+$       HAVE_LIBPNG=0
+$       GOTO NEXT2
+$ENDIF
+$DEFINE SYS$OUTPUT _NLA0:
+$LINK/EXE=TEST TEST,PNG:LIBPNG$SHR/OPT,ZLIB:LIBZ/LIB
+$TMP = $STATUS
+$!WRITE SYS$OUTPUT TMP
+$IF (TMP .NE. %X10000001)
+$  THEN
+$!	Trying for static libpng
+$	LINK/EXE=TEST TEST,PNG:LIBPNG/LIB,ZLIB:LIBZ/LIB
+$	TMP = $STATUS
+$	IF (TMP .NE. %X10000001)
+$	 THEN
+$		LIBPNG_STATIC=0
+$       	HAVE_LIBPNG=0
+$       	GOTO NEXT2
+$	 ELSE
+$		HAVE_LIBPNG=1 
+$		LIBPNG_STATIC=1
+$       ENDIF
+$  ELSE
+$        HAVE_LIBPNG=1
+$      	 LIBPNG_STATIC=0
+$ENDIF
+$!
+$RUN TEST
+$IF ($STATUS .NE. %X00000001)
+$  THEN
+$	HAVE_LIBPNG=0
+$  ELSE
+$	 HAVE_LIBPNG=1
+$ENDIF
+$NEXT2:
+$DEAS  SYS$OUTPUT
+$IF (HAVE_LIBPNG.EQ.1)
+$  THEN
+$       WRITE SYS$OUTPUT "Checking for correct  libPNG ...   Yes"
+$	RUN TEST
+$  ELSE
+$       WRITE SYS$OUTPUT "Checking for correct  libPNG ...   No"
+$       WRITE SYS$OUTPUT "This is fatal. Please download and install good library from fafner.dyndns.org/~alexey/libsdl/public.html"
+$	GOTO EXIT
+$ENDIF
+$!
+$!
+$!
+$! Checking for JPEG ...
+$ DEFINE SYS$OUTPUT _NLA0:
+$ CC/OBJECT=TEST.OBJ/INCLUDE=(JPEG) SYS$INPUT
+      #include <stdlib.h>
+      #include <stdio.h>
+      #include <jpeglib.h>
+      #include <jversion.h>	
+   int main()
+     {
+	printf("checking version jpeg:  %s\n",JVERSION);
+	jpeg_quality_scaling(0);
+        return 0;
+     }
+$TMP = $STATUS
+$DEAS  SYS$OUTPUT
+$!WRITE SYS$OUTPUT TMP
+$IF (TMP .NE. %X10B90001)
+$  THEN
+$	HAVE_JPEG=0
+$       GOTO EXIT
+$ENDIF
+$DEFINE SYS$OUTPUT _NLA0:
+$LINK/EXE=TEST TEST,JPEG:LIBJPEG$SHR/OPT
+$TMP = $STATUS
+$DEAS  SYS$OUTPUT
+$!WRITE SYS$OUTPUT TMP
+$IF (TMP .NE. %X10000001)
+$  THEN
+$	LINK/EXE=TEST TEST,JPEG:LIBJPEG/OPT
+$	TMP = $STATUS
+$	IF (TMP .NE. %X10000001)
+$	  THEN
+$		HAVE_JPEG=0
+$		JPEG_STATIC=0
+$		GOTO EXIT
+$	  ELSE
+$		HAVE_JPEG=1
+$		JPEG_STATIC=1
+$	ENDIF
+$  ELSE
+$	HAVE_JPEG=1
+$	JPEG_STATIC=0
+$ENDIF
+$!
+$IF (HAVE_JPEG.EQ.1)
+$  THEN
+$       WRITE SYS$OUTPUT "Checking for correct jpeg library ...   Yes"
+$  ELSE
+$       WRITE SYS$OUTPUT "Checking for correct jpeg library ...   No"
+$       WRITE SYS$OUTPUT "This is fatal. Please download and install good library from fafner.dyndns.org/~alexey/libsdl/public.html"
+$       GOTO EXIT
+$ENDIF
+$RUN TEST
+$!
+$!
+$!WRITING BUILD FILES
+$!
+$IF (SHARED.EQ.64)
+$ THEN
+$	COPY SYS$INPUT LIBGD$DEF.OPT
+SYMBOL_VECTOR= (-
+gdAlphaBlend=PROCEDURE,-
+gdImageCreate=PROCEDURE,-
+gdImageCreateTrueColor=PROCEDURE,-
+gdImageCreateFromPng=PROCEDURE,-
+gdImageCreateFromPngCtx=PROCEDURE,-
+gdImageCreateFromPngPtr=PROCEDURE,-
+gdImageCreateFromGif=PROCEDURE,-
+gdImageCreateFromGifCtx=PROCEDURE,-
+gdImageCreateFromGifPtr=PROCEDURE,-
+gdImageCreateFromWBMP=PROCEDURE,-
+gdImageCreateFromWBMPCtx=PROCEDURE,-
+gdImageCreateFromWBMPPtr=PROCEDURE,-
+gdImageCreateFromJpeg=PROCEDURE,-
+gdImageCreateFromJpegCtx=PROCEDURE,-
+gdImageCreateFromJpegPtr=PROCEDURE,-
+gdImageCreateFromPngSource=PROCEDURE,-
+gdImageCreateFromGd=PROCEDURE,-
+gdImageCreateFromGdCtx=PROCEDURE,-
+gdImageCreateFromGdPtr=PROCEDURE,-
+gdImageCreateFromGd2=PROCEDURE,-
+gdImageCreateFromGd2Ctx=PROCEDURE,-
+gdImageCreateFromGd2Ptr=PROCEDURE,-
+gdImageCreateFromGd2Part=PROCEDURE,-
+gdImageCreateFromGd2PartCtx=PROCEDURE,-
+gdImageCreateFromGd2PartPtr=PROCEDURE,-
+gdImageCreateFromXbm=PROCEDURE,-
+gdImageCreateFromXpm=PROCEDURE,-
+gdImageStringFTCircle=PROCEDURE,-
+gdImageDestroy=PROCEDURE,-
+gdImageSetPixel=PROCEDURE,-
+gdImageGetPixel=PROCEDURE,-
+gdImageGetTrueColorPixel=PROCEDURE,-
+gdImageAABlend=PROCEDURE,-
+gdImageLine=PROCEDURE,-
+gdImageDashedLine=PROCEDURE,-
+gdImageRectangle=PROCEDURE,-
+gdImageFilledRectangle=PROCEDURE,-
+gdImageSetClip=PROCEDURE,-
+gdImageGetClip=PROCEDURE,-
+gdImageBoundsSafe=PROCEDURE,-
+gdImageChar=PROCEDURE,-
+gdImageCharUp=PROCEDURE,-
+gdImageString=PROCEDURE,-
+gdImageStringUp=PROCEDURE,-
+gdImageString16=PROCEDURE,-
+gdImageStringUp16=PROCEDURE,-
+gdFontCacheSetup=PROCEDURE,-
+gdFontCacheShutdown=PROCEDURE,-
+gdFreeFontCache=PROCEDURE,-
+gdImageStringTTF=PROCEDURE,-
+gdImageStringFT=PROCEDURE,-
+gdFTUseFontConfig=PROCEDURE,-
+gdImageStringFTEx=PROCEDURE,-
+gdImagePolygon=PROCEDURE,-
+gdImageOpenPolygon=PROCEDURE,-
+gdImageFilledPolygon=PROCEDURE,-
+gdImageColorAllocate=PROCEDURE,-
+gdImageColorAllocateAlpha=PROCEDURE,-
+gdImageColorClosest=PROCEDURE,-
+gdImageColorClosestAlpha=PROCEDURE,-
+gdImageColorClosestHWB=PROCEDURE,-
+gdImageColorExact=PROCEDURE,-
+gdImageColorExactAlpha=PROCEDURE,-
+gdImageColorResolve=PROCEDURE,-
+gdImageColorResolveAlpha=PROCEDURE,-
+gdImageColorDeallocate=PROCEDURE,-
+gdImageCreatePaletteFromTrueCol=PROCEDURE,-
+gdImageTrueColorToPalette=PROCEDURE,-
+gdImageColorTransparent=PROCEDURE,-
+gdImagePaletteCopy=PROCEDURE,-
+gdImageGif=PROCEDURE,-
+gdImagePng=PROCEDURE,-
+gdImagePngCtx=PROCEDURE,-
+gdImageGifCtx=PROCEDURE,-
+gdImagePngEx=PROCEDURE,-
+gdImagePngCtxEx=PROCEDURE,-
+gdImageWBMP=PROCEDURE,-
+gdImageWBMPCtx=PROCEDURE,-
+gdFree=PROCEDURE,-
+gdImageWBMPPtr=PROCEDURE,-
+gdImageJpeg=PROCEDURE,-
+gdImageJpegCtx=PROCEDURE,-
+gdImageJpegPtr=PROCEDURE,-
+gdImageGifAnimBegin=PROCEDURE,-
+gdImageGifAnimAdd=PROCEDURE,-
+gdImageGifAnimEnd=PROCEDURE,-
+gdImageGifAnimBeginCtx=PROCEDURE,-
+gdImageGifAnimAddCtx=PROCEDURE,-
+gdImageGifAnimEndCtx=PROCEDURE,-
+gdImageGifAnimBeginPtr=PROCEDURE,-
+gdImageGifAnimAddPtr=PROCEDURE,-
+gdImageGifAnimEndPtr=PROCEDURE,-
+gdImagePngToSink=PROCEDURE,-
+gdImageGd=PROCEDURE,-
+gdImageGd2=PROCEDURE,-
+gdImageGifPtr=PROCEDURE,-
+gdImagePngPtr=PROCEDURE,-
+gdImagePngPtrEx=PROCEDURE,-
+gdImageGdPtr=PROCEDURE,-
+gdImageGd2Ptr=PROCEDURE,-
+gdImageFilledArc=PROCEDURE,-
+gdImageArc=PROCEDURE,-
+gdImageFilledEllipse=PROCEDURE,-
+gdImageFillToBorder=PROCEDURE,-
+gdImageFill=PROCEDURE,-
+gdImageCopy=PROCEDURE,-
+gdImageCopyMerge=PROCEDURE,-
+gdImageCopyMergeGray=PROCEDURE,-
+gdImageCopyResized=PROCEDURE,-
+gdImageCopyResampled=PROCEDURE,-
+gdImageCopyRotated=PROCEDURE,-
+gdImageSetBrush=PROCEDURE,-
+gdImageSetTile=PROCEDURE,-
+gdImageSetAntiAliased=PROCEDURE,-
+gdImageSetAntiAliasedDontBlend=PROCEDURE,-
+gdImageSetStyle=PROCEDURE,-
+gdImageSetThickness=PROCEDURE,-
+gdImageInterlace=PROCEDURE,-
+gdImageAlphaBlending=PROCEDURE,-
+gdImageSaveAlpha=PROCEDURE,-
+gdNewFileCtx=PROCEDURE,-
+gdNewDynamicCtx=PROCEDURE,-
+gdNewDynamicCtxEx=PROCEDURE,-
+gdNewSSCtx=PROCEDURE,-
+gdDPExtractData=PROCEDURE,-
+gdFontGetGiant=PROCEDURE,-
+gdFontGetLarge=PROCEDURE,-
+gdFontGetMediumBold=PROCEDURE,-
+gdFontGetSmall=PROCEDURE,-
+gdFontGetTiny=PROCEDURE,-
+gdImageCompare=PROCEDURE,-
+gdFontGiant=DATA,-
+GDFONTLARGE=DATA,-
+GDFONTMEDIUMBOLD=DATA,-
+GDFONTSMALL=DATA,-
+GDFONTTINY=DATA-
+)
+$ENDIF
+$!
+$IF (SHARED.EQ.32)
+$ THEN
+$	COPY SYS$INPUT LIBGD$DEF.OPT
+UNIVERSAL=gdAlphaBlend
+UNIVERSAL=gdImageCreate
+UNIVERSAL=gdImageCreateTrueColor
+UNIVERSAL=gdImageCreateFromPng
+UNIVERSAL=gdImageCreateFromPngCtx
+UNIVERSAL=gdImageCreateFromPngPtr
+UNIVERSAL=gdImageCreateFromGif
+UNIVERSAL=gdImageCreateFromGifCtx
+UNIVERSAL=gdImageCreateFromGifPtr
+UNIVERSAL=gdImageCreateFromWBMP
+UNIVERSAL=gdImageCreateFromWBMPCtx
+UNIVERSAL=gdImageCreateFromWBMPPtr
+UNIVERSAL=gdImageCreateFromJpeg
+UNIVERSAL=gdImageStringFTCircle
+UNIVERSAL=gdImageCreateFromJpegCtx
+UNIVERSAL=gdImageCreateFromJpegPtr
+UNIVERSAL=gdImageCreateFromPngSource
+UNIVERSAL=gdImageCreateFromGd
+UNIVERSAL=gdImageCreateFromGdCtx
+UNIVERSAL=gdImageCreateFromGdPtr
+UNIVERSAL=gdImageCreateFromGd2
+UNIVERSAL=gdImageCreateFromGd2Ctx
+UNIVERSAL=gdImageCreateFromGd2Ptr
+UNIVERSAL=gdImageCreateFromGd2Part
+UNIVERSAL=gdImageCreateFromGd2PartCtx
+UNIVERSAL=gdImageCreateFromGd2PartPtr
+UNIVERSAL=gdImageCreateFromXbm
+UNIVERSAL=gdImageCreateFromXpm
+UNIVERSAL=gdImageDestroy
+UNIVERSAL=gdImageSetPixel
+UNIVERSAL=gdImageGetPixel
+UNIVERSAL=gdImageGetTrueColorPixel
+UNIVERSAL=gdImageAABlend
+UNIVERSAL=gdImageLine
+UNIVERSAL=gdImageDashedLine
+UNIVERSAL=gdImageRectangle
+UNIVERSAL=gdImageFilledRectangle
+UNIVERSAL=gdImageSetClip
+UNIVERSAL=gdImageGetClip
+UNIVERSAL=gdImageBoundsSafe
+UNIVERSAL=gdImageChar
+UNIVERSAL=gdImageCharUp
+UNIVERSAL=gdImageString
+UNIVERSAL=gdImageStringUp
+UNIVERSAL=gdImageString16
+UNIVERSAL=gdImageStringUp16
+UNIVERSAL=gdFontCacheSetup
+UNIVERSAL=gdFontCacheShutdown
+UNIVERSAL=gdFreeFontCache
+UNIVERSAL=gdImageStringTTF
+UNIVERSAL=gdImageStringFT
+UNIVERSAL=gdFTUseFontConfig
+UNIVERSAL=gdImageStringFTEx
+UNIVERSAL=gdImagePolygon
+UNIVERSAL=gdImageOpenPolygon
+UNIVERSAL=gdImageFilledPolygon
+UNIVERSAL=gdImageColorAllocate
+UNIVERSAL=gdImageColorAllocateAlpha
+UNIVERSAL=gdImageColorClosest
+UNIVERSAL=gdImageColorClosestAlpha
+UNIVERSAL=gdImageColorClosestHWB
+UNIVERSAL=gdImageColorExact
+UNIVERSAL=gdImageColorExactAlpha
+UNIVERSAL=gdImageColorResolve
+UNIVERSAL=gdImageColorResolveAlpha
+UNIVERSAL=gdImageColorDeallocate
+UNIVERSAL=gdImageCreatePaletteFromTrueCol
+UNIVERSAL=gdImageTrueColorToPalette
+UNIVERSAL=gdImageColorTransparent
+UNIVERSAL=gdImagePaletteCopy
+UNIVERSAL=gdImageGif
+UNIVERSAL=gdImagePng
+UNIVERSAL=gdImagePngCtx
+UNIVERSAL=gdImageGifCtx
+UNIVERSAL=gdImagePngEx
+UNIVERSAL=gdImagePngCtxEx
+UNIVERSAL=gdImageWBMP
+UNIVERSAL=gdImageWBMPCtx
+UNIVERSAL=gdFree
+UNIVERSAL=gdImageWBMPPtr
+UNIVERSAL=gdImageJpeg
+UNIVERSAL=gdImageJpegCtx
+UNIVERSAL=gdImageJpegPtr
+UNIVERSAL=gdImageGifAnimBegin
+UNIVERSAL=gdImageGifAnimAdd
+UNIVERSAL=gdImageGifAnimEnd
+UNIVERSAL=gdImageGifAnimBeginCtx
+UNIVERSAL=gdImageGifAnimAddCtx
+UNIVERSAL=gdImageGifAnimEndCtx
+UNIVERSAL=gdImageGifAnimBeginPtr
+UNIVERSAL=gdImageGifAnimAddPtr
+UNIVERSAL=gdImageGifAnimEndPtr
+UNIVERSAL=gdImagePngToSink
+UNIVERSAL=gdImageGd
+UNIVERSAL=gdImageGd2
+UNIVERSAL=gdImageGifPtr
+UNIVERSAL=gdImagePngPtr
+UNIVERSAL=gdImagePngPtrEx
+UNIVERSAL=gdImageGdPtr
+UNIVERSAL=gdImageGd2Ptr
+UNIVERSAL=gdImageFilledArc
+UNIVERSAL=gdImageArc
+UNIVERSAL=gdImageFilledEllipse
+UNIVERSAL=gdImageFillToBorder
+UNIVERSAL=gdImageFill
+UNIVERSAL=gdImageCopy
+UNIVERSAL=gdImageCopyMerge
+UNIVERSAL=gdImageCopyMergeGray
+UNIVERSAL=gdImageCopyResized
+UNIVERSAL=gdImageCopyResampled
+UNIVERSAL=gdImageCopyRotated
+UNIVERSAL=gdImageSetBrush
+UNIVERSAL=gdImageSetTile
+UNIVERSAL=gdImageSetAntiAliased
+UNIVERSAL=gdImageSetAntiAliasedDontBlend
+UNIVERSAL=gdImageSetStyle
+UNIVERSAL=gdImageSetThickness
+UNIVERSAL=gdImageInterlace
+UNIVERSAL=gdImageAlphaBlending
+UNIVERSAL=gdImageSaveAlpha
+UNIVERSAL=gdNewFileCtx
+UNIVERSAL=gdNewDynamicCtx
+UNIVERSAL=gdNewDynamicCtxEx
+UNIVERSAL=gdNewSSCtx
+UNIVERSAL=gdDPExtractData
+UNIVERSAL=gdFontGetGiant
+UNIVERSAL=gdFontGetLarge
+UNIVERSAL=gdFontGetMediumBold
+UNIVERSAL=gdFontGetSmall
+UNIVERSAL=gdFontGetTiny
+UNIVERSAL=gdImageCompare
+UNIVERSAL=gdFontGiant
+UNIVERSAL=GDFONTLARGE
+UNIVERSAL=GDFONTMEDIUMBOLD
+UNIVERSAL=GDFONTSMALL
+UNIVERSAL=GDFONTTINY
+
+$ENDIF
+$!
+$!
+$DEF SYS$OUTPUT _NL0:
+$!
+$!Making OPT file for GD$SHR.EXE, i.e without reference to himself
+$COPY SYS$INPUT OPT.OPT
+[]GD/LIB
+$IF ((HAVE_LIBPNG.EQ.1) .AND. (LIBPNG_STATIC.EQ.1))
+$  THEN
+$       APP SYS$INPUT OPT.OPT
+PNG:LIBPNG/LIB
+$ENDIF
+$IF ((HAVE_LIBPNG.EQ.1) .AND. (LIBPNG_STATIC.EQ.0))
+$  THEN
+$       APP PNG:LIBPNG$SHR.OPT OPT.OPT
+$ENDIF
+$!
+$IF ((HAVE_JPEG.EQ.1) .AND. (JPEG_STATIC.EQ.1))
+$  THEN
+$       APP SYS$INPUT OPT.OPT
+JPEG:LIBJPEG/LIB
+$ENDIF
+$IF ((HAVE_JPEG.EQ.1) .AND. (JPEG_STATIC.EQ.0))
+$  THEN
+$       APP JPEG:LIBJPEG$SHR.OPT OPT.OPT
+$ENDIF
+$!
+$IF (HAVE_LIBTIFF.EQ.1)
+$  THEN
+$       APP TIFF:LIBTIFF.OPT OPT.OPT
+$ENDIF
+$!
+$IF (HAVE_FREETYPE.EQ.1) .AND. (FREETYPE_STATIC.EQ.1)
+$ THEN
+$       APP SYS$INPUT OPT.OPT
+        FREETYPE2:FREETYPE/LIB
+        ZLIB:LIBZ/LIB
+$ENDIF
+$IF (HAVE_FREETYPE.EQ.1) .AND. (FREETYPE_STATIC.EQ.0)
+$ THEN
+$       APP FREETYPE2:FREETYPE.OPT OPT.OPT
+$ENDIF
+$!
+$IF (HAVE_ZLIB.EQ.1) .AND. ((FREETYPE_STATIC.NE.1).AND.(JPEG_STATIC.NE.1))
+$  THEN
+$       IF (ZLIB_STATIC.EQ.0)
+$         THEN
+$               APP SYS$INPUT OPT.OPT
+                SYS$SHARE:LIBZSHR/SHARE
+$         ELSE
+$               APP SYS$INPUT OPT.OPT
+                ZLIB:LIBZ/LIB
+$       ENDIF
+$ENDIF
+$!
+$!
+$PURGE OPT.OPT
+$!
+$!
+$!Making working LIBGD.OPT file
+$!
+$IF (SHARED.GT.0)
+$ THEN
+	$COPY SYS$INPUT LIBGD.OPT
+	SYS$SHARE:GD$SHR/SHARE
+$ ELSE
+	$COPY SYS$INPUT LIBGD.OPT
+	LIBGD:GD/LIB
+$ENDIF
+$!
+$!Append OPT files to LIBGD.OPT
+$IF ((HAVE_LIBPNG.EQ.1) .AND. (LIBPNG_STATIC.EQ.1))
+$  THEN
+$	APP SYS$INPUT LIBGD.OPT
+PNG:LIBPNG/LIB
+$ENDIF
+$IF ((HAVE_LIBPNG.EQ.1) .AND. (LIBPNG_STATIC.EQ.0))
+$  THEN
+$	APP PNG:LIBPNG$SHR.OPT LIBGD.OPT
+PNG:LIBPNG/LIB
+$ENDIF
+$!
+$IF ((HAVE_JPEG.EQ.1) .AND. (HAVE_LIBTIFF.NE.1) .AND. (JPEG_STATIC.EQ.1))
+$  THEN
+$       APP JPEG:LIBJPEG.OPT LIBGD.OPT
+$ENDIF
+$IF ((HAVE_JPEG.EQ.1) .AND. (JPEG_STATIC.EQ.0) .AND. (HAVE_LIBTIFF.NE.1))
+$  THEN
+$       APP JPEG:LIBJPEG$SHR.OPT LIBGD.OPT
+$ENDIF
+$!
+$IF (HAVE_LIBTIFF.EQ.1)
+$  THEN
+$	APP TIFF:LIBTIFF.OPT LIBGD.OPT
+$ENDIF
+$!
+$IF (HAVE_FREETYPE.EQ.1) .AND. (FREETYPE_STATIC.EQ.1)
+$ THEN
+$	APP SYS$INPUT LIBGD.OPT
+	FREETYPE2:FREETYPE/LIB
+	ZLIB:LIBZ/LIB
+$ENDIF
+$IF (HAVE_FREETYPE.EQ.1) .AND. (FREETYPE_STATIC.EQ.0)
+$ THEN
+$	APP FREETYPE2:FREETYPE.OPT LIBGD.OPT
+$ENDIF
+$!
+$IF (HAVE_ZLIB.EQ.1) .AND. ((FREETYPE_STATIC.NE.1).AND.(JPEG_STATIC.NE.1))
+$  THEN
+$	IF (ZLIB_STATIC.EQ.0)
+$	  THEN
+$		APP SYS$INPUT LIBGD.OPT
+		SYS$SHARE:LIBZSHR/SHARE	
+$	  ELSE
+$		APP SYS$INPUT LIBGD.OPT
+		ZLIB:LIBZ/LIB
+$	ENDIF
+$ENDIF
+$!
+$PURGE LIBGD.OPT
+$!
+$DEAS SYS$OUTPUT
+$!
+$OPEN/WRITE OUT BUILD.COM
+$ WRITE OUT "$",MAKE
+$ WRITE OUT "$ CURRENT = F$ENVIRONMENT (""DEFAULT"") "
+$ WRITE OUT "$TMP=CURRENT"
+$ WRITE OUT "$OPEN/WRITE OUTT LIBGD$STARTUP.COM"
+$ WRITE OUT "$WRITE OUTT ""DEFINE LIBGD ","'","'","TMP'""
+$ WRITE OUT "$WRITE OUTT ""GD2COPYPAL==""""$","'","'","TMP'"",""GD2COPYPAL""""
+$ WRITE OUT "$WRITE OUTT ""GD2TIME==""""$","'","'","TMP'"",""GD2TIME""""
+$ WRITE OUT "$WRITE OUTT ""GD2TOGIF==""""$","'","'","TMP'"",""GD2TOGIF""""
+$ WRITE OUT "$WRITE OUTT ""GD2TOPNG==""""$","'","'","TMP'"",""GD2TOPNG""""
+$ WRITE OUT "$WRITE OUTT ""GDCMPGIF==""""$","'","'","TMP'"",""GDCMPGIF""""
+$ WRITE OUT "$WRITE OUTT ""GDTOPNG==""""$","'","'","TMP'"",""GDTOPNG""""
+$ WRITE OUT "$WRITE OUTT ""GIFTOGD2==""""$","'","'","TMP'"",""GIFTOGD2""""
+$ WRITE OUT "$WRITE OUTT ""PNGTOGD==""""$","'","'","TMP'"",""PNGTOGD""""
+$ WRITE OUT "$WRITE OUTT ""PNGTOGD2==""""$","'","'","TMP'"",""PNGTOGD2""""
+$ WRITE OUT "$WRITE OUTT ""WEBPNG==""""$","'","'","TMP'"",""WEBPNG""""
+$!
+$ WRITE OUT "$WRITE SYS$OUTPUT "" ""
+$ WRITE OUT "$WRITE SYS$OUTPUT ""***************************************************************************** ""
+$ WRITE OUT "$WRITE SYS$OUTPUT ""LIBGD$STARTUP.COM has been created. ""
+$ WRITE OUT "$WRITE SYS$OUTPUT ""This file setups all logicals needed. It should be execute before using ""
+$ WRITE OUT "$WRITE SYS$OUTPUT ""Nice place to call it - LOGIN.COM ""
+$ WRITE OUT "$WRITE SYS$OUTPUT """"
+$ WRITE OUT "$WRITE SYS$OUTPUT ""Using:""
+$ WRITE OUT "$WRITE SYS$OUTPUT ""CC/INCL=LIBGD PROG""
+$ WRITE OUT "$WRITE SYS$OUTPUT ""LINK PROG, LIBGD:LIBGD/OPT""
+$ WRITE OUT "$WRITE SYS$OUTPUT ""***************************************************************************** ""
+$ WRITE OUT "$WRITE SYS$OUTPUT ""***************************************************************************** ""
+$CLOSE OUT
+$!
+$!
+$!Writing config.h
+$COPY SYS$INPUT CONFIG.H
+/* Generated by configure.com  for OpenVMS */
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define to 1 if you have the <errno.h> header file. */
+#define HAVE_ERRNO_H 1
+
+
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+
+#define PACKAGE_NAME "GD"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "GD 2.0.34"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "gd"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "2.0.34"
+
+/* Define to necessary symbol if this constant uses a non-standard name on
+ *    your system. */
+/* #undef PTHREAD_CREATE_JOINABLE */
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Version number of package */
+#define VERSION "2.0.34"
+
+/* Define to 1 if you have the `m' library (-lm). */
+#define HAVE_LIBM 1
+
+
+/* Define to 1 if you have the <libpng/png.h> header file. */
+/* #undef HAVE_LIBPNG_PNG_H */
+
+
+
+/* Define to 1 if you have the <limits.h> header file. */
+//#define HAVE_LIMITS_H 1
+
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+
+/* Define if you have POSIX threads libraries and header files. */
+#define HAVE_PTHREAD 1
+
+/* Define to 1 if you have the <stddef.h> header file. */
+#define HAVE_STDDEF_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+//#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define as const if the declaration of iconv() needs const. */
+//#define ICONV_CONST
+
+/* Name of package */
+#define PACKAGE "gd"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "http://bugs.libgd.org"
+
+/* Define to the full name of this package. */
+
+
+
+$IF HAVE_ICONV.EQ.1
+$ THEN
+$	APP SYS$INPUT CONFIG.H
+	/* Define if you have the iconv() function. */
+	#define HAVE_ICONV 1
+	/* Define to 1 if you have the <iconv.h> header file. */
+	#define HAVE_ICONV_H 1
+	/* Define if <iconv.h> defines iconv_t. */
+	#define HAVE_ICONV_T_DEF 1
+$ENDIF
+$IF HAVE_LIBTIFF.EQ.1 
+$  THEN 
+$	APP SYS$INPUT CONFIG.H
+	#define HAVE_LIBTIFF 1
+$ENDIF
+$IF HAVE_LIBPNG.EQ.1   
+$   THEN 
+$	APP SYS$INPUT CONFIG.H
+	#define HAVE_LIBPNG 1
+	#define HAVE_PNG_H 1
+$ENDIF
+$IF HAVE_FREETYPE.EQ.1
+$   THEN 
+$	APP SYS$INPUT CONFIG.H
+	#define HAVE_LIBFREETYPE 1
+	#define HAVE_FT2BUILD_H 1
+$ENDIF
+$IF HAVE_JPEG.EQ.1 
+$   THEN 
+$	APP SYS$INPUT CONFIG.H
+	#define HAVE_LIBJPEG 1
+$ENDIF
+$IF HAVE_ZLIB.EQ.1 
+$   THEN 
+$	APP SYS$INPUT CONFIG.H
+	#define HAVE_LIBZ 1
+$ENDIF
+$!
+$DEAS SYS$OUTPUT
+$!
+$!
+$!
+$COP SYS$INPUT DESCRIP.MMS
+# Generated by CONFIGURE.COM
+# Alexey Chupahin elvis_75@mail.ru
+#
+
+.FIRST
+	DEF LIBGD []
+
+CC=cc
+CFLAGS=/OPT=(INLINE=SPEED) /INCL=([],JPEG,PNG,FREETYPE2,ZLIB,TIFF) /DEF=(HAVE_CONFIG_H)/WARN=(DIS=MACROREDEF)
+LIBS=[]LIBGD/OPT
+
+
+ALL : \
+GD.OLB,\
+$IF (SHARED.GT.0)
+$ THEN
+$	APP SYS$INPUT DESCRIP.MMS
+GD$SHR.EXE,\
+$ENDIF
+$!
+$APP SYS$INPUT DESCRIP.MMS
+ANNOTATE.EXE,\
+CIRCLETEXTTEST.EXE,\
+FONTCONFIGTEST.EXE,\
+CIRCLETEXTTEST.EXE,\
+FONTCONFIGTEST.EXE,\
+FONTSIZETEST.EXE,\
+FONTWHEELTEST.EXE,\
+GD2COPYPAL.EXE,\
+GD2TIME.EXE,\
+GD2TOGIF.EXE,\
+GD2TOPNG.EXE,\
+GDCMPGIF.EXE,\
+GDDEMO.EXE,\
+GDTEST.EXE,\
+GDTESTFT.EXE,\
+GDTOPNG.EXE,\
+GIFANIMTEST.EXE,\
+GIFTOGD2.EXE,\
+PNGTOGD.EXE,\
+PNGTOGD2.EXE,\
+TESTAC.EXE,\
+TESTTR.EXE,\
+WEBPNG.EXE,\
+GDPARTTOPNG.EXE
+	$!
+
+ANNOTATE.EXE : ANNOTATE.OBJ
+       LINK $<, $(LIBS)
+
+CIRCLETEXTTEST.EXE : CIRCLETEXTTEST.OBJ
+       LINK $<, $(LIBS)
+
+FONTCONFIGTEST.EXE : FONTCONFIGTEST.OBJ
+       LINK $<, $(LIBS)
+
+FONTSIZETEST.EXE : FONTSIZETEST.OBJ
+       LINK $<, $(LIBS)
+
+FONTWHEELTEST.EXE : FONTWHEELTEST.OBJ
+       LINK $<, $(LIBS)
+
+GD2COPYPAL.EXE : GD2COPYPAL.OBJ
+       LINK $<, $(LIBS)
+
+GD2TIME.EXE : GD2TIME.OBJ
+       LINK $<, $(LIBS)
+
+GD2TOGIF.EXE : GD2TOGIF.OBJ
+       LINK $<, $(LIBS)
+
+GD2TOPNG.EXE : GD2TOPNG.OBJ
+       LINK $<, $(LIBS)
+
+
+GDCMPGIF.EXE : GDCMPGIF.OBJ
+       LINK $<, $(LIBS)
+
+
+GDDEMO.EXE : GDDEMO.OBJ
+       LINK $<, $(LIBS)
+
+
+GDTEST.EXE : GDTEST.OBJ
+       LINK $<, $(LIBS)
+
+
+GDTESTFT.EXE : GDTESTFT.OBJ
+       LINK $<, $(LIBS)
+
+
+GDTOPNG.EXE : GDTOPNG.OBJ
+       LINK $<, $(LIBS)
+
+
+GIFANIMTEST.EXE : GIFANIMTEST.OBJ
+       LINK $<, $(LIBS)
+
+GIFTOGD2.EXE : GIFTOGD2.OBJ
+       LINK $<, $(LIBS)
+
+GIFTOGD2.OBJ : GIFTOGD2.C
+	CC $(CFLAGS) GIFTOGD2.C
+
+
+
+PNGTOGD.EXE : PNGTOGD.OBJ
+       LINK $<, $(LIBS)
+
+
+PNGTOGD2.EXE : PNGTOGD2.OBJ
+       LINK $<, $(LIBS)
+
+
+TESTAC.EXE : TESTAC.OBJ
+       LINK $<, $(LIBS)
+
+
+TESTTR.EXE : TESTTR.OBJ
+       LINK $<, $(LIBS)
+
+
+WEBPNG.EXE : WEBPNG.OBJ
+       LINK $<, $(LIBS)
+
+
+GDPARTTOPNG.EXE : GDPARTTOPNG.OBJ
+       LINK $<, $(LIBS)
+
+
+OBJ=\
+GD.OBJ,\
+GDCACHE.OBJ,\
+GDFONTG.OBJ,\
+GDFONTL.OBJ,\
+GDFONTMB.OBJ,\
+GDFONTS.OBJ,\
+GDFONTT.OBJ,\
+GDFT.OBJ,\
+GDFX.OBJ,\
+GDHELPERS.OBJ,\
+GDKANJI.OBJ,\
+GDTABLES.OBJ,\
+GDXPM.OBJ,\
+GD_GD.OBJ,\
+GD_GD2.OBJ,\
+GD_GIF_IN.OBJ,\
+GD_GIF_OUT.OBJ,\
+GD_IO.OBJ,\
+GD_IO_DP.OBJ,\
+GD_IO_FILE.OBJ,\
+GD_IO_SS.OBJ,\
+GD_JPEG.OBJ,\
+GD_PNG.OBJ,\
+GD_SECURITY.OBJ,\
+GD_SS.OBJ,\
+GD_TOPAL.OBJ,\
+GD_WBMP.OBJ,\
+WBMP.OBJ
+
+
+GD.OLB : $(OBJ)
+        LIB/CREA GD.OLB $(OBJ)
+
+GD$SHR.EXE : $(OBJ)
+	LINK/SHARE=GD$SHR GD.OBJ,LIBGD$DEF/OPT,OPT/OPT
+	COPY GD$SHR.EXE SYS$SHARE
+
+CLEAN :
+	DEL [...]*.OBJ;*
+	DEL [...]*.OLB;*
+	DEL [...]*.EXE;*
+$!DEL TMP.MMS;*
+$!
+$IF (F$SEARCH("GD.H;2").EQS."")
+$ THEN
+$       WRITE SYS$OUTPUT "Patching GD.H"
+$	DEF SYS$OUTPUT "_NLA0:"
+$       COPY SYS$INPUT VMS.VMS
+        #define gdImageCreatePaletteFromTrueColor gdImageCreatePaletteFromTrueCol
+$       APP GD.H;1 VMS.VMS
+$       REN VMS.VMS GD.H;2       
+$	DEL VMS.VMS;*
+$	DEAS SYS$INPUT
+$ENDIF
+$!
+$!
+$!
+$!
+$WRITE SYS$OUTPUT " "
+$WRITE SYS$OUTPUT " "
+$WRITE SYS$OUTPUT "Now you can type @BUILD "
+$!
+$EXIT:
+$DEFINE SYS$OUTPUT _NLA0:
+$DEL TEST.OBJ;*
+$DEL TEST.C;*
+$DEL TEST.EXE;*
+$DEAS SYS$OUTPUT

File VMS/README.VMS

+Dear OpenVMS user,
+
+Installation process is identical to one in *nix* world and consist to 
+four simple steps:
+1. Installing required libraries
+2. Configuration
+3. Compiling
+4. Installation.
+
+
+1. Please install required libraries first:
+
+1. ZLIB 1.2 or newer
+2. PNG 1.2.12 or newer
+3. FreeType 2
+4. JPEG 6B
+
+All may be found at OpenVMS libSDL porting project site
+http://fafner.dyndns.org/~alexey/libsdl/required.html
+
+Also, system should have MMS make utility from DEC or 
+free analogue MMK. And C compiler with runtime, of course. ;)
+
+
+2. Configuration is doing automatically by a configuration script:
+
+$@[.VMS]CONFIGURE
+
+The script detects hardware,system and required libraries have been installed.
+Compilation stage will be prepeared to create shared and static libraries. 
+Alpha,IA64 or VAX platform are supported. Optional argument "static" 
+tells to configurator to make static libraries only:
+
+$@[.VMS]CONFIGURE STATIC
+
+CONFIGURE script checks your ZLIB, FREETYPE, JPEG, PNG libraries. 
+If it detects any troubles, you may get and install good and tested ones 
+from OpenVMS libSDL porting project site:
+http://fafner.dyndns.org/~alexey/libsdl/required.html
+
+When success, it creates a building script named BUILD.COM
+
+3. Compilation:
+
+$@BUILD
+
+It should be error-free.
+
+When success, it creates a setup script named LIBGD$STARTUP.COM
+
+4. Setup OpenVMS environment before using libGD:
+
+$@LIBGD$STARTUP
+
+LIBGD and its utilites are ready to using.
+
+Optionally you may insert this startup file into your LOGIN.COM 
+to set libGD environment every time you login automatically.
+
+To learn libGD please refer libGD official documentation.
+Compiling with library should be:
+
+$CC/INCL=LIBGD PROG
+$LINK PROG, LIBGD:LIBGD/OPT
+
+
+
+yours,
+Alexey Chupahin
+Rostov-on-Don, Russia
+elvis_75@mail.ru  alex@rostov.rs-ultra.ru

File cmake/modules/AC_HEADER_STDC.cmake

+message(STATUS "Checking whether system has ANSI C header files")
+include(CheckPrototypeExists)
+
+include(CheckPrototypeExists)
+check_include_files("dlfcn.h;stdint.h;stddef.h;inttypes.h;stdlib.h;strings.h;string.h;float.h" StandardHeadersExist)
+if(StandardHeadersExist)
+	check_prototype_exists(memchr string.h memchrExists)
+	if(memchrExists)
+
+		check_prototype_exists(free stdlib.h freeExists)
+		if(freeExists)
+			message(STATUS "ANSI C header files - found")
+			set(STDC_HEADERS 1 CACHE INTERNAL "System has ANSI C header files")
+			set(HAVE_STRINGS_H 1)
+			set(HAVE_STRING_H 1)
+			set(HAVE_FLOAT_H 1)
+			set(HAVE_STDLIB_H 1)
+			set(HAVE_STDDEF_H 1)
+			set(HAVE_STDINT_H 1)
+			set(HAVE_INTTYPES_H 1)
+			set(HAVE_DLFCN_H 1)
+		endif(freeExists)
+	endif(memchrExists)
+endif(StandardHeadersExist)
+
+if(NOT STDC_HEADERS)
+	message(STATUS "ANSI C header files - not found")
+	set(STDC_HEADERS 0 CACHE INTERNAL "System has ANSI C header files")
+endif(NOT STDC_HEADERS)
+
+
+check_include_files(unistd.h HAVE_UNISTD_H)
+
+include(CheckDIRSymbolExists)
+check_dirsymbol_exists("sys/stat.h;sys/types.h;dirent.h" HAVE_DIRENT_H)
+if (HAVE_DIRENT_H)
+	set(HAVE_SYS_STAT_H 1)
+	set(HAVE_SYS_TYPES_H 1)
+endif (HAVE_DIRENT_H)
+
+check_include_files("dlfcn.h;stdint.h;stddef.h;inttypes.h;stdlib.h;strings.h;string.h;float.h" StandardHeadersExist)
+set(HAVE_LIBM 1)

File cmake/modules/CheckDIRSymbolExists.cmake

+# - Check if the DIR symbol exists like in AC_HEADER_DIRENT.
+# CHECK_DIRSYMBOL_EXISTS(FILES VARIABLE)
+#
+#  FILES    - include files to check
+#  VARIABLE - variable to return result
+#
+# This module is a small but important variation on CheckSymbolExists.cmake.
+# The symbol always searched for is DIR, and the test programme follows
+# the AC_HEADER_DIRENT test programme rather than the CheckSymbolExists.cmake
+# test programme which always fails since DIR tends to be typedef'd
+# rather than #define'd.
+# 
+# The following variables may be set before calling this macro to
+# modify the way the check is run:
+#
+#  CMAKE_REQUIRED_FLAGS = string of compile command line flags
+#  CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
+#  CMAKE_REQUIRED_INCLUDES = list of include directories
+#  CMAKE_REQUIRED_LIBRARIES = list of libraries to link
+
+MACRO(CHECK_DIRSYMBOL_EXISTS FILES VARIABLE)
+  IF(NOT DEFINED ${VARIABLE})
+    SET(CMAKE_CONFIGURABLE_FILE_CONTENT "/* */\n")
+    SET(MACRO_CHECK_DIRSYMBOL_EXISTS_FLAGS ${CMAKE_REQUIRED_FLAGS})
+    IF(CMAKE_REQUIRED_LIBRARIES)
+      SET(CHECK_DIRSYMBOL_EXISTS_LIBS 
+        "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
+    ELSE(CMAKE_REQUIRED_LIBRARIES)
+      SET(CHECK_DIRSYMBOL_EXISTS_LIBS)
+    ENDIF(CMAKE_REQUIRED_LIBRARIES)
+    IF(CMAKE_REQUIRED_INCLUDES)
+      SET(CMAKE_DIRSYMBOL_EXISTS_INCLUDES
+        "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
+    ELSE(CMAKE_REQUIRED_INCLUDES)
+      SET(CMAKE_DIRSYMBOL_EXISTS_INCLUDES)
+    ENDIF(CMAKE_REQUIRED_INCLUDES)
+    FOREACH(FILE ${FILES})
+      SET(CMAKE_CONFIGURABLE_FILE_CONTENT
+        "${CMAKE_CONFIGURABLE_FILE_CONTENT}#include <${FILE}>\n")
+    ENDFOREACH(FILE)
+    SET(CMAKE_CONFIGURABLE_FILE_CONTENT
+      "${CMAKE_CONFIGURABLE_FILE_CONTENT}\nint main()\n{if ((DIR *) 0) return 0;}\n")
+
+    CONFIGURE_FILE("${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in"
+      "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckDIRSymbolExists.c" @ONLY)
+
+    MESSAGE(STATUS "Looking for DIR in ${FILES}")
+    TRY_COMPILE(${VARIABLE}
+      ${CMAKE_BINARY_DIR}
+      ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckDIRSymbolExists.c
+      COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
+      CMAKE_FLAGS 
+      -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_DIRSYMBOL_EXISTS_FLAGS}
+      "${CHECK_DIRSYMBOL_EXISTS_LIBS}"
+      "${CMAKE_DIRSYMBOL_EXISTS_INCLUDES}"
+      OUTPUT_VARIABLE OUTPUT)
+    IF(${VARIABLE})
+      MESSAGE(STATUS "Looking for DIR in ${FILES} - found")
+      SET(${VARIABLE} 1 CACHE INTERNAL "Have symbol DIR")
+      FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log 
+        "Determining if the DIR symbol is defined as in AC_HEADER_DIRENT "
+        "passed with the following output:\n"
+        "${OUTPUT}\nFile ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckDIRSymbolExists.c:\n"
+        "${CMAKE_CONFIGURABLE_FILE_CONTENT}\n")
+    ELSE(${VARIABLE})
+      MESSAGE(STATUS "Looking for DIR in ${FILES} - not found.")
+      SET(${VARIABLE} "" CACHE INTERNAL "Have symbol DIR")
+      FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log 
+        "Determining if the DIR symbol is defined as in AC_HEADER_DIRENT "
+        "failed with the following output:\n"
+        "${OUTPUT}\nFile ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckDIRSymbolExists.c:\n"
+        "${CMAKE_CONFIGURABLE_FILE_CONTENT}\n")
+    ENDIF(${VARIABLE})
+  ENDIF(NOT DEFINED ${VARIABLE})
+ENDMACRO(CHECK_DIRSYMBOL_EXISTS)

File cmake/modules/CheckPrototypeExists.cmake

+# AWI, downloaded from KDE repository since has not yet been transferred
+# to cmake repository as of 2006-07-31.
+# http://websvn.kde.org/trunk/KDE/kdelibs/cmake/modules/CheckPrototypeExists.cmake?rev=505849&view=markup
+#
+# - Check if the prototype for a function exists.
+# CHECK_PROTOTYPE_EXISTS (FUNCTION HEADER VARIABLE)
+#
+#  FUNCTION - the name of the function you are looking for
+#  HEADER - the header(s) where the prototype should be declared
+#  VARIABLE - variable to store the result
+#
+
+INCLUDE(CheckCXXSourceCompiles)
+
+MACRO(CHECK_PROTOTYPE_EXISTS _SYMBOL _HEADER _RESULT)
+   SET(_INCLUDE_FILES)
+   FOREACH(it ${_HEADER})
+      SET(_INCLUDE_FILES "${_INCLUDE_FILES}#include <${it}>\n")
+   ENDFOREACH(it)
+
+   SET(_CHECK_PROTO_EXISTS_SOURCE_CODE "
+${_INCLUDE_FILES}
+void cmakeRequireSymbol(int dummy,...){(void)dummy;}
+int main()
+{
+#ifndef ${_SYMBOL}
+#ifndef _MSC_VER
+  cmakeRequireSymbol(0,&${_SYMBOL});
+#else
+  char i = sizeof(&${_SYMBOL});
+#endif
+#endif
+  return 0;
+}
+")
+   CHECK_CXX_SOURCE_COMPILES("${_CHECK_PROTO_EXISTS_SOURCE_CODE}" ${_RESULT})
+ENDMACRO(CHECK_PROTOTYPE_EXISTS _SYMBOL _HEADER _RESULT)
+

File cmake/modules/FindFontconfig.cmake

+# - Try to find the  Fontconfig
+# Once done this will define
+#
+#  FONTCONFIG_FOUND - system has Fontconfig
+#  FONTCONFIG_LIBRARIES - Link these to use FONTCONFIG
+#  FONTCONFIG_DEFINITIONS - Compiler switches required for using FONTCONFIG
+#  FONTCONFIG_INCLUDE_DIR - FontConfig include dir
+# Copyright (c) 2006, Laurent Montel, <montel@kde.org>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+
+if (FONTCONFIG_LIBRARIES AND FONTCONFIG_DEFINITIONS)
+
+  # in cache already
+  set(FONTCONFIG_FOUND TRUE)
+
+else (FONTCONFIG_LIBRARIES AND FONTCONFIG_DEFINITIONS)
+IF (NOT WIN32)
+  # use pkg-config to get the directories and then use these values
+  # in the FIND_PATH() and FIND_LIBRARY() calls
+  INCLUDE(UsePkgConfig)
+
+  PKGCONFIG(fontconfig _FONTCONFIGIncDir _FONTCONFIGLinkDir _FONTCONFIGLinkFlags _FONTCONFIGCflags)
+
+  set(FONTCONFIG_DEFINITIONS ${_FONTCONFIGCflags} CACHE INTERNAL "The compilation flags for fontconfig")
+ENDIF (NOT WIN32)
+  find_path(FONTCONFIG_INCLUDE_DIR fontconfig/fontconfig.h
+    PATHS
+    ${_FONTCONFIGIncDir}
+    /usr/include
+    /usr/local/include
+    /usr/X11/include
+  )
+
+  find_library(FONTCONFIG_LIBRARIES NAMES fontconfig
+    PATHS
+    ${_FONTCONFIGLinkDir}
+	/usr/lib64
+    /usr/lib
+    /usr/local/lib
+  )
+
+  if (FONTCONFIG_LIBRARIES)
+     set(FONTCONFIG_FOUND TRUE)
+  endif (FONTCONFIG_LIBRARIES)
+
+  if (FONTCONFIG_FOUND)
+    if (NOT FONTCONFIG_FIND_QUIETLY)
+      message(STATUS "Found FONTCONFIG: ${FONTCONFIG_LIBRARIES}")
+    endif (NOT FONTCONFIG_FIND_QUIETLY)
+  else (FONTCONFIG_FOUND)
+    if (FONTCONFIG_FIND_REQUIRED)
+      message(FATAL_ERROR "Could NOT find FONTCONFIG")
+    endif (FONTCONFIG_FIND_REQUIRED)
+  endif (FONTCONFIG_FOUND)
+
+  MARK_AS_ADVANCED(FONTCONFIG_LIBRARIES)
+
+endif (FONTCONFIG_LIBRARIES AND FONTCONFIG_DEFINITIONS)

File cmake/modules/FindFreetype.cmake

+#
+# Find the native FREETYPE includes and library
+#
+
+# This module defines
+# FREETYPE_INCLUDE_DIR, where to find ft2build.h, ftheader.h, ...
+# FREETYPE_LIBRARIES, the libraries to link against to use FREETYPE.
+# FREETYPE_FOUND, If false, do not try to use FREETYPE.
+
+# also defined, but not for general use are
+# FREETYPE_LIBRARY, where to find the FREETYPE library.
+
+FIND_PATH(FREETYPE_INCLUDE_DIR_FT2BUILD ft2build.h
+  /usr/include/
+  /usr/local/include/
+)
+
+FIND_PATH(FREETYPE_INCLUDE_DIR_FTHEADER freetype/config/ftheader.h
+  /usr/include/freetype2
+  /usr/local/include/freetype2
+)
+
+FIND_LIBRARY(FREETYPE_LIBRARY NAMES freetype freetype2
+  PATHS
+  /usr/lib64
+  /usr/lib
+  /usr/local/lib
+)
+MESSAGE("FT2 lib found: " ${FREETYPE_LIBRARY})
+IF (FREETYPE_LIBRARY)
+  IF (FREETYPE_INCLUDE_DIR_FTHEADER AND FREETYPE_INCLUDE_DIR_FT2BUILD)
+    SET( FREETYPE_FOUND "YES" )
+    SET( FREETYPE_INCLUDE_DIR
+      ${FREETYPE_INCLUDE_DIR_FT2BUILD}
+      ${FREETYPE_INCLUDE_DIR_FTHEADER} )
+    SET( FREETYPE_LIBRARIES ${FREETYPE_LIBRARY} )
+  ENDIF (FREETYPE_INCLUDE_DIR_FTHEADER AND FREETYPE_INCLUDE_DIR_FT2BUILD)
+ENDIF (FREETYPE_LIBRARY)
+
+MARK_AS_ADVANCED(
+  FREETYPE_INCLUDE_DIR_FT2BUILD
+  FREETYPE_INCLUDE_DIR_FTHEADER
+  )

File cmake/modules/FindGD.cmake

+# - Find GD
+# Find the native GD includes and library
+# This module defines
+#  GD_INCLUDE_DIR, where to find gd.h, etc.
+#  GD_LIBRARIES, the libraries needed to use GD.
+#  GD_FOUND, If false, do not try to use GD.
+# also defined, but not for general use are
+#  GD_LIBRARY, where to find the GD library.
+#  GD_SUPPORTS_PNG, GD_SUPPORTS_JPEG, GD_SUPPORTS_GIF, test
+#  support for image formats in GD.
+
+FIND_PATH(GD_INCLUDE_DIR gd.h
+/usr/local/include
+/usr/include
+)
+
+if(WIN32 AND NOT CYGWIN)
+  SET(GD_NAMES ${GD_NAMES} bgd)
+else(WIN32)
+  SET(GD_NAMES ${GD_NAMES} gd)
+endif(WIN32 AND NOT CYGWIN)
+
+FIND_LIBRARY(GD_LIBRARY
+  NAMES ${GD_NAMES}
+  PATHS /usr/lib64 /usr/lib /usr/local/lib
+  )
+
+IF (GD_LIBRARY AND GD_INCLUDE_DIR)
+    SET(GD_LIBRARIES ${GD_LIBRARY})
+    SET(GD_FOUND "YES")
+ELSE (GD_LIBRARY AND GD_INCLUDE_DIR)
+  SET(GD_FOUND "NO")
+ENDIF (GD_LIBRARY AND GD_INCLUDE_DIR)
+message("Found GD: ${GD_FOUND}")
+IF (GD_FOUND)
+	IF (WIN32 AND NOT CYGWIN)
+		SET(GD_SUPPORTS_PNG ON)
+		SET(GD_SUPPORTS_JPEG ON)
+		SET(GD_SUPPORTS_GIF ON)
+		get_filename_component(GD_LIBRARY_DIR ${GD_LIBRARY} PATH)
+	ELSE (WIN32 AND NOT CYGWIN)
+		INCLUDE(CheckLibraryExists)
+		GET_FILENAME_COMPONENT(GD_LIB_PATH ${GD_LIBRARY} PATH)
+		GET_FILENAME_COMPONENT(GD_LIB ${GD_LIBRARY} NAME)
+
+		CHECK_LIBRARY_EXISTS("${GD_LIBRARY}" "gdImagePng" "${GD_LIB_PATH}" GD_SUPPORTS_PNG)
+		IF (GD_SUPPORTS_PNG)
+			find_package(PNG)
+			IF (PNG_FOUND)
+				SET(GD_LIBRARIES ${GD_LIBRARIES} ${PNG_LIBRARIES})
+			SET(GD_INCLUDE_DIR ${GD_INCLUDE_DIR} ${PNG_INCLUDE_DIR})
+			ELSE (PNG_FOUND)
+				SET(GD_SUPPORTS_PNG "NO")
+			ENDIF (PNG_FOUND)
+		ENDIF (GD_SUPPORTS_PNG)
+
+		CHECK_LIBRARY_EXISTS("${GD_LIBRARY}" "gdImageJpeg" "${GD_LIB_PATH}" GD_SUPPORTS_JPEG)
+		IF (GD_SUPPORTS_JPEG)
+			find_package(JPEG)
+			IF (JPEG_FOUND)
+				SET(GD_LIBRARIES ${GD_LIBRARIES} ${JPEG_LIBRARIES})
+				SET(GD_INCLUDE_DIR ${GD_INCLUDE_DIR} ${JPEG_INCLUDE_DIR})
+			ELSE (JPEG_FOUND)
+				SET(GD_SUPPORTS_JPEG "NO")
+			ENDIF (JPEG_FOUND)
+		ENDIF (GD_SUPPORTS_JPEG)
+
+		CHECK_LIBRARY_EXISTS("${GD_LIBRARY}" "gdImageGif" "${GD_LIB_PATH}" GD_SUPPORTS_GIF)
+
+		# Trim the list of include directories
+		SET(GDINCTRIM)
+		FOREACH(GD_DIR ${GD_INCLUDE_DIR})
+			SET(GD_TMP_FOUND OFF)
+			FOREACH(GD_TRIMMED ${GDINCTRIM})
+				IF ("${GD_DIR}" STREQUAL "${GD_TRIMMED}")
+				SET(GD_TMP_FOUND ON)
+				ENDIF ("${GD_DIR}" STREQUAL "${GD_TRIMMED}")
+			ENDFOREACH(GD_TRIMMED ${GDINCTRIM})
+			IF (NOT GD_TMP_FOUND)
+				SET(GDINCTRIM "${GDINCTRIM}" "${GD_DIR}")
+			ENDIF (NOT GD_TMP_FOUND)
+		ENDFOREACH(GD_DIR ${GD_INCLUDE_DIR})
+		SET(GD_INCLUDE_DIR ${GDINCTRIM})
+
+		SET(GD_LIBRARY_DIR)
+
+		# Generate trimmed list of library directories and list of libraries
+		FOREACH(GD_LIB ${GD_LIBRARIES})
+			GET_FILENAME_COMPONENT(GD_NEXTLIBDIR ${GD_LIB} PATH)
+			SET(GD_TMP_FOUND OFF)
+			FOREACH(GD_LIBDIR ${GD_LIBRARY_DIR})
+				IF ("${GD_NEXTLIBDIR}" STREQUAL "${GD_LIBDIR}")
+					SET(GD_TMP_FOUND ON)
+				ENDIF ("${GD_NEXTLIBDIR}" STREQUAL "${GD_LIBDIR}")
+			ENDFOREACH(GD_LIBDIR ${GD_LIBRARIES})
+			IF (NOT GD_TMP_FOUND)
+				SET(GD_LIBRARY_DIR "${GD_LIBRARY_DIR}" "${GD_NEXTLIBDIR}")
+			ENDIF (NOT GD_TMP_FOUND)
+		ENDFOREACH(GD_LIB ${GD_LIBRARIES})
+	ENDIF (WIN32 AND NOT CYGWIN)
+ENDIF (GD_FOUND)
+
+IF (GD_FOUND)
+   IF (NOT GD_FIND_QUIETLY)
+      MESSAGE(STATUS "Found GD: ${GD_LIBRARY}")
+   ENDIF (NOT GD_FIND_QUIETLY)
+ELSE (GD_FOUND)
+   IF (GD_FIND_REQUIRED)
+      MESSAGE(FATAL_ERROR "Could not find GD library")
+   ENDIF (GD_FIND_REQUIRED)
+ENDIF (GD_FOUND)
+
+MARK_AS_ADVANCED(
+  GD_LIBRARY
+  GD_LIBRARIES
+  GD_INCLUDE_DIR
+  GD_LIBRARY_DIR
+  GD_SUPPORTS_PNG
+  GD_SUPPORTS_JPEG
+  GD_SUPPORTS_GIF
+)

File cmake/modules/FindPNG.cmake

+# - Find the native PNG includes and library
+#
+
+# This module defines
+#  PNG_INCLUDE_DIR, where to find png.h, etc.
+#  PNG_LIBRARIES, the libraries to link against to use PNG.
+#  PNG_DEFINITIONS - You should ADD_DEFINITONS(${PNG_DEFINITIONS}) before compiling code that includes png library files.
+#  PNG_FOUND, If false, do not try to use PNG.
+# also defined, but not for general use are
+#  PNG_LIBRARY, where to find the PNG library.
+# None of the above will be defined unles zlib can be found.
+# PNG depends on Zlib
+#
+# Copyright (c) 2002 Kitware, Inc., Insight Consortium.  All rights reserved.
+# See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
+
+
+INCLUDE(FindZLIB)
+
+SET(PNG_FOUND "NO")
+
+IF(ZLIB_FOUND)
+  FIND_PATH(PNG_PNG_INCLUDE_DIR png.h
+  /usr/local/include
+  /usr/include
+  /usr/local/include/libpng             # OpenBSD
+  )
+
+  SET(PNG_NAMES ${PNG_NAMES} png libpng)
+  FIND_LIBRARY(PNG_LIBRARY
+    NAMES ${PNG_NAMES}
+    PATHS /usr/lib64 /usr/lib /usr/local/lib
+  )
+
+  IF (PNG_LIBRARY AND PNG_PNG_INCLUDE_DIR)
+      # png.h includes zlib.h. Sigh.
+      SET(PNG_INCLUDE_DIR ${PNG_PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} )
+      SET(PNG_LIBRARIES ${PNG_LIBRARY} ${ZLIB_LIBRARY})
+      SET(PNG_FOUND "YES")
+			SET(HAVE_PNG_H)
+      IF (CYGWIN)
+        IF(BUILD_SHARED_LIBS)
+           # No need to define PNG_USE_DLL here, because it's default for Cygwin.
+        ELSE(BUILD_SHARED_LIBS)
+          SET (PNG_DEFINITIONS -DPNG_STATIC)
+        ENDIF(BUILD_SHARED_LIBS)
+      ENDIF (CYGWIN)
+
+  ENDIF (PNG_LIBRARY AND PNG_PNG_INCLUDE_DIR)
+
+ENDIF(ZLIB_FOUND)
+
+IF (PNG_FOUND)
+  IF (NOT PNG_FIND_QUIETLY)
+    MESSAGE(STATUS "Found PNG: ${PNG_LIBRARY}")
+  ENDIF (NOT PNG_FIND_QUIETLY)
+ELSE (PNG_FOUND)
+  IF (PNG_FIND_REQUIRED)
+    MESSAGE(FATAL_ERROR "Could not find PNG library")
+  ENDIF (PNG_FIND_REQUIRED)
+ENDIF (PNG_FOUND)
+
+MARK_AS_ADVANCED(PNG_PNG_INCLUDE_DIR PNG_LIBRARY )

File cmake/modules/FindPTHREAD.cmake

+#############################################################################
+#
+# $Id$
+#
+# Copyright (C) 1998-2006 Inria. All rights reserved.
+#
+# This software was developed at:
+# IRISA/INRIA Rennes
+# Projet Lagadic
+# Campus Universitaire de Beaulieu
+# 35042 Rennes Cedex
+# http://www.irisa.fr/lagadic
+#
+# This file is part of the ViSP toolkit.
+#
+# This file may be distributed under the terms of the Q Public License
+# as defined by Trolltech AS of Norway and appearing in the file
+# LICENSE included in the packaging of this file.
+#
+# Licensees holding valid ViSP Professional Edition licenses may
+# use this file in accordance with the ViSP Commercial License
+# Agreement provided with the Software.
+#
+# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+#
+# Contact visp@irisa.fr if any conditions of this licensing are
+# not clear to you.
+#
+# Description:
+# Try to find pthread library.
+# Once run this will define:
+#
+# PTHREAD_FOUND
+# PTHREAD_INCLUDE_DIR
+# PTHREAD_LIBRARIES
+#
+# Authors:
+# Fabien Spindler
+#
+#############################################################################
+
+#IF(NOT UNIX AND NOT WIN32)
+#  SET(PTHREAD_FOUND FALSE)
+#ELSE(NOT UNIX AND NOT WIN32)
+
+  FIND_PATH(PTHREAD_INCLUDE_DIR pthread.h
+    /usr/include
+    $ENV{PTHREAD_INCLUDE_PATH}
+    )
+  #MESSAGE("DBG PTHREAD_INCLUDE_DIR=${PTHREAD_INCLUDE_DIR}")
+
+  # pthreadVSE pthreadGCE pthreadGC pthreadVC1 pthreadVC2 are comming from web
+  FIND_LIBRARY(PTHREAD_LIBRARY
+    NAMES pthread pthreadGC2 pthreadVSE pthreadGCE pthreadGC pthreadVC1 pthreadVC2
+    PATHS
+    /usr/lib64
+    /usr/lib
+    /usr/local/lib
+    /lib
+    /lib64
+    $ENV{PTHREAD_LIBRARY_PATH}
+    )
+
+  #MESSAGE(STATUS "DBG PTHREAD_LIBRARY=${PTHREAD_LIBRARY}")
+
+  ## --------------------------------
+
+  IF(PTHREAD_LIBRARY)
+    SET(PTHREAD_LIBRARIES ${PTHREAD_LIBRARY})
+  ELSE(PTHREAD_LIBRARY)
+    #MESSAGE(SEND_ERROR "pthread library not found.")
+  ENDIF(PTHREAD_LIBRARY)
+
+  IF(NOT PTHREAD_INCLUDE_DIR)
+    #MESSAGE(SEND_ERROR "pthread include dir not found.")
+  ENDIF(NOT PTHREAD_INCLUDE_DIR)
+
+  IF(PTHREAD_LIBRARIES AND PTHREAD_INCLUDE_DIR)
+    SET(PTHREAD_FOUND TRUE)
+    SET(HAVE_PTHREAD 1)
+  ELSE(PTHREAD_LIBRARIES AND PTHREAD_INCLUDE_DIR)
+    SET(PTHREAD_FOUND FALSE)
+  ENDIF(PTHREAD_LIBRARIES AND PTHREAD_INCLUDE_DIR)
+
+  #MARK_AS_ADVANCED(
+  #  PTHREAD_INCLUDE_DIR
+  #  PTHREAD_LIBRARIES
+  #  )
+  MESSAGE(STATUS "PTHREAD_FOUND: ${PTHREAD_FOUND}")
+
+#ENDIF(NOT UNIX AND NOT WIN32)

File cmake/modules/FindXPM.cmake

+# - Find the native PNG includes and library
+#
+
+# This module defines
+#  XPM_INCLUDE_DIR, where to find png.h, etc.
+#  XPM_LIBRARIES, the libraries to link against to use PNG.
+#  XPM_DEFINITIONS - You should ADD_DEFINITONS(${PNG_DEFINITIONS}) before compiling code that includes png library files.
+#  XPM_FOUND, If false, do not try to use PNG.
+# also defined, but not for general use are
+#  XPM_LIBRARY, where to find the PNG library.
+# None of the above will be defined unles zlib can be found.
+# PNG depends on Zlib
+#
+# Copyright (c) 2002 Kitware, Inc., Insight Consortium.  All rights reserved.
+# See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
+
+
+INCLUDE(FindZLIB)
+
+SET(XPM_FOUND "NO")
+
+FIND_PATH(XPM_XPM_INCLUDE_DIR xpm.h
+/usr/local/include/X11
+/usr/include/X11
+)
+
+SET(XPM_NAMES ${XPM_NAMES} Xpm libXpm)
+FIND_LIBRARY(XPM_LIBRARY
+ NAMES ${XPM_NAMES}
+ PATHS /usr/lib64 /usr/lib /usr/local/lib
+)
+
+IF (XPM_LIBRARY AND XPM_XPM_INCLUDE_DIR)
+	SET(XPM_INCLUDE_DIR ${XPM_XPM_INCLUDE_DIR})
+	SET(XPM_LIBRARIES ${XPM_LIBRARY})
+	SET(XPM_FOUND "YES")
+
+	IF (CYGWIN)
+	  IF(BUILD_SHARED_LIBS)
+		  # No need to define XPM_USE_DLL here, because it's default for Cygwin.
+	  ELSE(BUILD_SHARED_LIBS)
+		 SET (XPM_DEFINITIONS -DXPM_STATIC)
+	  ENDIF(BUILD_SHARED_LIBS)
+	ENDIF (CYGWIN)
+ENDIF (XPM_LIBRARY AND XPM_XPM_INCLUDE_DIR)
+
+IF (XPM_FOUND)
+  IF (NOT XPM_FIND_QUIETLY)
+    MESSAGE(STATUS "Found XPM: ${XPM_LIBRARY}")
+  ENDIF (NOT XPM_FIND_QUIETLY)
+ELSE (XPM_FOUND)
+  IF (XPM_FIND_REQUIRED)
+    MESSAGE(FATAL_ERROR "Could not find XPM library")
+  ENDIF (XPM_FIND_REQUIRED)
+ENDIF (XPM_FOUND)
+
+MARK_AS_ADVANCED(XPM_XPM_INCLUDE_DIR XPM_LIBRARY )

File cmake/modules/TestForHighBitCharacters.c

+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+     (('a' <= (c) && (c) <= 'i') \
+	 || ('j' <= (c) && (c) <= 'r') \
+	 || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+  main ()
+{
+   int i;
+   for (i = 0; i < 256; i++)
+     if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i))
+       exit(1);
+   exit (0);
+}

File cmake/modules/TestForHighBitCharacters.cmake

+# cmake/modules/TestForHighBitCharacters.cmake
+#
+# Copyright (C) 2006  Alan W. Irwin
+#
+# This file is part of PLplot.
+#
+# PLplot is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Library General Public License as published
+# by the Free Software Foundation; version 2 of the License.
+#
+# PLplot is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with the file PLplot; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+
+# Check if ctype.h macros work on characters with the high bit set.
+if(NOT DEFINED CMAKE_HIGH_BIT_CHARACTERS)
+   message(STATUS 
+      "Check for whether ctype.h macros work on characters with the\n"
+   "   high bit set."
+   )
+  try_compile(CMAKE_HIGH_BIT_CHARACTERS  
+    ${CMAKE_BINARY_DIR}
+    ${CMAKE_SOURCE_DIR}/CMakeModules/TestForHighBitCharacters.c
+    OUTPUT_VARIABLE OUTPUT)
+  if(CMAKE_HIGH_BIT_CHARACTERS)
+    message(STATUS "High-bit characters - work")
+    set(HIGH_BIT_CHARACTERS 1 CACHE INTERNAL
+      "Do ctype.h macros work on high-bit characters")
+      file(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
+      "Determining if ctype.h macros work on high-bit characters passed with "
+      "the following output:\n${OUTPUT}\n\n")
+  else(CMAKE_HIGH_BIT_CHARACTERS)
+    message(STATUS "High-bit characters - don't work")
+    set(HIGH_BIT_CHARACTERS 0 CACHE INTERNAL
+      "Do ctype.h macros work on high-bit characters")
+      file(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
+      "Determining if ctype.h macros work on high-bit characters failed with "
+      "the following output:\n${OUTPUT}\n\n")
+  endif(CMAKE_HIGH_BIT_CHARACTERS)
+endif(NOT DEFINED CMAKE_HIGH_BIT_CHARACTERS)

File cmake/modules/TestForStandardHeaderwait.cmake

+# cmake/modules/CheckHEADER_SYS_WAIT.cmake
+#
+# Copyright (C) 2006  Alan W. Irwin
+#
+# This file is part of PLplot.
+#
+# PLplot is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Library General Public License as published
+# by the Free Software Foundation; version 2 of the License.
+#
+# PLplot is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with the file PLplot; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+
+#
+# - Check for sys/wait.h that is POSIX.1 compatible following autotools
+#   AC_HEADER_SYS_WAIT
+
+include(CheckCSourceCompiles)
+
+set(_CHECK_HEADER_SYS_WAIT_SOURCE_CODE "
+#include <sys/types.h>
+#include <sys/wait.h>
+#ifndef WEXITSTATUS
+# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
+#endif
+#ifndef WIFEXITED
+# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
+#endif
+int
+main ()
+{
+  int s;
+  wait (&s);
+  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
+  ;
+  return 0;
+}
+")
+check_c_source_compiles(
+"${_CHECK_HEADER_SYS_WAIT_SOURCE_CODE}"
+HAVE_SYS_WAIT_H)

File cmake/modules/gd.cmake

+option(BUILD_TEST "Compile examples in the build tree and enable ctest" OFF)

File netware/Makefile

+#################################################################
+#
+## Makefile for building libgd.nlm (NetWare version - gnu make)
+## Use: make -f Makefile
+##
+## Comments to: Guenter Knauf <eflash@gmx.net>
+##
+## $Id$
+#
+#################################################################
+
+# Edit the path below to point to the base of your Novell NDK.
+ifndef NDKBASE