diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2010-03-25 11:07:49 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2010-03-25 11:07:49 +0000 |
commit | 4e88f0c77dd922b1aa8432f51de7bdc5c75036ae (patch) | |
tree | fdfcaf8994fc08aa75de88590eca0272aa38084d /Build/source/texk/dvisvgm | |
parent | 4ecb824241f9cfdeff51b1d2a5c70e504bcfa80c (diff) |
build system: dlopen, FreeBSD, and libdl
git-svn-id: svn://tug.org/texlive/trunk@17552 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvisvgm')
-rw-r--r-- | Build/source/texk/dvisvgm/ChangeLog | 4 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/Makefile.in | 1 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/aclocal.m4 | 1 | ||||
-rwxr-xr-x | Build/source/texk/dvisvgm/configure | 128 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/configure.ac | 31 |
5 files changed, 145 insertions, 20 deletions
diff --git a/Build/source/texk/dvisvgm/ChangeLog b/Build/source/texk/dvisvgm/ChangeLog index 7eb8ee87f19..6aed46c51bc 100644 --- a/Build/source/texk/dvisvgm/ChangeLog +++ b/Build/source/texk/dvisvgm/ChangeLog @@ -1,3 +1,7 @@ +2010-03-24 Peter Breitenlohner <peb@mppmu.mpg.de> + + * configure.ac: Check if dlopen() requires `-ldl'. + 2010-03-09 Peter Breitenlohner <peb@mppmu.mpg.de> * configure.ac: Check for kpse_set_program_name() instead of diff --git a/Build/source/texk/dvisvgm/Makefile.in b/Build/source/texk/dvisvgm/Makefile.in index e10fab87f88..c713c310074 100644 --- a/Build/source/texk/dvisvgm/Makefile.in +++ b/Build/source/texk/dvisvgm/Makefile.in @@ -59,6 +59,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../../m4/kpse-common.m4 \ $(top_srcdir)/../../m4/kpse-freetype2-flags.m4 \ $(top_srcdir)/../../m4/kpse-kpathsea-flags.m4 \ $(top_srcdir)/../../m4/kpse-warnings.m4 \ + $(top_srcdir)/../../m4/kpse-win32.m4 \ $(top_srcdir)/../../m4/kpse-zlib-flags.m4 \ $(top_srcdir)/../../m4/libtool.m4 \ $(top_srcdir)/../../m4/ltoptions.m4 \ diff --git a/Build/source/texk/dvisvgm/aclocal.m4 b/Build/source/texk/dvisvgm/aclocal.m4 index 6c55ebdf92a..3717bc735ef 100644 --- a/Build/source/texk/dvisvgm/aclocal.m4 +++ b/Build/source/texk/dvisvgm/aclocal.m4 @@ -994,6 +994,7 @@ m4_include([../../m4/kpse-cxx-hack.m4]) m4_include([../../m4/kpse-freetype2-flags.m4]) m4_include([../../m4/kpse-kpathsea-flags.m4]) m4_include([../../m4/kpse-warnings.m4]) +m4_include([../../m4/kpse-win32.m4]) m4_include([../../m4/kpse-zlib-flags.m4]) m4_include([../../m4/libtool.m4]) m4_include([../../m4/ltoptions.m4]) diff --git a/Build/source/texk/dvisvgm/configure b/Build/source/texk/dvisvgm/configure index 8b9b47de008..9e2035084f6 100755 --- a/Build/source/texk/dvisvgm/configure +++ b/Build/source/texk/dvisvgm/configure @@ -16081,6 +16081,53 @@ fi done +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for native WIN32 or MINGW32" >&5 +$as_echo_n "checking for native WIN32 or MINGW32... " >&6; } +if test "${kpse_cv_have_win32+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef WIN32 + choke me +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __MINGW32__ + choke me +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + kpse_cv_have_win32=mingw32 +else + kpse_cv_have_win32=native +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + kpse_cv_have_win32=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_cv_have_win32" >&5 +$as_echo "$kpse_cv_have_win32" >&6; } + + kpse_save_CPPFLAGS=$CPPFLAGS kpse_save_LIBS=$LIBS @@ -18033,30 +18080,93 @@ $as_echo "#define HAVE_LIBGS 1" >>confdefs.h else libgs_mode=load LIBGS_INCLUDES= - LIBGS_LIBS=-ldl - eval CPPFLAGS=\"$LIBGS_INCLUDES \$CPPFLAGS\" -eval LIBS=\"$LIBGS_LIBS \$LIBS\" + LIBGS_LIBS= + # Windows (native or MinGW32) has neither <dlfcn.h> nor dlopen(). + if test "x$kpse_cv_have_win32" = xno; then + # FreeBSD neither has nor requires libdl. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 +$as_echo_n "checking for library containing dlopen... " >&6; } +if test "${ac_cv_search_dlopen+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +for ac_lib in '' dl; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_dlopen=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_dlopen+set}" = set; then : + break +fi +done +if test "${ac_cv_search_dlopen+set}" = set; then : - ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" +else + ac_cv_search_dlopen=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 +$as_echo "$ac_cv_search_dlopen" >&6; } +ac_res=$ac_cv_search_dlopen +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + + case $ac_cv_search_dlopen in #( + no | "none required") : + ;; #( + *) : + LIBGS_LIBS=$ac_cv_search_dlopen ;; +esac + ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" if test "x$ac_cv_header_dlfcn_h" = x""yes; then : fi - ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" + ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = x""yes; then : fi - if test "x$ac_cv_header_dlfcn_h:$ac_cv_func_dlopen" != xyes:yes; then - libgs_mode=no - CPPFLAGS=$kpse_save_CPPFLAGS + if test "x$ac_cv_header_dlfcn_h:$ac_cv_func_dlopen" != xyes:yes; then + libgs_mode=no + CPPFLAGS=$kpse_save_CPPFLAGS LIBS=$kpse_save_LIBS $as_echo "#define DISABLE_GS 1" >>confdefs.h - LIBGS_LIBS= + LIBGS_LIBS= + fi fi fi diff --git a/Build/source/texk/dvisvgm/configure.ac b/Build/source/texk/dvisvgm/configure.ac index 6ab273d890f..59bc01124ed 100644 --- a/Build/source/texk/dvisvgm/configure.ac +++ b/Build/source/texk/dvisvgm/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. dnl -dnl Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org> +dnl Copyright (C) 2009, 2010 Peter Breitenlohner <tex-live@tug.org> dnl dnl This file is free software; the copyright holder dnl gives unlimited permission to copy and/or distribute it, @@ -40,6 +40,8 @@ AC_SEARCH_LIBS([sqrt], [m]) AC_CHECK_FUNCS([ftime gettimeofday]) AC_CHECK_HEADERS([sys/time.h sys/timeb.h]) +KPSE_CHECK_WIN32 + KPSE_KPATHSEA_FLAGS KPSE_ZLIB_FLAGS KPSE_FREETYPE2_FLAGS @@ -74,16 +76,23 @@ if test "x$with_system_libgs" = xyes; then else libgs_mode=load LIBGS_INCLUDES= - LIBGS_LIBS=-ldl - KPSE_ADD_FLAGS([libgs]) - AC_CHECK_HEADER([dlfcn.h]) - AC_CHECK_FUNC([dlopen]) - if test "x$ac_cv_header_dlfcn_h:$ac_cv_func_dlopen" != xyes:yes; then - libgs_mode=no - KPSE_RESTORE_FLAGS - AC_DEFINE([DISABLE_GS], 1, - [Set to 1 if PostScript support should be disabled.]) - LIBGS_LIBS= + LIBGS_LIBS= + # Windows (native or MinGW32) has neither <dlfcn.h> nor dlopen(). + if test "x$kpse_cv_have_win32" = xno; then + # FreeBSD neither has nor requires libdl. + AC_SEARCH_LIBS([dlopen], [dl]) + AS_CASE([$ac_cv_search_dlopen], + [no | "none required"], [], + [LIBGS_LIBS=$ac_cv_search_dlopen]) + AC_CHECK_HEADER([dlfcn.h]) + AC_CHECK_FUNC([dlopen]) + if test "x$ac_cv_header_dlfcn_h:$ac_cv_func_dlopen" != xyes:yes; then + libgs_mode=no + KPSE_RESTORE_FLAGS + AC_DEFINE([DISABLE_GS], 1, + [Set to 1 if PostScript support should be disabled.]) + LIBGS_LIBS= + fi fi fi AC_SUBST([LIBGS_INCLUDES]) |