diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-11-17 16:33:37 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-11-17 16:33:37 +0000 |
commit | 7c18d8c655e3ec05cb6c9479f08abcc7a98c28ac (patch) | |
tree | 0b89e3f31776756ba20beb06712c85d2722a751e /Build/source/texk/dvisvgm | |
parent | 7b5de8aefd0becbda29815510081eff3022c547a (diff) |
texk/kpathsea: update openout_any handling for Win/Mingw/Cygwin
git-svn-id: svn://tug.org/texlive/trunk@16049 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvisvgm')
-rw-r--r-- | Build/source/texk/dvisvgm/Makefile.in | 2 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/ac/dvisvgm.ac | 10 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/ac/libgs.ac | 9 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/ac/withenable.ac | 2 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/config.h.in | 3 | ||||
-rwxr-xr-x | Build/source/texk/dvisvgm/configure | 104 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/configure.ac | 22 |
7 files changed, 127 insertions, 25 deletions
diff --git a/Build/source/texk/dvisvgm/Makefile.in b/Build/source/texk/dvisvgm/Makefile.in index 1516c13dd18..c14d964849f 100644 --- a/Build/source/texk/dvisvgm/Makefile.in +++ b/Build/source/texk/dvisvgm/Makefile.in @@ -63,7 +63,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../../m4/kpse-common.m4 \ $(top_srcdir)/../../m4/ltsugar.m4 \ $(top_srcdir)/../../m4/ltversion.m4 \ $(top_srcdir)/../../m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/ac/dvisvgm.ac $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ diff --git a/Build/source/texk/dvisvgm/ac/dvisvgm.ac b/Build/source/texk/dvisvgm/ac/dvisvgm.ac new file mode 100644 index 00000000000..bd617772022 --- /dev/null +++ b/Build/source/texk/dvisvgm/ac/dvisvgm.ac @@ -0,0 +1,10 @@ +## texk/dvisvgm/ac/dvisvgm.ac: configure.ac fragment for the TeX Live subdirectory texk/dvisvgm/ +dnl +dnl Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org> +dnl You may freely use, modify and/or distribute this file. +dnl +## configure options for dvisvgm +AC_ARG_WITH([system-libgs], + AS_HELP_STRING([--with-system-libgs], + [build dvisvgm with installed gs headers and library + @<:@default: no, may require CPPFLAGS and LDFLAGS@:>@])) diff --git a/Build/source/texk/dvisvgm/ac/libgs.ac b/Build/source/texk/dvisvgm/ac/libgs.ac new file mode 100644 index 00000000000..25b904f72e4 --- /dev/null +++ b/Build/source/texk/dvisvgm/ac/libgs.ac @@ -0,0 +1,9 @@ +## texk/dvisvgm/ac/libgs.ac: configure.ac fragment for the TeX Live subdirectory texk/dvisvgm/ +dnl +dnl Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org> +dnl You may freely use, modify and/or distribute this file. +dnl +## configure checks for dvisvgm and libgs +if test "x$enable_native_texlive_build:$with_system_libgs" = xyes:yes; then + AC_MSG_ERROR([you can not use system libraries for a native TeX Live build]) +fi diff --git a/Build/source/texk/dvisvgm/ac/withenable.ac b/Build/source/texk/dvisvgm/ac/withenable.ac index 24d76219324..78220e06e04 100644 --- a/Build/source/texk/dvisvgm/ac/withenable.ac +++ b/Build/source/texk/dvisvgm/ac/withenable.ac @@ -5,3 +5,5 @@ dnl You may freely use, modify and/or distribute this file. dnl ## configure options and TL libraries required for dvisvgm KPSE_ENABLE_PROG([dvisvgm], [kpathsea freetype2 zlib]) +m4_include(kpse_TL[texk/dvisvgm/ac/dvisvgm.ac]) +m4_include(kpse_TL[texk/dvisvgm/ac/libgs.ac]) diff --git a/Build/source/texk/dvisvgm/config.h.in b/Build/source/texk/dvisvgm/config.h.in index c08bdf6a429..09dbb64a9f5 100644 --- a/Build/source/texk/dvisvgm/config.h.in +++ b/Build/source/texk/dvisvgm/config.h.in @@ -46,6 +46,9 @@ /* Define to 1 if you have the <iostream> header file. */ #undef HAVE_IOSTREAM +/* Define to 1 if you have the `freetype2' library (-lfreetype). */ +#undef HAVE_LIBFREETYPE + /* Define to 1 if you have the `kpathsea' library (-lkpathsea). */ #undef HAVE_LIBKPATHSEA diff --git a/Build/source/texk/dvisvgm/configure b/Build/source/texk/dvisvgm/configure index dad5aefa40d..34c6534104c 100755 --- a/Build/source/texk/dvisvgm/configure +++ b/Build/source/texk/dvisvgm/configure @@ -891,6 +891,7 @@ with_gnu_ld enable_libtool_lock enable_largefile enable_compiler_warnings +with_system_libgs enable_cxx_runtime_hack with_system_kpathsea with_kpathsea_includes @@ -1553,6 +1554,8 @@ Optional Packages: --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-system-libgs build dvisvgm with installed gs headers and library + [default: no, may require CPPFLAGS and LDFLAGS] --with-system-kpathsea use installed kpathsea headers and library --with-kpathsea-includes=DIR kpathsea headers installed in DIR @@ -4713,13 +4716,13 @@ if test "${lt_cv_nm_interface+set}" = set; then : else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:4716: $ac_compile\"" >&5) + (eval echo "\"\$as_me:4719: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:4719: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:4722: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:4722: output\"" >&5) + (eval echo "\"\$as_me:4725: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -5925,7 +5928,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 5928 "configure"' > conftest.$ac_ext + echo '#line 5931 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7557,11 +7560,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7560: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7563: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7564: \$? = $ac_status" >&5 + echo "$as_me:7567: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7896,11 +7899,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7899: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7902: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7903: \$? = $ac_status" >&5 + echo "$as_me:7906: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8001,11 +8004,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8004: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8007: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8008: \$? = $ac_status" >&5 + echo "$as_me:8011: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8056,11 +8059,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8059: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8062: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8063: \$? = $ac_status" >&5 + echo "$as_me:8066: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -10423,7 +10426,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10426 "configure" +#line 10429 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10519,7 +10522,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10522 "configure" +#line 10525 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11611,6 +11614,16 @@ WARNING_CFLAGS=$kpse_cv_warning_cflags +## texk/dvisvgm/ac/dvisvgm.ac: configure.ac fragment for the TeX Live subdirectory texk/dvisvgm/ +## configure options for dvisvgm + +# Check whether --with-system-libgs was given. +if test "${with_system_libgs+set}" = set; then : + withval=$with_system_libgs; +fi + + + ac_config_headers="$ac_config_headers config.h" @@ -14306,11 +14319,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14309: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14322: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14313: \$? = $ac_status" >&5 + echo "$as_me:14326: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -14405,11 +14418,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14408: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14421: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14412: \$? = $ac_status" >&5 + echo "$as_me:14425: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -14457,11 +14470,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14460: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14473: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14464: \$? = $ac_status" >&5 + echo "$as_me:14477: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17552,17 +17565,28 @@ kpse_save_LIBS=$LIBS eval CPPFLAGS=\"$ZLIB_INCLUDES \$CPPFLAGS\" eval LIBS=\"$ZLIB_LIBS \$LIBS\" -ac_fn_c_check_func "$LINENO" "deflate" "ac_cv_func_deflate" -if test "x$ac_cv_func_deflate" = x""yes; then : +ac_fn_c_check_func "$LINENO" "gzopen" "ac_cv_func_gzopen" +if test "x$ac_cv_func_gzopen" = x""yes; then : $as_echo "#define HAVE_LIBZ 1" >>confdefs.h +else + as_fn_error "cannot find/use zlib" "$LINENO" 5 fi eval CPPFLAGS=\"$FREETYPE2_INCLUDES \$CPPFLAGS\" eval LIBS=\"$FREETYPE2_LIBS \$LIBS\" +ac_fn_c_check_func "$LINENO" "FT_Init_FreeType" "ac_cv_func_FT_Init_FreeType" +if test "x$ac_cv_func_FT_Init_FreeType" = x""yes; then : + +$as_echo "#define HAVE_LIBFREETYPE 1" >>confdefs.h + +else + as_fn_error "cannot find/use libfreetype" "$LINENO" 5 +fi + eval CPPFLAGS=\"$KPATHSEA_INCLUDES \$CPPFLAGS\" eval LIBS=\"$KPATHSEA_LIBS \$LIBS\" @@ -17587,6 +17611,42 @@ fi DVISVGM_TREE=dvisvgm-0.8.7 +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 +ac_link="./libtool --mode=link --tag=CXX $ac_link" + +CPPFLAGS="-I$srcdir/$DVISVGM_TREE/src $CPPFLAGS" + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include "iapi.h" +int +main () +{ +typedef struct gs_main_inst_s gs_main_inst; gs_main_inst *inst; + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + gs_old_api=yes +else + gs_old_api=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: gs_old_api=$gs_old_api" >&5 +$as_echo "gs_old_api=$gs_old_api" >&6; } +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_link="./libtool --mode=link --tag=CC $ac_link" + + ac_config_files="$ac_config_files Makefile" diff --git a/Build/source/texk/dvisvgm/configure.ac b/Build/source/texk/dvisvgm/configure.ac index 8cc8319d0ea..ecca8d7da4c 100644 --- a/Build/source/texk/dvisvgm/configure.ac +++ b/Build/source/texk/dvisvgm/configure.ac @@ -23,6 +23,9 @@ AC_CONFIG_MACRO_DIR([../../m4]) # Common code for all programs using libkpathsea. KPSE_COMMON([dvisvgm]) +dnl Include additional code for dvisvgm. +m4_include([ac/dvisvgm.ac]) + AC_CONFIG_HEADERS([config.h]) AC_PROG_CXX @@ -46,11 +49,16 @@ if test "x$enable_build" != xno || test -f config.force; then # Checks for more libraries. KPSE_ADD_FLAGS([zlib]) -AC_CHECK_FUNC([deflate], +AC_CHECK_FUNC([gzopen], [AC_DEFINE([HAVE_LIBZ], 1, - [Define to 1 if you have the `z' library (-lz).])]) + [Define to 1 if you have the `z' library (-lz).])], + [AC_MSG_ERROR([cannot find/use zlib])]) KPSE_ADD_FLAGS([freetype2]) +AC_CHECK_FUNC([FT_Init_FreeType], + [AC_DEFINE([HAVE_LIBFREETYPE], 1, + [Define to 1 if you have the `freetype2' library (-lfreetype).])], + [AC_MSG_ERROR([cannot find/use libfreetype])]) KPSE_ADD_FLAGS([kpathsea]) AC_CHECK_FUNC([kpse_set_progname], @@ -66,6 +74,16 @@ fi DVISVGM_TREE=[dvisvgm-]dvisvgm_version AC_SUBST([DVISVGM_TREE]) +AC_LANG_PUSH([C++]) +CPPFLAGS="-I$srcdir/$DVISVGM_TREE/src $CPPFLAGS" + +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "iapi.h"]], + [[typedef struct gs_main_inst_s gs_main_inst; gs_main_inst *inst;]])], + [gs_old_api=yes], + [gs_old_api=no]) +AC_MSG_RESULT([gs_old_api=$gs_old_api]) +AC_LANG_POP([C++]) + AC_CONFIG_FILES([Makefile]) AC_OUTPUT |