1#!/bin/bash -norc 2dnl This file is an input file used by the GNU "autoconf" program to 3dnl generate the file "configure", which is run during Tcl installation 4dnl to configure the system for the local environment. 5# 6AC_INIT(TclMagick, 0.46) 7 8# Specify directory where m4 macros may be found. 9AC_CONFIG_MACRO_DIR([unix/m4]) 10 11# Directory where autotools helper scripts lives. 12AC_CONFIG_AUX_DIR([unix/config]) 13 14AM_INIT_AUTOMAKE 15 16# Add configure option --enable-maintainer-mode which enables dependency 17# checking and generation useful to package maintainers. This is made an 18# option to avoid confusing end users. 19AM_MAINTAINER_MODE 20 21# Enable support for silent build rules 22AM_SILENT_RULES 23 24AC_PROG_CC 25AC_PROG_LIBTOOL 26AC_ISC_POSIX 27AC_HEADER_STDC([]) 28 29 30dnl Allow the user to specify the GraphicsMagick or ImageMagick config 31dnl script to use. 32AC_ARG_WITH(magick, [ --with-magick location of Graphics/MagickWand-config script], with_magick=${withval}) 33 34dnl First check to see if --with-magick-config was specified. 35GM_CPPFLAGS='' 36GM_LDFLAGS='' 37GM_LIBS='' 38wand_config='' 39if test x"${with_magick}" != x 40then 41 if test -x "${with_magick}" 42 then 43 wand_config=${with_magick} 44 else 45 AC_MSG_ERROR([${with_magick} is not an executable file]) 46 fi 47fi 48if test x"${wand_config}" = x 49then 50 AC_PATH_PROGS(wand_config,[GraphicsMagickWand-config MagickWand-config],,) 51fi 52if test x"${wand_config}" = x 53then 54 AC_MSG_ERROR([Please specify the Graphics/ImageMagick-config script with --with-magick!]) 55fi 56 57dnl It actually calls another script, so the PATH needs to be set. 58PATH=$PATH:`dirname ${wand_config}` 59export PATH 60AC_MSG_CHECKING([for Graphics/ImageMagick Wand configuration script]) 61AC_MSG_RESULT(${wand_config}) 62GM_CPPFLAGS=`${wand_config} --cppflags` 63AC_SUBST(GM_CPPFLAGS) 64GM_LDFLAGS=`${wand_config} --ldflags` 65AC_SUBST(GM_LDFLAGS) 66GM_LIBS=`${wand_config} --libs` 67AC_SUBST(GM_LIBS) 68 69CPPFLAGS_SAVE=$CPPFLAGS 70LDFLAGS_SAVE=$LDFLAGS 71LIBS_SAVE=$LIBS 72CPPFLAGS="$CPPFLAGS $GM_CPPFLAGS" 73LDFLAGS="$LDFLAGS $GM_LDFLAGS" 74LIBS="$GM_LIBS $LIBS" 75AC_CHECK_FUNCS([MagickSetImageFormat]) 76CPPFLAGS=$CPPFLAGS_SAVE 77LDFLAGS=$LDFLAGS_SAVE 78LIBS=$LIBS_SAVE 79 80TEA_INIT([3.10]) 81 82TEA_PATH_TCLCONFIG 83TEA_LOAD_TCLCONFIG 84 85TEA_PATH_TKCONFIG 86TEA_LOAD_TKCONFIG 87 88TEA_PREFIX 89 90TEA_SETUP_COMPILER 91 92TEA_ADD_HEADERS([]) 93TEA_ADD_INCLUDES([]) 94TEA_ADD_LIBS([]) 95TEA_ADD_CFLAGS([]) 96TEA_ADD_STUB_SOURCES([]) 97TEA_ADD_TCL_SOURCES([]) 98 99TEA_PUBLIC_TCL_HEADERS 100TEA_PUBLIC_TK_HEADERS 101 102TEA_ENABLE_THREADS 103 104TEA_ENABLE_SHARED 105 106TEA_CONFIG_CFLAGS 107 108AC_DEFINE(USE_TCL_STUBS) 109AC_DEFINE(USE_TK_STUBS) 110 111TEA_MAKE_LIB 112 113TEA_PROG_TCLSH 114TEA_PROG_WISH 115 116 117AC_OUTPUT([ 118Makefile 119generic/Makefile 120]) 121