GraphicsMagick: TclMagick: Modernize Autotools files, support a ...
GraphicsMagick Commits <[email protected]> Thu, 19 Sep 2024 08:30:29 -0500
| Newsgroups | gmane.comp.video.graphicsmagick.cvs |
|---|---|
| Message-ID | <mailman.22055.1726752645.8001.graphicsmagick-commit@lists.sourceforge.net> |
changeset b0eb6472de6c in /hg/GraphicsMagick details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=b0eb6472de6c summary: TclMagick: Modernize Autotools files, support a configuration header. diffstat: .hgignore | 1 + ChangeLog | 9 + TclMagick/Makefile.am | 13 + TclMagick/Makefile.in | 16 +- TclMagick/configure | 331 ++++++++++++++++++++------------ TclMagick/configure.ac | 47 ++- TclMagick/generic/Makefile.in | 55 +++- TclMagick/generic/config.h.in | 177 +++++++++++++++++ TclMagick/generic/libttkcommon.h | 5 + VisualMagick/installer/inc/version.isx | 4 +- magick/version.h | 4 +- www/ChangeLog.html | 9 + 12 files changed, 503 insertions(+), 168 deletions(-) diffs (truncated from 1011 to 500 lines): diff -r e7cf7378d1d4 -r b0eb6472de6c .hgignore --- a/.hgignore Sun Sep 15 17:04:56 2024 -0500 +++ b/.hgignore Thu Sep 19 08:29:31 2024 -0500 @@ -101,6 +101,7 @@ ^TclMagick/Makefile ^TclMagick/autom4te.cache ^TclMagick/generic/Makefile +^TclMagick/generic/pkgIndex.tcl ^TclMagick/libtool ^TclMagick/tmp/ ^Makefile diff -r e7cf7378d1d4 -r b0eb6472de6c ChangeLog --- a/ChangeLog Sun Sep 15 17:04:56 2024 -0500 +++ b/ChangeLog Thu Sep 19 08:29:31 2024 -0500 @@ -1,3 +1,12 @@ +2024-09-19 Bob Friesenhahn <[email protected]> + + * TclMagick/generic/config.h.in, TclMagick/generic/libttkcommon.h: + Support a configuration header. + + * TclMagick/configure.ac: Modernize Autoconf files. + + * TclMagick/Makefile.am: Modernize Automake files. + 2024-09-15 Bob Friesenhahn <[email protected]> * TclMagick/generic/TclMagick.c: Fix several typos which will diff -r e7cf7378d1d4 -r b0eb6472de6c TclMagick/Makefile.am --- a/TclMagick/Makefile.am Sun Sep 15 17:04:56 2024 -0500 +++ b/TclMagick/Makefile.am Thu Sep 19 08:29:31 2024 -0500 @@ -5,9 +5,22 @@ EXTRA_DIST=LICENSE tests images doc pkgIndex.tcl SUBDIRS = generic +TCLSH_ENV = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` +PKG_ENV = @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \ + PATH="$(EXTRA_PATH):$(PATH)" \ + TCLLIBPATH="$(TCLLIBPATH)" + +TCLSH = $(TCLSH_ENV) $(PKG_ENV) $(TCLSH_PROG) + + install-data-local: $(mkinstalldirs) $(DESTDIR)@libdir@/TclMagick@VERSION@ $(INSTALL_DATA) $(top_srcdir)/pkgIndex.tcl $(DESTDIR)@libdir@/TclMagick@VERSION@ uninstall-local: rm -v $(DESTDIR)@libdir@/TclMagick@VERSION@/pkgIndex.tcl + +test: + cd generic && $(TCLSH) `@CYGPATH@ $(srcdir)/tests/test-wand.tcl` $(TESTFLAGS) \ + -load "package ifneeded $(PACKAGE_NAME)3 $(PACKAGE_VERSION) \ + [list load `@CYGPATH@ $(PKG_LIB_FILE)` [string totitle $(PACKAGE_NAME)3]]" diff -r e7cf7378d1d4 -r b0eb6472de6c TclMagick/Makefile.in --- a/TclMagick/Makefile.in Sun Sep 15 17:04:56 2024 -0500 +++ b/TclMagick/Makefile.in Thu Sep 19 08:29:31 2024 -0500 @@ -102,6 +102,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/generic/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -166,8 +167,8 @@ $(top_srcdir)/unix/config/missing AUTHORS COPYING ChangeLog \ INSTALL NEWS README unix/config/compile \ unix/config/config.guess unix/config/config.sub \ - unix/config/install-sh unix/config/ltmain.sh \ - unix/config/missing + unix/config/depcomp unix/config/install-sh \ + unix/config/ltmain.sh unix/config/missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -408,6 +409,12 @@ AM_DISTCHECK_CONFIGURE_FLAGS = --with-tcl=${TCL_BIN_DIR} --with-tk=${TK_BIN_DIR} --with-magick=${wand_config} --exec-prefix=${prefix} EXTRA_DIST = LICENSE tests images doc pkgIndex.tcl SUBDIRS = generic +TCLSH_ENV = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` +PKG_ENV = @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \ + PATH="$(EXTRA_PATH):$(PATH)" \ + TCLLIBPATH="$(TCLLIBPATH)" + +TCLSH = $(TCLSH_ENV) $(PKG_ENV) $(TCLSH_PROG) all: all-recursive .SUFFIXES: @@ -889,6 +896,11 @@ uninstall-local: rm -v $(DESTDIR)@libdir@/TclMagick@VERSION@/pkgIndex.tcl +test: + cd generic && $(TCLSH) `@CYGPATH@ $(srcdir)/tests/test-wand.tcl` $(TESTFLAGS) \ + -load "package ifneeded $(PACKAGE_NAME)3 $(PACKAGE_VERSION) \ + [list load `@CYGPATH@ $(PKG_LIB_FILE)` [string totitle $(PACKAGE_NAME)3]]" + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff -r e7cf7378d1d4 -r b0eb6472de6c TclMagick/configure --- a/TclMagick/configure Sun Sep 15 17:04:56 2024 -0500 +++ b/TclMagick/configure Thu Sep 19 08:29:31 2024 -0500 @@ -1547,7 +1547,7 @@ --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified). - --with-magick location of Graphics/MagickWand-config script + --with-magick location of GraphicsMagick-config script --with-tcl directory containing tcl configuration (tclConfig.sh) --with-tcl8 Compile for Tcl8 in Tcl9 environment @@ -2695,6 +2695,11 @@ # Directory where autotools helper scripts lives. +# Generate configure header. +ac_config_headers="$ac_config_headers generic/config.h" + + +# Initalize Automake am__api_version='1.16' @@ -3384,6 +3389,7 @@ AM_BACKSLASH='\' +# Configure for the compiler @@ -4633,6 +4639,8 @@ fi + +# Initialize libtool case `pwd` in *\ * | *\ *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 @@ -12857,84 +12865,6 @@ fi -# Autoupdate added the next two lines to ensure that your configure -# script's behavior did not change. They are probably safe to remove. - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -printf %s "checking for egrep... " >&6; } -if test ${ac_cv_path_EGREP+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in egrep - do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - printf %s 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - printf "%s\n" 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -printf "%s\n" "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - - - # Check whether --with-magick was given. @@ -12959,7 +12889,7 @@ fi if test x"${wand_config}" = x then - for ac_prog in GraphicsMagickWand-config MagickWand-config + for ac_prog in GraphicsMagickWand-config do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -13012,13 +12942,13 @@ fi if test x"${wand_config}" = x then - as_fn_error $? "Please specify the Graphics/ImageMagick-config script with --with-magick!" "$LINENO" 5 + as_fn_error $? "Please specify the GraphicsMagickWand-config script with --with-magick!" "$LINENO" 5 fi PATH=$PATH:`dirname ${wand_config}` export PATH -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Graphics/ImageMagick Wand configuration script" >&5 -printf %s "checking for Graphics/ImageMagick Wand configuration script... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GraphicsMagick Wand configuration script" >&5 +printf %s "checking for GraphicsMagick Wand configuration script... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${wand_config}" >&5 printf "%s\n" "${wand_config}" >&6; } GM_CPPFLAGS=`${wand_config} --cppflags` @@ -18706,9 +18636,9 @@ - ac_config_files="$ac_config_files Makefile generic/Makefile generic/pkgIndex.tcl" + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -18799,43 +18729,7 @@ # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -# -# If the first sed substitution is executed (which looks for macros that -# take arguments), then branch to the quote section. Otherwise, -# look for a macro that doesn't take arguments. -ac_script=' -:mline -/\\$/{ - N - s,\\\n,, - b mline -} -t clear -:clear -s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g -t quote -s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g -t quote -b any -:quote -s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g -s/\[/\\&/g -s/\]/\\&/g -s/\$/$$/g -H -:any -${ - g - s/^\n// - s/\n/ /g - p -} -' -DEFS=`sed -n "$ac_script" confdefs.h` - +DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= @@ -19296,11 +19190,15 @@ "*) set x $ac_config_files; shift; ac_config_files=$*;; esac +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" +config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF @@ -19322,10 +19220,15 @@ --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE Configuration files: $config_files +Configuration headers: +$config_headers + Configuration commands: $config_commands @@ -19394,7 +19297,18 @@ esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; - --he | --h | --help | --hel | -h ) + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_HEADERS " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; + --help | --hel | -h ) printf "%s\n" "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) @@ -19740,6 +19654,7 @@ for ac_config_target in $ac_config_targets do case $ac_config_target in + "generic/config.h") CONFIG_HEADERS="$CONFIG_HEADERS generic/config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; @@ -19757,6 +19672,7 @@ # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files + test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands fi @@ -19945,8 +19861,116 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" - -eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS" +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$ac_tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' <confdefs.h | sed ' +s/'"$ac_delim"'/"\\\ +"/g' >>$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do @@ -20165,7 +20189,64 @@ esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; -