Ticket #15447: patch-configure.diff

File patch-configure.diff, 12.4 KB (added by dbevans (David B. Evans), 16 years ago)

Patch for configure. Replaces existing patch file of same name.

  • configure

    old new  
    802802LIBWPG_LIBS
    803803WITH_LIBWPG_TRUE
    804804WITH_LIBWPG_FALSE
    805 MAGICKPP_CONFIG
     805IMAGEMAGICK_CFLAGS
    806806IMAGEMAGICK_LIBS
    807807USE_IMAGE_MAGICK_TRUE
    808808USE_IMAGE_MAGICK_FALSE
     
    857857INKBOARD_LIBS
    858858LIBWPG_CFLAGS
    859859LIBWPG_LIBS
     860IMAGEMAGICK_CFLAGS
     861IMAGEMAGICK_LIBS
    860862INKSCAPE_CFLAGS
    861863INKSCAPE_LIBS
    862864CAIRO_PDF_CFLAGS
     
    15091511  LIBWPG_CFLAGS
    15101512              C compiler flags for LIBWPG, overriding pkg-config
    15111513  LIBWPG_LIBS linker flags for LIBWPG, overriding pkg-config
     1514  IMAGEMAGICK_CFLAGS
     1515              C compiler flags for IMAGEMAGICK, overriding pkg-config
     1516  IMAGEMAGICK_LIBS
     1517              linker flags for IMAGEMAGICK, overriding pkg-config
    15121518  INKSCAPE_CFLAGS
    15131519              C compiler flags for INKSCAPE, overriding pkg-config
    15141520  INKSCAPE_LIBS
     
    1271512721
    1271612722
    1271712723if test "x$with_python" = "xyes"; then
    12718     checkPYTHON_CFLAGS=`python -c "import distutils.sysconfig ; print '-I%s' % distutils.sysconfig.get_config_var('INCLUDEPY')" 2>/dev/null`
     12724    checkPYTHON_CFLAGS=`${prefix}/bin/python2.5 -c "import distutils.sysconfig ; print '-I%s' % distutils.sysconfig.get_config_var('INCLUDEPY')" 2>/dev/null`
    1271912725    if test "$?" -gt "0"; then
    1272012726        with_python="no"
    1272112727    else
    12722         checkPYTHON_LIBS=`python -c "import distutils.sysconfig ; print '%s/%s %s' % (distutils.sysconfig.get_config_var('LIBPL'),distutils.sysconfig.get_config_var('LDLIBRARY'),distutils.sysconfig.get_config_var('LIBS'))" 2>/dev/null`
     12728        checkPYTHON_LIBS=-lpython2.5
    1272312729        if test "$?" -gt "0"; then
    1272412730            with_python="no"
    1272512731        else
     
    1363113637fi
    1363213638
    1363313639
     13640pkg_failed=no
     13641{ echo "$as_me:$LINENO: checking for IMAGEMAGICK" >&5
     13642echo $ECHO_N "checking for IMAGEMAGICK... " >&6; }
    1363413643
    13635 
    13636 
    13637 
    13638 { echo "$as_me:$LINENO: checking for InitializeMagick in -lMagick++" >&5
    13639 echo $ECHO_N "checking for InitializeMagick in -lMagick++... $ECHO_C" >&6; }
    13640 if test "${ac_cv_lib_Magickpp_InitializeMagick+set}" = set; then
    13641   echo $ECHO_N "(cached) $ECHO_C" >&6
    13642 else
    13643   ac_check_lib_save_LIBS=$LIBS
    13644 LIBS="-lMagick++ -llcms -lfreetype -ljpeg -lfontconfig -lXext -lSM -lICE -lX11 -lz -lpthread -lm -lpthread $LIBS"
    13645 cat >conftest.$ac_ext <<_ACEOF
    13646 /* confdefs.h.  */
    13647 _ACEOF
    13648 cat confdefs.h >>conftest.$ac_ext
    13649 cat >>conftest.$ac_ext <<_ACEOF
    13650 /* end confdefs.h.  */
    13651 
    13652 /* Override any GCC internal prototype to avoid an error.
    13653    Use char because int might match the return type of a GCC
    13654    builtin and then its argument prototype would still apply.  */
    13655 #ifdef __cplusplus
    13656 extern "C"
    13657 #endif
    13658 char InitializeMagick ();
    13659 int
    13660 main ()
    13661 {
    13662 return InitializeMagick ();
    13663   ;
    13664   return 0;
    13665 }
    13666 _ACEOF
    13667 rm -f conftest.$ac_objext conftest$ac_exeext
    13668 if { (ac_try="$ac_link"
    13669 case "(($ac_try" in
    13670   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
    13671   *) ac_try_echo=$ac_try;;
    13672 esac
    13673 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
    13674   (eval "$ac_link") 2>conftest.er1
     13644if test -n "$IMAGEMAGICK_CFLAGS"; then
     13645    pkg_cv_IMAGEMAGICK_CFLAGS="$IMAGEMAGICK_CFLAGS"
     13646 elif test -n "$PKG_CONFIG"; then
     13647    if test -n "$PKG_CONFIG" && \
     13648    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"ImageMagick++\"") >&5
     13649  ($PKG_CONFIG --exists --print-errors "ImageMagick++") 2>&5
    1367513650  ac_status=$?
    13676   grep -v '^ *+' conftest.er1 >conftest.err
    13677   rm -f conftest.er1
    13678   cat conftest.err >&5
    1367913651  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    13680   (exit $ac_status); } && {
    13681          test -z "$ac_cxx_werror_flag" ||
    13682          test ! -s conftest.err
    13683        } && test -s conftest$ac_exeext &&
    13684        $as_test_x conftest$ac_exeext; then
    13685   ac_cv_lib_Magickpp_InitializeMagick=yes
     13652  (exit $ac_status); }; then
     13653  pkg_cv_IMAGEMAGICK_CFLAGS=`$PKG_CONFIG --cflags "ImageMagick++" 2>/dev/null`
    1368613654else
    13687   echo "$as_me: failed program was:" >&5
    13688 sed 's/^/| /' conftest.$ac_ext >&5
    13689 
    13690         ac_cv_lib_Magickpp_InitializeMagick=no
    13691 fi
    13692 
    13693 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
    13694       conftest$ac_exeext conftest.$ac_ext
    13695 LIBS=$ac_check_lib_save_LIBS
     13655  pkg_failed=yes
    1369613656fi
    13697 { echo "$as_me:$LINENO: result: $ac_cv_lib_Magickpp_InitializeMagick" >&5
    13698 echo "${ECHO_T}$ac_cv_lib_Magickpp_InitializeMagick" >&6; }
    13699 if test $ac_cv_lib_Magickpp_InitializeMagick = yes; then
    13700   if test "${ac_cv_header_Magickpp_h+set}" = set; then
    13701   { echo "$as_me:$LINENO: checking for Magick++.h" >&5
    13702 echo $ECHO_N "checking for Magick++.h... $ECHO_C" >&6; }
    13703 if test "${ac_cv_header_Magickpp_h+set}" = set; then
    13704   echo $ECHO_N "(cached) $ECHO_C" >&6
     13657 else
     13658    pkg_failed=untried
    1370513659fi
    13706 { echo "$as_me:$LINENO: result: $ac_cv_header_Magickpp_h" >&5
    13707 echo "${ECHO_T}$ac_cv_header_Magickpp_h" >&6; }
    13708 else
    13709   # Is the header compilable?
    13710 { echo "$as_me:$LINENO: checking Magick++.h usability" >&5
    13711 echo $ECHO_N "checking Magick++.h usability... $ECHO_C" >&6; }
    13712 cat >conftest.$ac_ext <<_ACEOF
    13713 /* confdefs.h.  */
    13714 _ACEOF
    13715 cat confdefs.h >>conftest.$ac_ext
    13716 cat >>conftest.$ac_ext <<_ACEOF
    13717 /* end confdefs.h.  */
    13718 $ac_includes_default
    13719 #include <Magick++.h>
    13720 _ACEOF
    13721 rm -f conftest.$ac_objext
    13722 if { (ac_try="$ac_compile"
    13723 case "(($ac_try" in
    13724   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
    13725   *) ac_try_echo=$ac_try;;
    13726 esac
    13727 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
    13728   (eval "$ac_compile") 2>conftest.er1
     13660if test -n "$IMAGEMAGICK_LIBS"; then
     13661    pkg_cv_IMAGEMAGICK_LIBS="$IMAGEMAGICK_LIBS"
     13662 elif test -n "$PKG_CONFIG"; then
     13663    if test -n "$PKG_CONFIG" && \
     13664    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"ImageMagick++\"") >&5
     13665  ($PKG_CONFIG --exists --print-errors "ImageMagick++") 2>&5
    1372913666  ac_status=$?
    13730   grep -v '^ *+' conftest.er1 >conftest.err
    13731   rm -f conftest.er1
    13732   cat conftest.err >&5
    1373313667  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    13734   (exit $ac_status); } && {
    13735          test -z "$ac_cxx_werror_flag" ||
    13736          test ! -s conftest.err
    13737        } && test -s conftest.$ac_objext; then
    13738   ac_header_compiler=yes
     13668  (exit $ac_status); }; then
     13669  pkg_cv_IMAGEMAGICK_LIBS=`$PKG_CONFIG --libs "ImageMagick++" 2>/dev/null`
    1373913670else
    13740   echo "$as_me: failed program was:" >&5
    13741 sed 's/^/| /' conftest.$ac_ext >&5
    13742 
    13743         ac_header_compiler=no
     13671  pkg_failed=yes
    1374413672fi
    13745 
    13746 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    13747 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
    13748 echo "${ECHO_T}$ac_header_compiler" >&6; }
    13749 
    13750 # Is the header present?
    13751 { echo "$as_me:$LINENO: checking Magick++.h presence" >&5
    13752 echo $ECHO_N "checking Magick++.h presence... $ECHO_C" >&6; }
    13753 cat >conftest.$ac_ext <<_ACEOF
    13754 /* confdefs.h.  */
    13755 _ACEOF
    13756 cat confdefs.h >>conftest.$ac_ext
    13757 cat >>conftest.$ac_ext <<_ACEOF
    13758 /* end confdefs.h.  */
    13759 #include <Magick++.h>
    13760 _ACEOF
    13761 if { (ac_try="$ac_cpp conftest.$ac_ext"
    13762 case "(($ac_try" in
    13763   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
    13764   *) ac_try_echo=$ac_try;;
    13765 esac
    13766 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
    13767   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
    13768   ac_status=$?
    13769   grep -v '^ *+' conftest.er1 >conftest.err
    13770   rm -f conftest.er1
    13771   cat conftest.err >&5
    13772   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    13773   (exit $ac_status); } >/dev/null && {
    13774          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
    13775          test ! -s conftest.err
    13776        }; then
    13777   ac_header_preproc=yes
    13778 else
    13779   echo "$as_me: failed program was:" >&5
    13780 sed 's/^/| /' conftest.$ac_ext >&5
    13781 
    13782   ac_header_preproc=no
     13673 else
     13674    pkg_failed=untried
    1378313675fi
    1378413676
    13785 rm -f conftest.err conftest.$ac_ext
    13786 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
    13787 echo "${ECHO_T}$ac_header_preproc" >&6; }
    1378813677
    13789 # So?  What about this header?
    13790 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
    13791   yes:no: )
    13792     { echo "$as_me:$LINENO: WARNING: Magick++.h: accepted by the compiler, rejected by the preprocessor!" >&5
    13793 echo "$as_me: WARNING: Magick++.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
    13794     { echo "$as_me:$LINENO: WARNING: Magick++.h: proceeding with the compiler's result" >&5
    13795 echo "$as_me: WARNING: Magick++.h: proceeding with the compiler's result" >&2;}
    13796     ac_header_preproc=yes
    13797     ;;
    13798   no:yes:* )
    13799     { echo "$as_me:$LINENO: WARNING: Magick++.h: present but cannot be compiled" >&5
    13800 echo "$as_me: WARNING: Magick++.h: present but cannot be compiled" >&2;}
    13801     { echo "$as_me:$LINENO: WARNING: Magick++.h:     check for missing prerequisite headers?" >&5
    13802 echo "$as_me: WARNING: Magick++.h:     check for missing prerequisite headers?" >&2;}
    13803     { echo "$as_me:$LINENO: WARNING: Magick++.h: see the Autoconf documentation" >&5
    13804 echo "$as_me: WARNING: Magick++.h: see the Autoconf documentation" >&2;}
    13805     { echo "$as_me:$LINENO: WARNING: Magick++.h:     section \"Present But Cannot Be Compiled\"" >&5
    13806 echo "$as_me: WARNING: Magick++.h:     section \"Present But Cannot Be Compiled\"" >&2;}
    13807     { echo "$as_me:$LINENO: WARNING: Magick++.h: proceeding with the preprocessor's result" >&5
    13808 echo "$as_me: WARNING: Magick++.h: proceeding with the preprocessor's result" >&2;}
    13809     { echo "$as_me:$LINENO: WARNING: Magick++.h: in the future, the compiler will take precedence" >&5
    13810 echo "$as_me: WARNING: Magick++.h: in the future, the compiler will take precedence" >&2;}
    1381113678
    13812     ;;
    13813 esac
    13814 { echo "$as_me:$LINENO: checking for Magick++.h" >&5
    13815 echo $ECHO_N "checking for Magick++.h... $ECHO_C" >&6; }
    13816 if test "${ac_cv_header_Magickpp_h+set}" = set; then
    13817   echo $ECHO_N "(cached) $ECHO_C" >&6
    13818 else
    13819   ac_cv_header_Magickpp_h=$ac_header_preproc
    13820 fi
    13821 { echo "$as_me:$LINENO: result: $ac_cv_header_Magickpp_h" >&5
    13822 echo "${ECHO_T}$ac_cv_header_Magickpp_h" >&6; }
     13679if test $pkg_failed = yes; then
    1382313680
    13824 fi
    13825 if test $ac_cv_header_Magickpp_h = yes; then
    13826   magick_ok=yes
     13681if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
     13682        _pkg_short_errors_supported=yes
    1382713683else
    13828   magick_ok=no
     13684        _pkg_short_errors_supported=no
    1382913685fi
     13686        if test $_pkg_short_errors_supported = yes; then
     13687                IMAGEMAGICK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "ImageMagick++" 2>&1`
     13688        else
     13689                IMAGEMAGICK_PKG_ERRORS=`$PKG_CONFIG --print-errors "ImageMagick++" 2>&1`
     13690        fi
     13691        # Put the nasty error message in config.log where it belongs
     13692        echo "$IMAGEMAGICK_PKG_ERRORS" >&5
    1383013693
    13831 
     13694        { echo "$as_me:$LINENO: result: no" >&5
     13695echo "no" >&6; }
     13696                magick_ok=no
     13697elif test $pkg_failed = untried; then
     13698        magick_ok=no
    1383213699else
    13833   magick_ok=no
     13700        IMAGEMAGICK_CFLAGS=$pkg_cv_IMAGEMAGICK_CFLAGS
     13701        IMAGEMAGICK_LIBS=$pkg_cv_IMAGEMAGICK_LIBS
     13702        { echo "$as_me:$LINENO: result: yes" >&5
     13703echo "yes" >&6; }
     13704        magick_ok=yes
    1383413705fi
    13835 
    13836 
    1383713706if test "x$magick_ok" = "xyes"; then
    13838         # Extract the first word of "Magick++-config", so it can be a program name with args.
    13839 set dummy Magick++-config; ac_word=$2
    13840 { echo "$as_me:$LINENO: checking for $ac_word" >&5
    13841 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
    13842 if test "${ac_cv_prog_MAGICKPP_CONFIG+set}" = set; then
    13843   echo $ECHO_N "(cached) $ECHO_C" >&6
    13844 else
    13845   if test -n "$MAGICKPP_CONFIG"; then
    13846   ac_cv_prog_MAGICKPP_CONFIG="$MAGICKPP_CONFIG" # Let the user override the test.
    13847 else
    13848 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
    13849 for as_dir in $PATH
    13850 do
    13851   IFS=$as_save_IFS
    13852   test -z "$as_dir" && as_dir=.
    13853   for ac_exec_ext in '' $ac_executable_extensions; do
    13854   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    13855     ac_cv_prog_MAGICKPP_CONFIG="yes"
    13856     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    13857     break 2
    13858   fi
    13859 done
    13860 done
    13861 IFS=$as_save_IFS
    13862 
    13863   test -z "$ac_cv_prog_MAGICKPP_CONFIG" && ac_cv_prog_MAGICKPP_CONFIG="no"
    13864 fi
    13865 fi
    13866 MAGICKPP_CONFIG=$ac_cv_prog_MAGICKPP_CONFIG
    13867 if test -n "$MAGICKPP_CONFIG"; then
    13868   { echo "$as_me:$LINENO: result: $MAGICKPP_CONFIG" >&5
    13869 echo "${ECHO_T}$MAGICKPP_CONFIG" >&6; }
    13870 else
    13871   { echo "$as_me:$LINENO: result: no" >&5
    13872 echo "${ECHO_T}no" >&6; }
    13873 fi
    13874 
    13875 
    13876         if test "x$MAGICKPP_CONFIG" = "xyes"; then
    13877                 IMAGEMAGICK_LIBS=`Magick++-config --libs`
    13878 
    1387913707
    1388013708cat >>confdefs.h <<\_ACEOF
    1388113709#define WITH_IMAGE_MAGICK 1
    1388213710_ACEOF
    1388313711
    13884         fi
    1388513712fi
    13886 
    1388713713 if test "x$magick_ok" = "xyes"; then
    1388813714  USE_IMAGE_MAGICK_TRUE=
    1388913715  USE_IMAGE_MAGICK_FALSE='#'
     
    1389413720
    1389513721
    1389613722
     13723
     13724
     13725
    1389713726if test $cc_vers_major -gt 3; then
    1389813727  min_sigc_version=2.0.12
    1389913728else
     
    1914618975LIBWPG_LIBS!$LIBWPG_LIBS$ac_delim
    1914718976WITH_LIBWPG_TRUE!$WITH_LIBWPG_TRUE$ac_delim
    1914818977WITH_LIBWPG_FALSE!$WITH_LIBWPG_FALSE$ac_delim
    19149 MAGICKPP_CONFIG!$MAGICKPP_CONFIG$ac_delim
     18978IMAGEMAGICK_CFLAGS!$IMAGEMAGICK_CFLAGS$ac_delim
    1915018979IMAGEMAGICK_LIBS!$IMAGEMAGICK_LIBS$ac_delim
    1915118980USE_IMAGE_MAGICK_TRUE!$USE_IMAGE_MAGICK_TRUE$ac_delim
    1915218981USE_IMAGE_MAGICK_FALSE!$USE_IMAGE_MAGICK_FALSE$ac_delim