diff options
Diffstat (limited to 'Build/source/texk/xdvik/m4')
-rw-r--r-- | Build/source/texk/xdvik/m4/xdvi-check-iconv.m4 | 85 | ||||
-rw-r--r-- | Build/source/texk/xdvik/m4/xdvi-check-langinfo.m4 | 29 | ||||
-rw-r--r-- | Build/source/texk/xdvik/m4/xdvi-check-xaw.m4 | 59 | ||||
-rw-r--r-- | Build/source/texk/xdvik/m4/xdvi-find-motif.m4 | 26 | ||||
-rw-r--r-- | Build/source/texk/xdvik/m4/xdvi-find-xpm.m4 | 293 | ||||
-rw-r--r-- | Build/source/texk/xdvik/m4/xdvi-iconv-char-pptr-type.m4 | 52 | ||||
-rw-r--r-- | Build/source/texk/xdvik/m4/xdvi-linker-multiple-defns.m4 | 89 | ||||
-rw-r--r-- | Build/source/texk/xdvik/m4/xdvi-old-xaw.m4 | 170 |
8 files changed, 376 insertions, 427 deletions
diff --git a/Build/source/texk/xdvik/m4/xdvi-check-iconv.m4 b/Build/source/texk/xdvik/m4/xdvi-check-iconv.m4 new file mode 100644 index 00000000000..7ffd12bb3d3 --- /dev/null +++ b/Build/source/texk/xdvik/m4/xdvi-check-iconv.m4 @@ -0,0 +1,85 @@ +# Autoconf macros for xdvik. +# Copyright (C) 2004 - 2009 Stefan Ulrich <xdvi-core@lists.sourceforge.net> +# ???? or maybe earlier Copyright by Paul Vojta ?? +# Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org> +# +# This file is free software; the copyright holders +# give unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# XDVI_CHECK_ICONV +# ---------------- +# Check for iconv(), <iconv.h>, and for type of iconv() input argument. +AC_DEFUN([XDVI_CHECK_ICONV], +[AC_ARG_WITH([iconv-include], + AS_HELP_STRING([--with-iconv-include=DIR], + [Specify the location of <iconv.h> header]))[]dnl +AC_ARG_WITH([iconv-libdir], + AS_HELP_STRING([--with-iconv-libdir=DIR], + [Specify the location of iconv (-liconv or -lrecode) library]))[]dnl +AS_CASE([$with_iconv_include], + [yes | no | ""], [iconv_includes=], + [iconv_includes="-I$with_iconv_include"]) +AS_CASE([$with_iconv_libdir], + [yes | no | ""], [iconv_libpath=], + [iconv_libpath="-L$with_iconv_libdir"]) +xdvi_iconv_save_CPPFLAGS=$CPPFLAGS +xdvi_iconv_save_LDFLAGS=$LDFLAGS +xdvi_iconv_save_LIBS=$LIBS +CPPFLAGS="$iconv_includes $CPPFLAGS" +LDFLAGS="$iconv_libpath $LDFLAGS" +# Check if -liconv or -lrecode is needed for iconv() +AC_SEARCH_LIBS([iconv], [iconv recode]) +AS_CASE([$ac_cv_search_iconv], + [no | "none required"], [:], + [iconv_libs="-l$ac_cv_search_iconv"]) +AC_CHECK_FUNCS([iconv]) +AC_CHECK_HEADERS([iconv.h]) +if test "x$ac_cv_func_iconv:$ac_cv_header_iconv_h" = xyes:yes; then + XDVI_ICONV_CHAR_PPTR_TYPE +fi +CPPFLAGS=$xdvi_iconv_save_CPPFLAGS +LDFLAGS=$xdvi_iconv_save_LDFLAGS +LIBS=$xdvi_iconv_save_LIBS +AC_SUBST([iconv_includes]) +AC_SUBST([iconv_libpath]) +AC_SUBST([iconv_libs]) +]) # XDVI_CHECK_ICONV + +# XDVI_ICONV_CHAR_PPTR_TYPE +# ------------------------- +# Check whether iconv takes a 'const char **' or a 'char **' input argument. +# According to IEEE 1003.1, `char **' is correct, but e.g. librecode +# uses `const char **'. +# Inspired by Autoconf's AC_FUNC_SELECT_ARGTYPES we do this without the need +# to run a test program or to use C++. +m4_define([XDVI_ICONV_CHAR_PPTR_TYPE], +[AC_CACHE_CHECK([for iconv input type], + [xdvi_cv_iconv_char_pptr_type], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ +/* iconv() definitions may differ depending on following macros ... */ +#ifdef __hpux +/* On HP-UX 10.10 B and 20.10, compiling with _XOPEN_SOURCE + ..._EXTENDED + * leads to poll() not realizing that a file descriptor is writable in psgs.c. + */ +# define _HPUX_SOURCE 1 +#else +# ifndef _XOPEN_SOURCE +# define _XOPEN_SOURCE 600 +# endif +# define _XOPEN_SOURCE_EXTENDED 1 +# define __EXTENSIONS__ 1 /* needed to get struct timeval on SunOS 5.5 */ +# define _SVID_SOURCE 1 /* needed to get S_IFLNK in glibc */ +# define _BSD_SOURCE 1 /* needed to get F_SETOWN in glibc-2.1.3 */ +#endif + +#include <iconv.h> + ]], + [[extern size_t iconv(iconv_t, char **, size_t *, char**, size_t*);]])], + [xdvi_cv_iconv_char_pptr_type='char **'], + [xdvi_cv_iconv_char_pptr_type='const char **'])]) +AC_DEFINE_UNQUOTED([ICONV_CHAR_PPTR_TYPE], [$xdvi_cv_iconv_char_pptr_type], + [Define the type of the iconv input string (char ** or const char **)]) +]) # XDVI_ICONV_CHAR_PPTR_TYPE diff --git a/Build/source/texk/xdvik/m4/xdvi-check-langinfo.m4 b/Build/source/texk/xdvik/m4/xdvi-check-langinfo.m4 new file mode 100644 index 00000000000..34de37e1d42 --- /dev/null +++ b/Build/source/texk/xdvik/m4/xdvi-check-langinfo.m4 @@ -0,0 +1,29 @@ +# Autoconf macros for xdvik. +# Copyright (C) ???? - 2009 Paul Vojta <xdvi-core@lists.sourceforge.net> +# and/or +# Copyright (C) ???? - 2009 Stefan Ulrich <xdvi-core@lists.sourceforge.net> +# Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org> +# +# This file is free software; the copyright holders +# give unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# XDVI_CHECK_LANGINFO +# ------------------- +# Check for nl_langinfo(), <langinfo.h>, and if nl_langinfo(CODESET) +# is working. +AC_DEFUN([XDVI_CHECK_LANGINFO], +[AC_CHECK_FUNCS([nl_langinfo]) +AC_CHECK_HEADERS([langinfo.h]) +if test "x$ac_cv_func_nl_langinfo:$ac_cv_header_langinfo_h" = xyes:yes; then + AC_CACHE_CHECK([if nl_langinfo(CODESET) is working], + [xdvi_cv_nl_langinfo_codeset], + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <langinfo.h>]], + [[char* cs = nl_langinfo(CODESET);]])], + [xdvi_cv_nl_langinfo_codeset=yes], + [xdvi_cv_nl_langinfo_codeset=no])]) + AS_IF([test "x$xdvi_cv_nl_langinfo_codeset" = xyes], + [AC_DEFINE([HAVE_WORKING_NL_LANGINFO_CODESET], 1, + [Define if the CODESET argument to nl_langinfo works.])]) +fi +]) # XDVI_CHECK_LANGINFO diff --git a/Build/source/texk/xdvik/m4/xdvi-check-xaw.m4 b/Build/source/texk/xdvik/m4/xdvi-check-xaw.m4 new file mode 100644 index 00000000000..fe56f6616f9 --- /dev/null +++ b/Build/source/texk/xdvik/m4/xdvi-check-xaw.m4 @@ -0,0 +1,59 @@ +# Autoconf macros for xdvik. +# Copyright (C) 2003 - 2009 Stefan Ulrich <xdvi-core@lists.sourceforge.net> +# Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org> +# +# This file is free software; the copyright holders +# give unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +## + +dnl ### Check for Xaw version +AC_DEFUN([XDVI_CHECK_XAW], [_XDVI_CHECK_XAW_HEADERS]) + +# _XDVI_CHECK_XAW_HEADERS +# ----------------------- +# Check for Xaw headers. +m4_define([_XDVI_CHECK_XAW_HEADERS], +[save_CPPFLAGS=$CPPFLAGS +CPPFLAGS="$CPPFLAGS $X_CFLAGS" +AC_MSG_CHECKING([for Xaw library]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#include <X11/X.h> +#include <X11/Xlib.h> +#include <X11/Xutil.h> +#include <X11/Xos.h> + +#include <X11/Xfuncs.h> +#include <X11/Intrinsic.h> +#include <X11/Xaw/Form.h>]])], + [xdvi_have_xaw=yes], + [xdvi_have_xaw=no]) +AC_MSG_RESULT([$xdvi_have_xaw]) +# +if test "x$xdvi_have_xaw" = xyes; then + _XDVI_CHECK_XAW_VERSION +fi +CPPFLAGS=$save_CPPFLAGS +]) # _XDVI_CHECK_XAW_HEADERS + +# _XDVI_CHECK_XAW_VERSION +# ----------------------- +# Check Xaw version. +m4_define([_XDVI_CHECK_XAW_VERSION], +[ +save_CPPFLAGS=$CPPFLAGS +CPPFLAGS="$CPPFLAGS $X_CFLAGS" +AC_CHECK_MEMBER([SimpleClassPart.extension], + [], + [AC_DEFINE([HAVE_OLD_XAW], 1, + [Define if you have an old version of the Xaw library])], + [[ +#include <X11/IntrinsicP.h> +#include <X11/StringDefs.h> +#include <X11/Intrinsic.h> +#include <X11/StringDefs.h> +#include <X11/Xos.h> +#include <X11/Xaw/SimpleP.h>]]) +CPPFLAGS=$save_CPPFLAGS +]) # _XDVI_CHECK_XAW_VERSION diff --git a/Build/source/texk/xdvik/m4/xdvi-find-motif.m4 b/Build/source/texk/xdvik/m4/xdvi-find-motif.m4 index 0130bb095d0..c9d2d136e69 100644 --- a/Build/source/texk/xdvik/m4/xdvi-find-motif.m4 +++ b/Build/source/texk/xdvik/m4/xdvi-find-motif.m4 @@ -1,14 +1,26 @@ +# Autoconf macros for xdvik. +# Copyright (C) 2001 - 2009 Marcin Dalecki <xdvi-core@lists.sourceforge.net> +# Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org> +# +# This file is free software; the copyright holders +# give unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + dnl ### Check for Motif libraries and headers dnl Put Motif include directory in motif_include, dnl put Motif library directory in motif_libdir, dnl and add appropriate flags to X_CFLAGS and X_LIBS. -dnl If $1 is not `none', use Xaw as default toolkit if Motif isn't found. +dnl If default_toolkit is not `none', use Xaw as default toolkit if Motif isn't found. AC_DEFUN([XDVI_FIND_MOTIF], -[ -default_toolkit="$1" -AC_REQUIRE([AC_PATH_XTRA]) -AC_MSG_CHECKING(for Motif) +[AC_REQUIRE([AC_PATH_XTRA]) +AC_MSG_CHECKING([for Motif]) # +AC_ARG_WITH([motif-include], + AS_HELP_STRING([--with-motif-include=DIR], + [Specify the location of Motif include files])) +AC_ARG_WITH([motif-libdir], + AS_HELP_STRING([--with-motif-libdir=DIR], + [Specify the location of Motif libraries])) # # Search the include files. # @@ -197,9 +209,7 @@ if test "$motif_include_result" != "" && test "$motif_libdir_result" != ""; then ]) else AC_MSG_RESULT([not found, using Xaw]) - prog_extension="xaw" - AC_DEFINE(XAW) - x_tool_libs="-lXaw" + with_xdvi_x_toolkit="xaw" fi # diff --git a/Build/source/texk/xdvik/m4/xdvi-find-xpm.m4 b/Build/source/texk/xdvik/m4/xdvi-find-xpm.m4 index 0d22282782d..fce20f51464 100644 --- a/Build/source/texk/xdvik/m4/xdvi-find-xpm.m4 +++ b/Build/source/texk/xdvik/m4/xdvi-find-xpm.m4 @@ -1,59 +1,131 @@ -dnl ### for Xpm libraries and headers. -dnl Put Xpm include directory in xpm_includes, -dnl put Xpm library directory in xpm_libraries, -dnl and add appropriate flags to X_CFLAGS and X_LIBS. -dnl +# Autoconf macros for xdvik. +# Copyright (C) 2001 - 2009 Marcin Dalecki <xdvi-core@lists.sourceforge.net> +# Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org> +# +# This file is free software; the copyright holders +# give unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# XDVI_FIND_XPM +# ------------- +# Put Xpm include directory in xpm_includes, +# put Xpm library directory in xpm_libraries, +# define x_xpm_libs, +# and add appropriate flags to X_CFLAGS and X_LIBS. AC_DEFUN([XDVI_FIND_XPM], -[ -AC_REQUIRE([AC_PATH_XTRA]) +[AC_REQUIRE([AC_PATH_XTRA]) xpm_includes= xpm_libraries= AC_ARG_WITH([xpm], -[ --without-xpm Do not use the Xpm library (will disable the toolbar)]) + AS_HELP_STRING([--without-xpm], + [Do not use the Xpm library (will disable the toolbar)]))[]dnl +AC_ARG_WITH([xpm-includes], + AS_HELP_STRING([--with-xpm-include=DIR], + [Specify the location of Xpm include files]), + [xpm_includes="$withval"]) +AC_ARG_WITH([xpm-libraries], + AS_HELP_STRING([--with-xpm-libdir=DIR], + [Specify the location of Xpm libraries]), + [xpm_libraries="$withval"]) dnl Treat --without-xpm like dnl --without-xpm-includes --without-xpm-libraries. -if test "$with_xpm" = "no" +if test "x$with_xpm" = xno; then + xpm_includes=no + xpm_libraries=no +fi +AC_MSG_CHECKING([for Xpm]) +# +# Check the headers. +# +if test "x$xpm_includes" = x; then + _XDVI_FIND_XPM_INCLUDES +fi +if test "x$xpm_includes" != x; then + if test "x$xpm_includes" = xdefault; then + AC_DEFINE([HAVE_X11_XPM_H], 1, [Define if you have the <X11/xpm.h> header file.]) + elif test -f "$xpm_includes/X11/xpm.h"; then + AC_DEFINE([HAVE_X11_XPM_H], 1) + elif test -f "$xpm_includes/xpm.h"; then + AC_DEFINE([HAVE_XPM_H], 1, + [Define if you have the <xpm.h> header file (not in X11, e.g. Solaris 5.8).]) + fi +fi +# +# Check the libraries. +# +if test "x$xpm_libraries" = x; then + _XDVI_FIND_XPM_LIBRARIES +fi +# +# Add Xpm definitions to X flags +# +if test "x$xpm_includes" != "xdefault" && test "$xpm_includes" != "" \ + && test "$xpm_includes" != "$x_includes" && test "$xpm_includes" != "no" then -xpm_includes=no -xpm_libraries=no + X_CFLAGS="-I$xpm_includes $X_CFLAGS" fi -AC_ARG_WITH([xpm-includes], -[ --with-xpm-include=DIR - Specify the location of Xpm include files], -[xpm_includes="$withval"]) -AC_ARG_WITH([xpm-libraries], -[ --with-xpm-libdir=DIR - Specify the location of Xpm libraries], -[xpm_libraries="$withval"]) -AC_MSG_CHECKING(for Xpm) # +if test "x$xpm_libraries" != "xdefault" && test "$xpm_libraries" != "" \ + && test "$xpm_libraries" != "$x_libraries" && test "$xpm_libraries" != "no" +then + case "$X_LIBS" in + *-R\ *) X_LIBS="-L$xpm_libraries -R $xpm_libraries $X_LIBS";; + *-R*) X_LIBS="-L$xpm_libraries -R$xpm_libraries $X_LIBS";; + *) X_LIBS="-L$xpm_libraries $X_LIBS";; + esac +fi # -# Search the include files. XPM can either be in <X11/xpm.h> (as in X11R6), -# which is dealt with by AC_CHECK_HEADERS(X11/xpm.h), or in <xpm.h> if installed locally; -# this is what this test is for. +# Now check the results of headers and libraries and set USE_XPM to 0 +# if one of them hadn't been found. # -if test "$xpm_includes" = ""; then -AC_CACHE_VAL(xdvi_cv_xpm_includes, -[ -xdvi_xpm_save_LIBS="$LIBS" -xdvi_xpm_save_CFLAGS="$CFLAGS" -xdvi_xpm_save_CPPFLAGS="$CPPFLAGS" -xdvi_xpm_save_LDFLAGS="$LDFLAGS" +AC_DEFINE([USE_XPM], 1, [Define if you want to use the Xpm library]) +x_xpm_libs="-lXpm" +# +xpm_libraries_result=$xpm_libraries +if test "x$xpm_libraries_result" = xdefault ; then + xpm_libraries_result="in default path" +elif test "$xpm_libraries_result" = no || test "x$xpm_libraries_result" = "x"; then + xpm_libraries_result="(none)" + AC_DEFINE([USE_XPM], 0) + x_xpm_libs="" +fi +AC_SUBST([x_xpm_libs]) +# +xpm_includes_result=$xpm_includes +if test "x$xpm_includes_result" = "xdefault"; then + xpm_includes_result="in default path" +elif test "$xpm_includes_result" = no || test "x$xpm_includes_result" = "x"; then + AC_DEFINE([USE_XPM], 0) + xpm_includes_result="(none)" +fi +# +AC_MSG_RESULT([libraries $xpm_libraries_result, headers $xpm_includes_result]) +]) # XDVI_FIND_XPM + +# _XDVI_FIND_XPM_INCLUDES +# ----------------------- +# Search the Xpm include files. +# They can either be in <X11/xpm.h> (as in X11R6), which is dealt with +# by AC_CHECK_HEADERS([X11/xpm.h]), +# or in <xpm.h> if installed locally; this is what this test is for. +m4_define([_XDVI_FIND_XPM_INCLUDES], +[AC_CACHE_VAL([xdvi_cv_xpm_includes], +[xdvi_xpm_save_LIBS=$LIBS +xdvi_xpm_save_CFLAGS=$CFLAGS +xdvi_xpm_save_CPPFLAGS=$CPPFLAGS +xdvi_xpm_save_LDFLAGS=$LDFLAGS # LIBS="$X_PRE_LIBS -lXpm -lXt -lX11 $X_EXTRA_LIBS $LIBS" CFLAGS="$X_CFLAGS $CFLAGS" CPPFLAGS="$X_CFLAGS $CPPFLAGS" LDFLAGS="$X_LIBS $LDFLAGS" # -AC_TRY_COMPILE([ -#include <X11/xpm.h> -],[int a;], -[ -# X11/xpm.h is in the standard search path. -xdvi_cv_xpm_includes="default" -], -[ -# X11/xpm.h is not in the standard search path. +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/xpm.h>]], + [[int a;]])], + [# X11/xpm.h is in the standard search path. + xdvi_cv_xpm_includes=default], + [# X11/xpm.h is not in the standard search path. + xdvi_cv_xpm_includes=no # Locate it and put its directory in `xpm_includes' # # /usr/include/Motif* are used on HP-UX (Motif). @@ -71,71 +143,48 @@ for dir in "$x_includes" "${prefix}/include" /usr/include /usr/local/include \ "${prefix}"/include/* /usr/include/* /usr/local/include/* do if test -f "$dir/X11/xpm.h"; then - xdvi_cv_xpm_includes="$dir" + xdvi_cv_xpm_includes=$dir break elif test -f "$dir/xpm.h"; then - xdvi_cv_xpm_includes="$dir" + xdvi_cv_xpm_includes=$dir break fi -done -]) -# -LIBS="$xdvi_xpm_save_LIBS" -CFLAGS="$xdvi_xpm_save_CFLAGS" -CPPFLAGS="$xdvi_xpm_save_CPPFLAGS" -LDFLAGS="$xdvi_xpm_save_LDFLAGS" -]) -xpm_includes="$xdvi_cv_xpm_includes" -fi - -dnl Second arg of AC_CACHE_VAL shouldn't contain any AC_DEFINE's, -dnl moved them out. Peter Breitenlohner <peb@mppmu.mpg.de> -dnl -if test "x$xpm_includes" != x; then - if test "x$xpm_includes" = xdefault; then - AC_DEFINE([HAVE_X11_XPM_H], 1, [Define if you have the <X11/xpm.h> header file.]) - elif test -f "$xpm_includes/X11/xpm.h"; then - AC_DEFINE([HAVE_X11_XPM_H], 1) - elif test -f "$xpm_includes/xpm.h"; then - AC_DEFINE([HAVE_XPM_H], 1, - [Define if you have the <xpm.h> header file (not in X11, e.g. Solaris 5.8).]) - fi -fi - +done]) # +LIBS=$xdvi_xpm_save_LIBS +CFLAGS=$xdvi_xpm_save_CFLAGS +CPPFLAGS=$xdvi_xpm_save_CPPFLAGS +LDFLAGS=$xdvi_xpm_save_LDFLAGS]) # -# Now for the libraries. -# -if test "$xpm_libraries" = ""; then -AC_CACHE_VAL(xdvi_cv_xpm_libraries, -[ -xdvi_xpm_save_LIBS="$LIBS" -xdvi_xpm_save_CFLAGS="$CFLAGS" -xdvi_xpm_save_CPPFLAGS="$CPPFLAGS" -xdvi_xpm_save_LDFLAGS="$LDFLAGS" +xpm_includes=$xdvi_cv_xpm_includes +]) # _XDVI_FIND_XPM_INCLUDES + +# _XDVI_FIND_XPM_LIBRARIES +# ------------------------ +# Search the Xpm library. +m4_define([_XDVI_FIND_XPM_LIBRARIES], +[AC_CACHE_VAL([xdvi_cv_xpm_libraries], +[xdvi_xpm_save_LIBS=$LIBS +xdvi_xpm_save_CFLAGS=$CFLAGS +xdvi_xpm_save_CPPFLAGS=$CPPFLAGS +xdvi_xpm_save_LDFLAGS=$LDFLAGS # LIBS="$X_PRE_LIBS -lXpm -lXt -lX11 $X_EXTRA_LIBS $LIBS" CFLAGS="$X_CFLAGS $CFLAGS" CPPFLAGS="$X_CFLAGS $CPPFLAGS" LDFLAGS="$X_LIBS $LDFLAGS" -xdvi_cv_xpm_libraries= -# # # We use XtToolkitInitialize() here since it takes no arguments # and thus also works with a C++ compiler. -AC_TRY_LINK([ -#include <X11/Intrinsic.h> -#include <X11/xpm.h> -],[XtToolkitInitialize();], -[ -# libxpm.a is in the standard search path. -xdvi_cv_xpm_libraries="default" -], -[ -# libXpm.a is not in the standard search path. +AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <X11/Intrinsic.h> +#include <X11/xpm.h>]], + [[XtToolkitInitialize();]])], + [# libxpm.a is in the standard search path. + xdvi_cv_xpm_libraries=default], + [# libXpm.a is not in the standard search path. + xdvi_cv_xpm_libraries=no # Locate it and put its directory in `xpm_libraries' # -# # /usr/lib/Motif* are used on HP-UX (Motif). # /usr/lib/X11* are used on HP-UX (X and Xpm). # /usr/dt is used on Solaris (Motif). @@ -150,68 +199,14 @@ for dir in "$x_libraries" "${prefix}/lib" /usr/lib /usr/local/lib \ "${prefix}"/lib/* /usr/lib/* /usr/local/lib/* do if test -d "$dir" && test "`ls $dir/libXpm.* 2> /dev/null`" != ""; then - xdvi_cv_xpm_libraries="$dir" + xdvi_cv_xpm_libraries=$dir break fi -done -]) -# -LIBS="$xdvi_xpm_save_LIBS" -CFLAGS="$xdvi_xpm_save_CFLAGS" -CPPFLAGS="$xdvi_xpm_save_CPPFLAGS" -LDFLAGS="$xdvi_xpm_save_LDFLAGS" -]) +done]) # -xpm_libraries="$xdvi_cv_xpm_libraries" -fi +LIBS=$xdvi_xpm_save_LIBS +CFLAGS=$xdvi_xpm_save_CFLAGS +CPPFLAGS=$xdvi_xpm_save_CPPFLAGS +LDFLAGS=$xdvi_xpm_save_LDFLAGS]) # -# Add Xpm definitions to X flags -# -if test "x$xpm_includes" != "xdefault" && test "$xpm_includes" != "" \ - && test "$xpm_includes" != "$x_includes" && test "$xpm_includes" != "no" -then - X_CFLAGS="-I$xpm_includes $X_CFLAGS" -fi - -if test "x$xpm_libraries" != "xdefault" && test "$xpm_libraries" != "" \ - && test "$xpm_libraries" != "$x_libraries" && test "$xpm_libraries" != "no" -then -case "$X_LIBS" in - *-R\ *) X_LIBS="-L$xpm_libraries -R $xpm_libraries $X_LIBS";; - *-R*) X_LIBS="-L$xpm_libraries -R$xpm_libraries $X_LIBS";; - *) X_LIBS="-L$xpm_libraries $X_LIBS";; -esac -fi - -# -# -x_xpm_libs="-lXpm" -# -# Now check the results of headers and libraries and set USE_XPM to 0 -# if one of them hadn't been found. -# -AC_DEFINE([USE_XPM], 1, [Define if you want to use the Xpm library]) -xpm_libraries_result="$xpm_libraries" -xpm_includes_result="$xpm_includes" -if test "x$xpm_libraries_result" = "xdefault" ; then - xpm_libraries_result="in default path" -elif test "$xpm_libraries_result" = no || test "x$xpm_libraries_result" = "x"; then - xpm_libraries_result="(none)" - AC_DEFINE([USE_XPM], 0) - x_xpm_libs="" -fi - -if test "x$xpm_includes_result" = "xdefault"; then - xpm_includes_result="in default path" -elif test "$xpm_includes_result" = no || test "x$xpm_includes_result" = "x"; then - AC_DEFINE(USE_XPM, 0) - xpm_includes_result="(none)" -fi - -AC_SUBST(x_xpm_libs) -AC_MSG_RESULT( - [libraries $xpm_libraries_result, headers $xpm_includes_result]) -])dnl - - - +xpm_libraries="$xdvi_cv_xpm_libraries"]) # _XDVI_FIND_XPM_LIBRARIES diff --git a/Build/source/texk/xdvik/m4/xdvi-iconv-char-pptr-type.m4 b/Build/source/texk/xdvik/m4/xdvi-iconv-char-pptr-type.m4 deleted file mode 100644 index 4c6e74e760f..00000000000 --- a/Build/source/texk/xdvik/m4/xdvi-iconv-char-pptr-type.m4 +++ /dev/null @@ -1,52 +0,0 @@ -# Autoconf macros for xdvik. -# Copyright (C) 2004 - 2009 Stefan Ulrich <xdvi-core@lists.sourceforge.net> -# Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org> -# -# This file is free software; the copyright holders -# give unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# XDVI_ICONV_CHAR_PPTR_TYPE -# ------------------------- -# Check whether iconv takes a 'const char **' or a 'char **' input argument. -# According to IEEE 1003.1, `char **' is correct, but e.g. librecode -# uses `const char **'. -# Inspired by Autoconf's AC_FUNC_SELECT_ARGTYPES we do this without the need -# to run a test program or to use C++. -AC_DEFUN([XDVI_ICONV_CHAR_PPTR_TYPE], -[AC_CACHE_CHECK([for iconv input type], - [xdvi_cv_iconv_char_pptr_type], - [ - xdvi_iconv_save_cppflags=$CPPFLAGS - xdvi_iconv_save_libs=$LIBS - CPPFLAGS="$CPPFLAGS $iconv_includes" - LIBS="$LIBS $iconv_libpath $iconv_libs" - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[ -/* iconv() definitions may differ depending on following macros ... */ -#ifdef __hpux -/* On HP-UX 10.10 B and 20.10, compiling with _XOPEN_SOURCE + ..._EXTENDED - * leads to poll() not realizing that a file descriptor is writable in psgs.c. - */ -# define _HPUX_SOURCE 1 -#else -# ifndef _XOPEN_SOURCE -# define _XOPEN_SOURCE 600 -# endif -# define _XOPEN_SOURCE_EXTENDED 1 -# define __EXTENSIONS__ 1 /* needed to get struct timeval on SunOS 5.5 */ -# define _SVID_SOURCE 1 /* needed to get S_IFLNK in glibc */ -# define _BSD_SOURCE 1 /* needed to get F_SETOWN in glibc-2.1.3 */ -#endif - -#include <iconv.h> - ]], - [[extern size_t iconv(iconv_t, char **, size_t *, char**, size_t*);]])], - [xdvi_cv_iconv_char_pptr_type='char **'], - [xdvi_cv_iconv_char_pptr_type='const char **']) - CPPFLAGS=$xdvi_iconv_save_cppflags - LIBS=$xdvi_iconv_save_libs]) -AC_DEFINE_UNQUOTED([ICONV_CHAR_PPTR_TYPE], [$xdvi_cv_iconv_char_pptr_type], - [Define the type of the iconv input string (char ** or const char **)]) -]) # XDVI_ICONV_CHAR_PPTR_TYPE diff --git a/Build/source/texk/xdvik/m4/xdvi-linker-multiple-defns.m4 b/Build/source/texk/xdvik/m4/xdvi-linker-multiple-defns.m4 index 5c67903a2b9..01f373cdcd6 100644 --- a/Build/source/texk/xdvik/m4/xdvi-linker-multiple-defns.m4 +++ b/Build/source/texk/xdvik/m4/xdvi-linker-multiple-defns.m4 @@ -14,64 +14,57 @@ # and if it doesn't, don't define LD_ALLOWS_MULTIPLE_DEFINITIONS. AC_DEFUN([XDVI_LINKER_MULTIPLE_DEFNS], -[AC_CACHE_CHECK([whether linker supports the --allow-multiple-definition flag], - [xdvi_cv_linker_multiple_defns], - [xdvi_save_LDFLAGS=$LDFLAGS - LDFLAGS="-Xlinker --allow-multiple-definition" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], - [[void foo(void);]])], - [xdvi_cv_linker_multiple_defns=yes], - [xdvi_cv_linker_multiple_defns=no]) - LDFLAGS=$xdvi_save_LDFLAGS]) +[AC_CACHE_CHECK( + [if linker supports multiple definitions and for required flags], + [xdvi_cv_linker_multiple_defns], + [xdvi_ld_save_LDFLAGS=$LDFLAGS + LDFLAGS="-Xlinker --allow-multiple-definition" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[#include <stdio.h>]], [[void foo(void);]])], + [xdvi_cv_linker_multiple_defns=$LDFLAGS], + [xdvi_ld_save_LIBS=$LIBS + xdvi_ld_save_CFLAGS=$CFLAGS + xdvi_ld_save_CPPFLAGS=$CPPFLAGS -x_linker_options="" -AS_CASE([$xdvi_cv_linker_multiple_defns], - [yes], [x_linker_options="-Xlinker --allow-multiple-definition"], - ["by default"], [], - [AC_MSG_CHECKING([whether linker supports multiple definitions]) - - xdvi_ld_save_LIBS=$LIBS - xdvi_ld_save_CFLAGS=$CFLAGS - xdvi_ld_save_CPPFLAGS=$CPPFLAGS - xdvi_ld_save_LDFLAGS=$LDFLAGS + LIBS="$X_PRE_LIBS -lXt -lX11 $X_EXTRA_LIBS $LIBS" + CFLAGS="$X_CFLAGS $CFLAGS" + CPPFLAGS="$X_CFLAGS $CPPFLAGS" + LDFLAGS="$X_LIBS $xdvi_ld_save_LDFLAGS" - LIBS="$X_PRE_LIBS -lXt -lX11 $X_EXTRA_LIBS $LIBS" - CFLAGS="$X_CFLAGS $CFLAGS" - CPPFLAGS="$X_CFLAGS $CPPFLAGS" - LDFLAGS="$X_LIBS $LDFLAGS" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include <X11/Intrinsic.h> - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <X11/Intrinsic.h> + XtIntervalId XtAppAddTimeOut(XtAppContext app, + unsigned long interval, + XtTimerCallbackProc proc, + XtPointer closure) + { + (void)app; (void)interval; (void)proc; (void)closure; + return (XtIntervalId)0; + }]], + [[XtIntervalId i = 0; XtRemoveTimeOut(i);]])], + [xdvi_cv_linker_multiple_defns="none required"], + [xdvi_cv_linker_multiple_defns=unsupported]) - XtIntervalId XtAppAddTimeOut(XtAppContext app, - unsigned long interval, - XtTimerCallbackProc proc, - XtPointer closure) - { - (void)app; (void)interval; (void)proc; (void)closure; - return (XtIntervalId)0; - } - ]], - [[XtIntervalId i = 0; XtRemoveTimeOut(i);]])], - [xdvi_cv_linker_multiple_defns="by default"]) + LIBS=$xdvi_ld_save_LIBS + CFLAGS=$xdvi_ld_save_CFLAGS + CPPFLAGS=$xdvi_ld_save_CPPFLAGS]) + LDFLAGS=$xdvi_ld_save_LDFLAGS]) - LIBS=$xdvi_ld_save_LIBS - CFLAGS=$xdvi_ld_save_CFLAGS - CPPFLAGS=$xdvi_ld_save_CPPFLAGS - LDFLAGS=$xdvi_ld_save_LDFLAGS - - AC_MSG_RESULT([$xdvi_cv_linker_multiple_defns])]) -if test "x$xdvi_cv_linker_multiple_defns" != xno; then - AC_DEFINE([LD_ALLOWS_MULTIPLE_DEFINITIONS], 1, - [Define if your system allows multiple definitions of functions.]) -else - AC_MSG_WARN([Linker does not allow multiple definitions. +x_linker_options="" +AS_CASE([$xdvi_cv_linker_multiple_defns], + ["none required"], [AC_DEFINE([LD_ALLOWS_MULTIPLE_DEFINITIONS], 1, + [Define if your system allows multiple definitions of functions.])], + [unsupported], [AC_MSG_WARN([Linker does not allow multiple definitions. ***************************************************************** * Warning: Your linker does not allow multiple definitions. * * This does not make xdvik unusable, but it will cause problems * * with event handling: Some widgets, e.g. the print log window, * * tooltips, statusline messages and hyperlink location markers * * will not be updated until the mouse is moved. * - *****************************************************************]) -fi + *****************************************************************])], + [x_linker_options=$xdvi_cv_linker_multiple_defns + AC_DEFINE([LD_ALLOWS_MULTIPLE_DEFINITIONS], 1)]) AC_SUBST([x_linker_options]) ]) # XDVI_LINKER_MULTIPLE_DEFNS diff --git a/Build/source/texk/xdvik/m4/xdvi-old-xaw.m4 b/Build/source/texk/xdvik/m4/xdvi-old-xaw.m4 deleted file mode 100644 index c64a37daf2c..00000000000 --- a/Build/source/texk/xdvik/m4/xdvi-old-xaw.m4 +++ /dev/null @@ -1,170 +0,0 @@ -dnl ### Check for Xaw version -AC_DEFUN([XDVI_OLD_XAW],[ -if test "${with_xdvi_x_toolkit}" = xaw; then - AC_MSG_CHECKING(for Xaw library) - save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $X_CFLAGS" - AC_TRY_COMPILE([ -#include <X11/X.h> -#include <X11/Xlib.h> -#include <X11/Xutil.h> -#include <X11/Xos.h> - -#include <X11/Xfuncs.h> -#include <X11/Intrinsic.h> -#include <X11/Xaw/Form.h> - ],[ - ], - xdvi_have_xaw=yes, xdvi_have_xaw=no - ) - CPPFLAGS=$save_CPPFLAGS - if test $xdvi_have_xaw = yes; then - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(not found) - AC_MSG_ERROR([Sorry, you will need at least the Xaw header/library files to compile xdvik.]) - fi - - AC_MSG_CHECKING(version of Xaw library) - save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $X_CFLAGS" - AC_TRY_COMPILE([ -#include <X11/IntrinsicP.h> -#include <X11/StringDefs.h> -#include <X11/Intrinsic.h> -#include <X11/StringDefs.h> -#include <X11/Xos.h> -#include <X11/Xaw/Text.h> -#include <X11/Xaw/AsciiText.h> -#include <X11/Xaw/ToggleP.h> - typedef void (*XawDiamondProc) (Widget); - - /* New fields for the Radio widget class record */ - typedef struct _RadioClass { - Dimension dsize; /* diamond size */ - XawDiamondProc drawDiamond; - /* pixmaps for the button */ - Pixmap sel_radio; /* selected state */ - Pixmap unsel_radio; /* unselected state */ - Pixmap sel_menu; /* selected state */ - Pixmap unsel_menu; /* unselected state */ - /* TODO: 3-d and xaw-xpm features? */ - XtPointer extension; - } RadioClassPart; - - /* Full class record declaration */ - typedef struct _RadioClassRec { - CoreClassPart core_class; - SimpleClassPart simple_class; - LabelClassPart label_class; - CommandClassPart command_class; - ToggleClassPart toggle_class; - RadioClassPart radio_class; - } RadioClassRec; - /* New fields for the Radio widget record */ - typedef struct { - /* resources */ - Boolean isRadio; /* radio if True, checkbox else */ - /* TODO: 3-d and xaw-xpm features? */ - - /* private data */ - XtPointer extension; - } RadioPart; - - /* Full widget declaration */ - typedef struct _RadioRec { - CorePart core; - SimplePart simple; -#ifdef _ThreeDP_h - ThreeDPart threeD; -#endif - LabelPart label; - CommandPart command; - TogglePart toggle; - RadioPart radio; - } RadioRec; - - - /* The actions table from Toggle is almost perfect, but we need - * to override Highlight, Set, and Unset. - */ - -#define SuperClass ((ToggleWidgetClass)&toggleClassRec) - -#define BOX_SIZE 16 -#define PIXMAP_OFFSET 2 /* additional space between pixmap and label */ - ],[ - RadioClassRec radioClassRec = { - { - (WidgetClass) SuperClass, /* superclass */ - "Radio", /* class_name */ - sizeof(RadioRec), /* size */ - NULL, /* class_initialize */ - NULL, /* class_part_initialize */ - FALSE, /* class_inited */ - NULL, /* initialize */ - NULL, /* initialize_hook */ - XtInheritRealize, /* realize */ - NULL, /* actions */ - 0, /* num_actions */ - NULL, /* resources */ - 0, /* resource_count */ - NULLQUARK, /* xrm_class */ - TRUE, /* compress_motion */ - TRUE, /* compress_exposure */ - TRUE, /* compress_enterleave */ - FALSE, /* visible_interest */ - NULL, /* destroy */ - NULL, /* resize */ - NULL, /* expose */ - NULL, /* set_values */ - NULL, /* set_values_hook */ - XtInheritSetValuesAlmost, /* set_values_almost */ - NULL, /* get_values_hook */ - NULL, /* accept_focus */ - XtVersion, /* version */ - NULL, /* callback_private */ - XtInheritTranslations, /* tm_table */ - NULL, /* query_geometry */ - XtInheritDisplayAccelerator, /* display_accelerator */ - NULL /* extension */ - }, /* CoreClass fields initialization */ - { - XtInheritChangeSensitive, /* change_sensitive */ - NULL - }, /* SimpleClass fields initialization */ - { - 0 /* field not used */ - }, /* LabelClass fields initialization */ - { - 0 /* field not used */ - }, /* CommandClass fields initialization */ - { - NULL, /* Set Procedure. */ - NULL, /* Unset Procedure. */ - NULL /* extension. */ - }, /* ToggleClass fields initialization */ - { - BOX_SIZE, - NULL, /* draw procedure */ - None, /* selected radiobutton */ - None, /* unselected radiobutton */ - None, /* selected menubutton */ - None, /* unselected menubutton */ - NULL /* extension. */ - } /* RadioClass fields initialization */ - }; - (void)radioClassRec; - ], - xdvi_old_xaw=no, xdvi_old_xaw=yes - ) - CPPFLAGS=$save_CPPFLAGS -if test $xdvi_old_xaw = yes; then - AC_MSG_RESULT(old) - AC_DEFINE([HAVE_OLD_XAW], 1, - [Define if you have an old version of the Xaw library]) -else - AC_MSG_RESULT(current) -fi -fi -]) |