diff --git a/Makefile.in b/Makefile.in index 96e199b60b..6e01ccd1c5 100644 --- a/Makefile.in +++ b/Makefile.in @@ -281,7 +281,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_func_fseeko.m4 \ $(top_srcdir)/m4/ax_prog_perl_version.m4 \ $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/ax_require_defined.m4 \ - $(top_srcdir)/m4/cxx_have_std_libs.m4 \ $(top_srcdir)/m4/framework.m4 \ $(top_srcdir)/m4/ld-version-script.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -3242,6 +3241,7 @@ PRTDIAG = @PRTDIAG@ PSDelegate = @PSDelegate@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_CXX = @PTHREAD_CXX@ PTHREAD_LIBS = @PTHREAD_LIBS@ PrintDelegate = @PrintDelegate@ QUANTUM_DEPTH = @QUANTUM_DEPTH@ diff --git a/aclocal.m4 b/aclocal.m4 index eb03b7d8ef..10de731ae6 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1285,7 +1285,6 @@ m4_include([m4/ax_prepend_flag.m4]) m4_include([m4/ax_prog_perl_version.m4]) m4_include([m4/ax_pthread.m4]) m4_include([m4/ax_require_defined.m4]) -m4_include([m4/cxx_have_std_libs.m4]) m4_include([m4/framework.m4]) m4_include([m4/ld-version-script.m4]) m4_include([m4/libtool.m4]) diff --git a/config/config.h.in b/config/config.h.in index 4b821f647d..3c53c27cf5 100644 --- a/config/config.h.in +++ b/config/config.h.in @@ -272,9 +272,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H -/* Define if you have Linux-compatible sendfile() */ -#undef HAVE_LINUX_SENDFILE - /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_UNISTD_H @@ -475,9 +472,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H -/* define if the compiler supports ISO C++ standard library */ -#undef HAVE_STD_LIBS - /* Define to 1 if you have the `strcasecmp' function. */ #undef HAVE_STRCASECMP @@ -951,10 +945,6 @@ /* Define if you have TIFF library */ #undef TIFF_DELEGATE -/* Define to 1 if you can safely include both and . This - macro is obsolete. */ -#undef TIME_WITH_SYS_TIME - /* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME @@ -1127,9 +1117,6 @@ # undef __CHAR_UNSIGNED__ #endif -/* Define to appropriate substitute if compiler does not have __func__ */ -#undef __func__ - /* Define to empty if `const' does not conform to ANSI C. */ #undef const diff --git a/configure b/configure index 625dee8067..b331150bff 100755 --- a/configure +++ b/configure @@ -992,6 +992,7 @@ OPENMP_CFLAGS THREAD_LIBS PTHREAD_CFLAGS PTHREAD_LIBS +PTHREAD_CXX PTHREAD_CC ax_pthread_config pkgconfigdir @@ -4000,7 +4001,6 @@ main (int argc, char **argv) } " -as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H" as_fn_append ac_header_c_list " sys/param.h sys_param_h HAVE_SYS_PARAM_H" as_fn_append ac_func_c_list " getpagesize HAVE_GETPAGESIZE" as_fn_append ac_header_c_list " vfork.h vfork_h HAVE_VFORK_H" @@ -4304,8 +4304,6 @@ test -n "$target_alias" && NONENONEs,x,x, && program_prefix=${target_alias}- - - am__api_version='1.16' @@ -5127,7 +5125,7 @@ MAGICK_PATCHLEVEL_VERSION=49 MAGICK_VERSION=6.9.12-49 -MAGICK_GIT_REVISION=21ffed7d9:20220510 +MAGICK_GIT_REVISION=281f3b20c:20220511 # Substitute library versioning @@ -5161,7 +5159,7 @@ PACKAGE_LIB_VERSION=0x69C PACKAGE_LIB_VERSION_NUMBER=6,9,12,49 -PACKAGE_RELEASE_DATE=2022-05-10 +PACKAGE_RELEASE_DATE=2022-05-11 # Ensure that make can run correctly @@ -8520,120 +8518,6 @@ with_gnu_ld=$lt_cv_prog_gnu_ld -# Check whether --with-gnu-ld was given. -if test ${with_gnu_ld+y} -then : - withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes -else $as_nop - with_gnu_ld=no -fi - -ac_prog=ld -if test yes = "$GCC"; then - # Check if gcc -print-prog-name=ld gives a path. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -printf %s "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return, which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD=$ac_prog - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test yes = "$with_gnu_ld"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -printf %s "checking for GNU ld... " >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -printf %s "checking for non-GNU ld... " >&6; } -fi -if test ${lt_cv_path_LD+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -z "$LD"; then - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD=$ac_dir/$ac_prog - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -printf "%s\n" "$LD" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -printf %s "checking if the linker ($LD) is GNU ld... " >&6; } -if test ${lt_cv_prog_gnu_ld+y} -then : - printf %s "(cached) " >&6 -else $as_nop - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler vendor" >&5 printf %s "checking for C compiler vendor... " >&6; } if test ${ax_cv_c_compiler_vendor+y} @@ -10003,6 +9887,10 @@ if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then if test "x$PTHREAD_CC" != "x" then : CC="$PTHREAD_CC" +fi + if test "x$PTHREAD_CXX" != "x" +then : + CXX="$PTHREAD_CXX" fi CFLAGS="$CFLAGS $PTHREAD_CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" @@ -10408,7 +10296,7 @@ else $as_nop # step ax_pthread_save_ac_link="$ac_link" ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' - ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"` + ax_pthread_link_step=`printf "%s\n" "$ac_link" | sed "$ax_pthread_sed"` ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" ax_pthread_save_CFLAGS="$CFLAGS" for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do @@ -10585,12 +10473,22 @@ fi #handle absolute path differently from PATH based program lookup case "x$CC" in #( x/*) : - if as_fn_executable_p ${CC}_r + + if as_fn_executable_p ${CC}_r then : PTHREAD_CC="${CC}_r" -fi ;; #( +fi + if test "x${CXX}" != "x" +then : + if as_fn_executable_p ${CXX}_r +then : + PTHREAD_CXX="${CXX}_r" +fi +fi + ;; #( *) : - for ac_prog in ${CC}_r + + for ac_prog in ${CC}_r do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -10637,8 +10535,62 @@ fi test -n "$PTHREAD_CC" && break done test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" - ;; -esac ;; #( + + if test "x${CXX}" != "x" +then : + for ac_prog in ${CXX}_r +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_PTHREAD_CXX+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$PTHREAD_CXX"; then + ac_cv_prog_PTHREAD_CXX="$PTHREAD_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_PTHREAD_CXX="$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +PTHREAD_CXX=$ac_cv_prog_PTHREAD_CXX +if test -n "$PTHREAD_CXX"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CXX" >&5 +printf "%s\n" "$PTHREAD_CXX" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + test -n "$PTHREAD_CXX" && break +done +test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX" + +fi + + ;; +esac + ;; #( *) : ;; esac @@ -10648,6 +10600,8 @@ esac fi test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" +test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX" + @@ -11339,52 +11293,23 @@ fi # Check for sendfile support # ######## -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Linux compatible sendfile()" >&5 -printf %s "checking Linux compatible sendfile()... " >&6; } -if test ${ac_cv_have_linux_sendfile+y} -then : - printf %s "(cached) " >&6 -else $as_nop - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #undef _FILE_OFFSET_BITS - #include - #include - #include - -int -main (void) -{ - - sendfile(0, 0, (void *) 0, 0); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - - ac_cv_have_linux_sendfile=yes - -else $as_nop - - ac_cv_have_linux_sendfile=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_linux_sendfile" >&5 -printf "%s\n" "$ac_cv_have_linux_sendfile" >&6; } -if test $ac_cv_have_linux_sendfile = yes; then - -printf "%s\n" "#define HAVE_LINUX_SENDFILE 1" >>confdefs.h - -fi +#AC_CACHE_CHECK([Linux compatible sendfile()],ac_cv_have_linux_sendfile,[ +# AC_LINK_IFELSE([ +# #undef _FILE_OFFSET_BITS +# #include +# #include +# #include +# ], [ +# sendfile(0, 0, (void *) 0, 0); +# ], [ +# ac_cv_have_linux_sendfile=yes +# ], [ +# ac_cv_have_linux_sendfile=no +# ]) +#]) +#if test $ac_cv_have_linux_sendfile = yes; then +# AC_DEFINE([HAVE_LINUX_SENDFILE],[1], [Define if you have Linux-compatible sendfile()]) +#fi # # Set SETJMP_IS_THREAD_SAFE define. @@ -23563,91 +23488,6 @@ fi # Check standard headers -# 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" - - - -if ! test x"$ac_cv_header_stdc" = x"yes"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: configure has detected that you do not have the ANSI standard C - header files. Compilation cannot proceed. Please install the ANSI C - headers and rerun this script." >&5 -printf "%s\n" "$as_me: WARNING: configure has detected that you do not have the ANSI standard C - header files. Compilation cannot proceed. Please install the ANSI C - headers and rerun this script." >&2;}; -fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable assertions" >&5 printf %s "checking whether to enable assertions... " >&6; } @@ -24294,16 +24134,6 @@ printf "%s\n" "#define STAT_MACROS_BROKEN 1" >>confdefs.h fi - - -# Obsolete code to be removed. -if test $ac_cv_header_sys_time_h = yes; then - -printf "%s\n" "#define TIME_WITH_SYS_TIME 1" >>confdefs.h - -fi -# End of obsolete code. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 printf %s "checking whether struct tm is in sys/time.h or time.h... " >&6; } if test ${ac_cv_struct_tm+y} @@ -25705,56 +25535,10 @@ printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether our compiler supports __func__" >&5 -printf %s "checking whether our compiler supports __func__... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ -{ const char *func = __func__; return(func != 0 ? 0 : 1); } - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether our compiler supports __FUNCTION__" >&5 -printf %s "checking whether our compiler supports __FUNCTION__... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ -{ const char *func = __FUNCTION__; return(func != 0 ? 0 : 1); } - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -printf "%s\n" "#define __func__ __FUNCTION__" >>confdefs.h - -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - -printf "%s\n" "#define __func__ __FILE__" >>confdefs.h - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +# +# Check for sendfile support +# +######## ######## # @@ -26457,14 +26241,6 @@ printf "%s\n" "#define SELECT_TYPE_ARG5 ($3)" >>confdefs.h rm -rf conftest* -if test ${ac_cv_func_setvbuf_reversed+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_func_setvbuf_reversed=no -fi - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strtod" >&5 printf %s "checking for working strtod... " >&6; } if test ${ac_cv_func_strtod+y} @@ -27658,60 +27434,6 @@ printf "%s\n" "#define HAVE_NAMESPACE_STD /**/" >>confdefs.h fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports ISO C++ standard library" >&5 -printf %s "checking whether the compiler supports ISO C++ standard library... " >&6; } -if test ${ac_cv_cxx_have_std_libs+y} -then : - printf %s "(cached) " >&6 -else $as_nop - - - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include -#ifdef HAVE_NAMESPACES -using namespace std; -#endif -int -main (void) -{ -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : - ac_cv_cxx_have_std_libs=yes -else $as_nop - ac_cv_cxx_have_std_libs=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_have_std_libs" >&5 -printf "%s\n" "$ac_cv_cxx_have_std_libs" >&6; } -if test "$ac_cv_cxx_have_std_libs" = yes; then - -printf "%s\n" "#define HAVE_STD_LIBS /**/" >>confdefs.h - -fi - # Check whether --enable-openmp was given. if test ${enable_openmp+y} then : diff --git a/configure.ac b/configure.ac index 67958afce1..7143ad113e 100644 --- a/configure.ac +++ b/configure.ac @@ -19,7 +19,7 @@ # notice and this notice are preserved. # Process this file with autoconf to create configure script. -AC_PREREQ(2.69) +AC_PREREQ([2.71]) # ============================================================================== # Initalize Automake @@ -42,11 +42,7 @@ m4_define([magick_release_date], printf %s "$d" ])) -AC_INIT([magick_name], - [magick_version], - [magick_bugreport], - [magick_tarname], - [magick_url]) +AC_INIT([magick_name],[magick_version],[magick_bugreport],[magick_tarname],[magick_url]) AC_CONFIG_SRCDIR([magick/MagickCore.h]) AC_CONFIG_AUX_DIR([config]) @@ -54,7 +50,6 @@ AC_REQUIRE_AUX_FILE([tap-driver.sh]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_HEADERS([config/config.h]) AX_PREFIX_CONFIG_H([magick/magick-baseconfig.h],[MagickCore]) -AC_CANONICAL_SYSTEM AC_CANONICAL_TARGET AM_INIT_AUTOMAKE([foreign no-define color-tests parallel-tests -Wall -Wno-portability subdir-objects dist-bzip2 dist-lzip dist-xz dist-zip tar-ustar]) @@ -276,10 +271,8 @@ AC_USE_SYSTEM_EXTENSIONS m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) AC_PROG_CC AC_PROG_CPP -AC_PROG_LD LT_PATH_LD AC_SUBST([LD]) -AC_PROG_CC_C99 AM_PROG_CC_C_O AX_CFLAGS_WARN_ALL AC_PROG_INSTALL @@ -533,23 +526,23 @@ AC_SUBST([LFS_CPPFLAGS]) # Check for sendfile support # ######## -AC_CACHE_CHECK([Linux compatible sendfile()],ac_cv_have_linux_sendfile,[ - AC_TRY_LINK([ - #undef _FILE_OFFSET_BITS - #include - #include - #include - ], [ - sendfile(0, 0, (void *) 0, 0); - ], [ - ac_cv_have_linux_sendfile=yes - ], [ - ac_cv_have_linux_sendfile=no - ]) -]) -if test $ac_cv_have_linux_sendfile = yes; then - AC_DEFINE([HAVE_LINUX_SENDFILE],[1], [Define if you have Linux-compatible sendfile()]) -fi +#AC_CACHE_CHECK([Linux compatible sendfile()],ac_cv_have_linux_sendfile,[ +# AC_LINK_IFELSE([ +# #undef _FILE_OFFSET_BITS +# #include +# #include +# #include +# ], [ +# sendfile(0, 0, (void *) 0, 0); +# ], [ +# ac_cv_have_linux_sendfile=yes +# ], [ +# ac_cv_have_linux_sendfile=no +# ]) +#]) +#if test $ac_cv_have_linux_sendfile = yes; then +# AC_DEFINE([HAVE_LINUX_SENDFILE],[1], [Define if you have Linux-compatible sendfile()]) +#fi # # Set SETJMP_IS_THREAD_SAFE define. @@ -931,12 +924,6 @@ AC_SUBST([MODULE_EXTRA_CPPFLAGS]) AC_SUBST([LIBRARY_EXTRA_CPPFLAGS]) # Check standard headers -AC_HEADER_STDC -if ! test x"$ac_cv_header_stdc" = x"yes"; then - AC_MSG_WARN([configure has detected that you do not have the ANSI standard C - header files. Compilation cannot proceed. Please install the ANSI C - headers and rerun this script.]); -fi AC_HEADER_ASSERT AC_HEADER_DIRENT @@ -953,7 +940,6 @@ AC_HEADER_STDBOOL AC_C_VOLATILE AC_C_STRINGIZE AC_HEADER_STAT -AC_HEADER_TIME AC_STRUCT_TM AC_STRUCT_TIMEZONE AC_SYS_INTERPRETER @@ -1008,20 +994,10 @@ AC_CHECK_SIZEOF([unsigned long long]) AC_CHECK_SIZEOF([void *]) -AC_MSG_CHECKING([whether our compiler supports __func__]) -AC_TRY_COMPILE([], - [{ const char *func = __func__; return(func != 0 ? 0 : 1); }], - AC_MSG_RESULT([yes]), - AC_MSG_RESULT([no]) - AC_MSG_CHECKING([whether our compiler supports __FUNCTION__]) - AC_TRY_COMPILE([], - [{ const char *func = __FUNCTION__; return(func != 0 ? 0 : 1); }], - AC_MSG_RESULT([yes]) - AC_DEFINE(__func__, __FUNCTION__, - [Define to appropriate substitute if compiler does not have __func__]), - AC_MSG_RESULT([no]) - AC_DEFINE(__func__, __FILE__, - [Define to appropriate substitute if compiler does not have __func__]))) +# +# Check for sendfile support +# +######## ######## # @@ -1035,7 +1011,6 @@ AC_FUNC_MALLOC AC_FUNC_MEMCMP AC_FUNC_REALLOC AC_FUNC_SELECT_ARGTYPES -AC_FUNC_SETVBUF_REVERSED AC_FUNC_STRTOD AC_FUNC_STRERROR_R AC_FUNC_VPRINTF @@ -1117,7 +1092,6 @@ if test "$with_magick_plus_plus" = 'yes'; then AX_CXX_BOOL AX_CXX_NAMESPACES AX_CXX_NAMESPACE_STD - AC_CXX_HAVE_STD_LIBS AC_OPENMP([C++]) AC_LANG_POP diff --git a/m4/ax_pthread.m4 b/m4/ax_pthread.m4 index 1598d077ff..9f35d13914 100644 --- a/m4/ax_pthread.m4 +++ b/m4/ax_pthread.m4 @@ -14,20 +14,24 @@ # flags that are needed. (The user can also force certain compiler # flags/libs to be tested by setting these environment variables.) # -# Also sets PTHREAD_CC to any special C compiler that is needed for -# multi-threaded programs (defaults to the value of CC otherwise). (This -# is necessary on AIX to use the special cc_r compiler alias.) +# Also sets PTHREAD_CC and PTHREAD_CXX to any special C compiler that is +# needed for multi-threaded programs (defaults to the value of CC +# respectively CXX otherwise). (This is necessary on e.g. AIX to use the +# special cc_r/CC_r compiler alias.) # # NOTE: You are assumed to not only compile your program with these flags, # but also to link with them as well. For example, you might link with # $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS +# $PTHREAD_CXX $CXXFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS # # If you are only building threaded programs, you may wish to use these # variables in your default LIBS, CFLAGS, and CC: # # LIBS="$PTHREAD_LIBS $LIBS" # CFLAGS="$CFLAGS $PTHREAD_CFLAGS" +# CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS" # CC="$PTHREAD_CC" +# CXX="$PTHREAD_CXX" # # In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant # has a nonstandard name, this macro defines PTHREAD_CREATE_JOINABLE to @@ -83,7 +87,7 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 27 +#serial 31 AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) AC_DEFUN([AX_PTHREAD], [ @@ -105,6 +109,7 @@ if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then ax_pthread_save_CFLAGS="$CFLAGS" ax_pthread_save_LIBS="$LIBS" AS_IF([test "x$PTHREAD_CC" != "x"], [CC="$PTHREAD_CC"]) + AS_IF([test "x$PTHREAD_CXX" != "x"], [CXX="$PTHREAD_CXX"]) CFLAGS="$CFLAGS $PTHREAD_CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" AC_MSG_CHECKING([for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS]) @@ -386,7 +391,7 @@ if test "x$ax_pthread_clang" = "xyes"; then # step ax_pthread_save_ac_link="$ac_link" ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' - ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"` + ax_pthread_link_step=`AS_ECHO(["$ac_link"]) | sed "$ax_pthread_sed"` ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" ax_pthread_save_CFLAGS="$CFLAGS" for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do @@ -482,18 +487,28 @@ if test "x$ax_pthread_ok" = "xyes"; then [#handle absolute path differently from PATH based program lookup AS_CASE(["x$CC"], [x/*], - [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])], - [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])]) + [ + AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"]) + AS_IF([test "x${CXX}" != "x"], [AS_IF([AS_EXECUTABLE_P([${CXX}_r])],[PTHREAD_CXX="${CXX}_r"])]) + ], + [ + AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC]) + AS_IF([test "x${CXX}" != "x"], [AC_CHECK_PROGS([PTHREAD_CXX],[${CXX}_r],[$CXX])]) + ] + ) + ]) ;; esac fi fi test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" +test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX" AC_SUBST([PTHREAD_LIBS]) AC_SUBST([PTHREAD_CFLAGS]) AC_SUBST([PTHREAD_CC]) +AC_SUBST([PTHREAD_CXX]) # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test "x$ax_pthread_ok" = "xyes"; then