1dnl 2dnl Process this file with autoconf to produce a configure script. 3dnl 4 5#-------------------------------------------------------------------- 6# Configure script for package 'tkimgpcx', as distributed at November 20, 2001. 7# TEA compliant. 8#-------------------------------------------------------------------- 9 10AC_INIT([tkimgpcx],[1.4.12]) 11 12TEA_INIT([3.9]) 13 14AC_CONFIG_AUX_DIR(../tclconfig) 15 16PHIMGTYPE="pcx" 17CPACKAGE="Tkimgpcx" 18PACKAGE_TCLNAME="img::pcx" 19AC_SUBST(PHIMGTYPE) 20AC_SUBST(PACKAGE_TCLNAME) 21 22#-------------------------------------------------------------------- 23# Load the tclConfig.sh file 24# Load the tkConfig.sh file 25#-------------------------------------------------------------------- 26 27TEA_PATH_TCLCONFIG 28TEA_LOAD_TCLCONFIG 29 30TEA_PATH_TKCONFIG 31TEA_LOAD_TKCONFIG 32 33#----------------------------------------------------------------------- 34# Handle the --prefix=... option by defaulting to what Tcl gave. 35# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER. 36#----------------------------------------------------------------------- 37 38TEA_PREFIX 39 40#----------------------------------------------------------------------- 41# Standard compiler checks. 42# This sets up CC by using the CC env var, or looks for gcc otherwise. 43# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create 44# the basic setup necessary to compile executables. 45#----------------------------------------------------------------------- 46 47TEA_SETUP_COMPILER 48 49TEA_PATH_CONFIG(tkimg) 50TEA_LOAD_CONFIG(tkimg) 51 52IMG_SRCPATH(tkimg) 53 54#----------------------------------------------------------------------- 55# Specify the C source files to compile in TEA_ADD_SOURCES, 56# public headers that need to be installed in TEA_ADD_HEADERS, 57# stub library C source files to compile in TEA_ADD_STUB_SOURCES, 58# and runtime Tcl library files in TEA_ADD_TCL_SOURCES. 59# This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS 60# and PKG_TCL_SOURCES. 61#----------------------------------------------------------------------- 62 63TEA_ADD_SOURCES([pcx.c]) 64TEA_ADD_HEADERS([]) 65TEA_ADD_INCLUDES([-I\"`\${CYGPATH} \${tkimg_SRC_PATH}`\"]) 66TEA_ADD_INCLUDES([-I.]) 67TEA_ADD_LIBS([]) 68TEA_ADD_CFLAGS([]) 69TEA_ADD_CFLAGS([-DTKIMG_VERSION=\\\"\${tkimg_VERSION}\\\"]) 70TEA_ADD_STUB_SOURCES([]) 71TEA_ADD_TCL_SOURCES([]) 72 73PUP="`echo ${PACKAGE_NAME}| tr 'a-z' 'A-Z'`" 74 75sed < "`${CYGPATH} ${srcdir}/../init.c`" > "init.c" \ 76 -e "s/@CPACKAGE@/${CPACKAGE}/" \ 77 -e "s/%PACKAGE%/${PACKAGE_NAME}/" \ 78 -e "s/%PACKAGE_UP%/${PUP}/" \ 79 -e "s/%PHIMGTYPE%/${PHIMGTYPE}/" 80 81# init.c is an included source file, not a source by itself 82# FUTURE: Do this through AC_OUTPUT!! 83 84#-------------------------------------------------------------------- 85# __CHANGE__ 86# Choose which headers you need. Extension authors should try very 87# hard to only rely on the Tcl public header files. Internal headers 88# contain private data structures and are subject to change without 89# notice. 90# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG 91#-------------------------------------------------------------------- 92 93TEA_PUBLIC_TCL_HEADERS 94TEA_PUBLIC_TK_HEADERS 95 96#-------------------------------------------------------------------- 97# A few miscellaneous platform-specific items: 98# 99# Windows creates a few extra files that need to be cleaned up. 100# We can add more files to clean if our extension creates any extra 101# files in the future. 102# 103# Define any extra compiler flags in the PACKAGE_CFLAGS variable. 104# These will be appended to the current set of compiler flags for 105# your system. 106#-------------------------------------------------------------------- 107 108if test "${TEA_PLATFORM}" = "windows" ; then 109 CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch" 110fi 111AC_SUBST(CLEANFILES) 112 113#-------------------------------------------------------------------- 114# Check whether --enable-threads or --disable-threads was given. 115# So far only Tcl responds to this one. 116#-------------------------------------------------------------------- 117 118TEA_ENABLE_THREADS 119 120#-------------------------------------------------------------------- 121# The statement below defines a collection of symbols related to 122# building as a shared library instead of a static library. 123#-------------------------------------------------------------------- 124 125TEA_ENABLE_SHARED 126 127#-------------------------------------------------------------------- 128# This macro figures out what flags to use with the compiler/linker 129# when building shared/static debug/optimized objects. This information 130# can be taken from the tclConfig.sh file, but this figures it all out. 131#-------------------------------------------------------------------- 132 133TEA_CONFIG_CFLAGS 134 135#-------------------------------------------------------------------- 136# Set the default compiler switches based on the --enable-symbols option. 137#-------------------------------------------------------------------- 138 139TEA_ENABLE_SYMBOLS 140 141#-------------------------------------------------------------------- 142# For Unix/Tk builds, make sure that the X libraries/headers are found. 143# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS. 144#-------------------------------------------------------------------- 145 146TEA_PATH_X 147 148#-------------------------------------------------------------------- 149# Everyone should be linking against the Tcl stub library. If you 150# can't for some reason, remove this definition. If you aren't using 151# stubs, you also need to modify the SHLIB_LD_LIBS setting below to 152# link against the non-stubbed Tcl library. 153#-------------------------------------------------------------------- 154 155AC_DEFINE(USE_TCL_STUBS) 156AC_DEFINE(USE_TK_STUBS) 157 158#-------------------------------------------------------------------- 159# This macro generates a line to use when building a library. It 160# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS, 161# and TEA_LOAD_TCLCONFIG macros above. 162#-------------------------------------------------------------------- 163 164TEA_MAKE_LIB 165 166#-------------------------------------------------------------------- 167# __CHANGE__ 168# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary. 169#-------------------------------------------------------------------- 170 171if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then 172 TEA_ADD_LIBS([\"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\"]) 173else 174 TEA_ADD_LIBS([${tkimg_STUB_LIB_SPEC}]) 175fi 176 177#-------------------------------------------------------------------- 178# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl 179# file during the install process. Don't run the TCLSH_PROG through 180# ${CYGPATH} because it's being used directly by make. 181# Require that we use a tclsh shell version 8.2 or later since earlier 182# versions have bugs in the pkg_mkIndex routine. 183# Add WISH as well if this is a Tk extension. 184#-------------------------------------------------------------------- 185 186TEA_PROG_TCLSH 187TEA_PROG_WISH 188 189#-------------------------------------------------------------------- 190# Finally, substitute all of the various values into the Makefile. 191# You may alternatively have a special pkgIndex.tcl.in or other files 192# which require substituting th AC variables in. Include these here. 193#-------------------------------------------------------------------- 194 195AC_OUTPUT([Makefile]) 196 197#-------------------------------------------------------------------- 198