diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-04-24 15:19:37 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-04-24 15:19:37 +0000 |
commit | 51ebb9cb3b77f55e8f5b41f7a2dc12ca3d24f8a1 (patch) | |
tree | f4051e33af6f6489005e2a47fc5a6fda891ea8bb /Build/source/texk/xdvik | |
parent | 481a11df4cbb82f94470352ea87dcc76d6ca19bd (diff) |
new build system: towards completion
git-svn-id: svn://tug.org/texlive/trunk@12813 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/xdvik')
-rwxr-xr-x | Build/source/texk/xdvik/configure | 149 | ||||
-rw-r--r-- | Build/source/texk/xdvik/m4/xdvi-c-bitmap-type.m4 | 9 | ||||
-rw-r--r-- | Build/source/texk/xdvik/m4/xdvi-cc-concat.m4 | 28 | ||||
-rw-r--r-- | Build/source/texk/xdvik/m4/xdvi-func-memicmp.m4 | 28 | ||||
-rw-r--r-- | Build/source/texk/xdvik/m4/xdvi-func-poll.m4 | 30 | ||||
-rw-r--r-- | Build/source/texk/xdvik/m4/xdvi-func-setsid-in-fork.m4 | 44 | ||||
-rw-r--r-- | Build/source/texk/xdvik/m4/xdvi-func-working-vsnprintf.m4 | 43 | ||||
-rw-r--r-- | Build/source/texk/xdvik/m4/xdvi-iconv-char-pptr-type.m4 | 8 | ||||
-rw-r--r-- | Build/source/texk/xdvik/m4/xdvi-linker-multiple-defns.m4 | 108 | ||||
-rw-r--r-- | Build/source/texk/xdvik/m4/xdvi-sys-old-linux.m4 | 28 | ||||
-rw-r--r-- | Build/source/texk/xdvik/m4/xdvi-sys-streams.m4 | 29 | ||||
-rw-r--r-- | Build/source/texk/xdvik/m4/xdvi-sys-sunos4.m4 | 28 |
12 files changed, 299 insertions, 233 deletions
diff --git a/Build/source/texk/xdvik/configure b/Build/source/texk/xdvik/configure index adaccc54b1b..c52b51f6fc1 100755 --- a/Build/source/texk/xdvik/configure +++ b/Build/source/texk/xdvik/configure @@ -13888,8 +13888,7 @@ if test "${xdvi_cv_func_good_vsnprintf+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then - # safe value for cross-compiling -xdvi_cv_func_good_vsnprintf=no + xdvi_cv_func_good_vsnprintf=no # safe value for cross-compiling else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -13902,12 +13901,14 @@ cat >>conftest.$ac_ext <<_ACEOF #define _XOPEN_SOURCE 500 #endif #include <stdio.h> -int main() +int +main () { - char s[2]; +char s[2]; int retval = snprintf(s, 2, "test"); if (retval > -1 && retval != 4) /* neither negative nor desired size, not OK */ return 1; + ; return 0; } _ACEOF @@ -13950,13 +13951,14 @@ fi fi { $as_echo "$as_me:$LINENO: result: $xdvi_cv_func_good_vsnprintf" >&5 $as_echo "$xdvi_cv_func_good_vsnprintf" >&6; } -if test $xdvi_cv_func_good_vsnprintf = yes; then +if test "x$xdvi_cv_func_good_vsnprintf" = xyes; then cat >>confdefs.h <<\_ACEOF #define HAVE_GOOD_VSNPRINTF 1 _ACEOF fi + { $as_echo "$as_me:$LINENO: checking for memicmp" >&5 $as_echo_n "checking for memicmp... " >&6; } if test "${xdvi_cv_memicmp+set}" = set; then @@ -13969,7 +13971,6 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <string.h> - int main () { @@ -14013,13 +14014,14 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ fi { $as_echo "$as_me:$LINENO: result: $xdvi_cv_memicmp" >&5 $as_echo "$xdvi_cv_memicmp" >&6; } -if test $xdvi_cv_memicmp = yes; then +if test "x$xdvi_cv_memicmp" = xyes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MEMICMP 1 _ACEOF fi + # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { $as_echo "$as_me:$LINENO: checking for working alloca.h" >&5 @@ -16540,15 +16542,14 @@ _ACEOF fi -if test $ac_cv_func_vfork_works = yes; then -{ $as_echo "$as_me:$LINENO: checking for whether setsid() is allowed within vfork()" >&5 +if test "x$ac_cv_func_vfork_works" = xyes; then + { $as_echo "$as_me:$LINENO: checking for whether setsid() is allowed within vfork()" >&5 $as_echo_n "checking for whether setsid() is allowed within vfork()... " >&6; } if test "${xdvi_cv_setsid_in_vfork+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then - # safe value for cross-compiling -xdvi_cv_setsid_in_vfork=no + xdvi_cv_setsid_in_vfork=no # safe value for cross-compiling else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -16556,6 +16557,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + /* Test adapted from Gnu autoconf */ /* Thanks to Paul Eggert for this test. */ #include <stdio.h> @@ -16568,7 +16570,9 @@ cat >>conftest.$ac_ext <<_ACEOF #include <vfork.h> #endif int -main() { +main () +{ + pid_t parent = getpid (); pid_t child; @@ -16591,6 +16595,8 @@ main() { || status ); } + ; + return 0; } _ACEOF rm -f conftest$ac_exeext @@ -16632,7 +16638,7 @@ fi fi { $as_echo "$as_me:$LINENO: result: $xdvi_cv_setsid_in_vfork" >&5 $as_echo "$xdvi_cv_setsid_in_vfork" >&6; } -if test $xdvi_cv_setsid_in_vfork = yes; then +if test "x$xdvi_cv_setsid_in_vfork" = xyes; then cat >>confdefs.h <<\_ACEOF #define HAVE_GOOD_SETSID_VFORK 1 @@ -16640,6 +16646,8 @@ _ACEOF fi fi + + { $as_echo "$as_me:$LINENO: checking whether C compiler supports string concatenation" >&5 $as_echo_n "checking whether C compiler supports string concatenation... " >&6; } if test "${xdvi_cv_cc_concat+set}" = set; then @@ -16652,12 +16660,10 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <stdio.h> - int main () { puts("Testing" " string" " concatenation"); - ; return 0; } @@ -16692,13 +16698,14 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $xdvi_cv_cc_concat" >&5 $as_echo "$xdvi_cv_cc_concat" >&6; } -if test $xdvi_cv_cc_concat = yes; then +if test "x$xdvi_cv_cc_concat" = xyes; then cat >>confdefs.h <<\_ACEOF #define HAVE_CC_CONCAT 1 _ACEOF fi + # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. @@ -18175,7 +18182,6 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <stropts.h> - int main () { @@ -18223,53 +18229,56 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ fi { $as_echo "$as_me:$LINENO: result: $xdvi_cv_sys_streams" >&5 $as_echo "$xdvi_cv_sys_streams" >&6; } -if test $xdvi_cv_sys_streams = yes; then +if test "x$xdvi_cv_sys_streams" = xyes; then cat >>confdefs.h <<\_ACEOF #define HAVE_STREAMS 1 _ACEOF fi + { $as_echo "$as_me:$LINENO: checking for SunOS 4" >&5 $as_echo_n "checking for SunOS 4... " >&6; } if test "${xdvi_cv_sys_sunos_4+set}" = set; then $as_echo_n "(cached) " >&6 else case "`(uname -sr) 2>/dev/null`" in -"SunOS 4."*) - xdvi_cv_sys_sunos_4=yes ;; -*) xdvi_cv_sys_sunos_4=no ;; + "SunOS 4."*) xdvi_cv_sys_sunos_4=yes ;; + *) xdvi_cv_sys_sunos_4=no ;; esac + fi { $as_echo "$as_me:$LINENO: result: $xdvi_cv_sys_sunos_4" >&5 $as_echo "$xdvi_cv_sys_sunos_4" >&6; } -if test $xdvi_cv_sys_sunos_4 = yes; then +if test "x$xdvi_cv_sys_sunos_4" = xyes; then cat >>confdefs.h <<\_ACEOF #define SUNOS4 1 _ACEOF fi + { $as_echo "$as_me:$LINENO: checking for certain old versions of Linux" >&5 $as_echo_n "checking for certain old versions of Linux... " >&6; } if test "${xdvi_cv_sys_old_linux+set}" = set; then $as_echo_n "(cached) " >&6 else case "`(uname -sr) 2>/dev/null`" in -"Linux 2."[01].* | "Linux 2.2."[0-8] | "Linux 2.2."[0-8]-*) - xdvi_cv_sys_old_linux=yes ;; -*) xdvi_cv_sys_old_linux=no ;; + "Linux 2."[01].* | "Linux 2.2."[0-8] | "Linux 2.2."[0-8]-*) xdvi_cv_sys_old_linux=yes ;; + *) xdvi_cv_sys_old_linux=no ;; esac + fi { $as_echo "$as_me:$LINENO: result: $xdvi_cv_sys_old_linux" >&5 $as_echo "$xdvi_cv_sys_old_linux" >&6; } -if test $xdvi_cv_sys_old_linux = yes; then +if test "x$xdvi_cv_sys_old_linux" = xyes; then cat >>confdefs.h <<\_ACEOF #define FLAKY_SIGPOLL 1 _ACEOF fi + { $as_echo "$as_me:$LINENO: checking for poll.h and poll()" >&5 $as_echo_n "checking for poll.h and poll()... " >&6; } if test "${xdvi_cv_func_poll+set}" = set; then @@ -18282,7 +18291,6 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <poll.h> - int main () { @@ -18326,7 +18334,7 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ fi { $as_echo "$as_me:$LINENO: result: $xdvi_cv_func_poll" >&5 $as_echo "$xdvi_cv_func_poll" >&6; } -if test $xdvi_cv_func_poll = yes; then +if test "x$xdvi_cv_func_poll" = xyes; then cat >>confdefs.h <<\_ACEOF #define HAVE_POLL 1 @@ -18490,27 +18498,25 @@ fi + { $as_echo "$as_me:$LINENO: checking whether linker supports the --allow-multiple-definition flag" >&5 $as_echo_n "checking whether linker supports the --allow-multiple-definition flag... " >&6; } if test "${xdvi_cv_linker_multiple_defns+set}" = set; then $as_echo_n "(cached) " >&6 else - xdvi_save_LDFLAGS="$LDFLAGS" -LDFLAGS="-Xlinker --allow-multiple-definition" -x_linker_options="" -cat >conftest.$ac_ext <<_ACEOF + xdvi_save_LDFLAGS=$LDFLAGS + LDFLAGS="-Xlinker --allow-multiple-definition" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <stdio.h> - int main () { void foo(void); - ; return 0; } @@ -18542,40 +18548,33 @@ else sed 's/^/| /' conftest.$ac_ext >&5 xdvi_cv_linker_multiple_defns=no - fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext - + LDFLAGS=$xdvi_save_LDFLAGS fi { $as_echo "$as_me:$LINENO: result: $xdvi_cv_linker_multiple_defns" >&5 $as_echo "$xdvi_cv_linker_multiple_defns" >&6; } -if test $xdvi_cv_linker_multiple_defns = yes; then - x_linker_options="-Xlinker --allow-multiple-definition" - LDFLAGS="$xdvi_save_LDFLAGS" -cat >>confdefs.h <<\_ACEOF -#define LD_ALLOWS_MULTIPLE_DEFINITIONS 1 -_ACEOF - -else - LDFLAGS="$xdvi_save_LDFLAGS" +x_linker_options="" +case $xdvi_cv_linker_multiple_defns in + yes) x_linker_options="-Xlinker --allow-multiple-definition" ;; + "by default") : ;; + *) { $as_echo "$as_me:$LINENO: checking whether linker supports multiple definitions" >&5 +$as_echo_n "checking whether linker supports multiple definitions... " >&6; } - xdvi_ld_save_LIBS="$LIBS" - xdvi_ld_save_CFLAGS="$CFLAGS" - xdvi_ld_save_CPPFLAGS="$CPPFLAGS" - xdvi_ld_save_LDFLAGS="$LDFLAGS" + 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 $LDFLAGS" - { $as_echo "$as_me:$LINENO: checking whether linker supports multiple definitions by default" >&5 -$as_echo_n "checking whether linker supports multiple definitions by default... " >&6; } - cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18584,22 +18583,19 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <X11/Intrinsic.h> - XtIntervalId XtAppAddTimeOut(XtAppContext app, + XtIntervalId XtAppAddTimeOut(XtAppContext app, unsigned long interval, XtTimerCallbackProc proc, XtPointer closure) - { - (void)app; (void)interval; (void)proc; (void)closure; - return (XtIntervalId)0; - } + { + (void)app; (void)interval; (void)proc; (void)closure; + return (XtIntervalId)0; + } int main () { - - XtIntervalId i = 0; - XtRemoveTimeOut(i); - +XtIntervalId i = 0; XtRemoveTimeOut(i); ; return 0; } @@ -18625,12 +18621,11 @@ $as_echo "$ac_try_echo") >&5 test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then - xdvi_cv_linker_multiple_defns=yes + xdvi_cv_linker_multiple_defns="by default" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - xdvi_cv_linker_multiple_defns=no fi @@ -18638,17 +18633,23 @@ rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext - if test $xdvi_cv_linker_multiple_defns = yes; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - cat >>confdefs.h <<\_ACEOF + LIBS=$xdvi_ld_save_LIBS + CFLAGS=$xdvi_ld_save_CFLAGS + CPPFLAGS=$xdvi_ld_save_CPPFLAGS + LDFLAGS=$xdvi_ld_save_LDFLAGS + + { $as_echo "$as_me:$LINENO: result: $xdvi_cv_linker_multiple_defns" >&5 +$as_echo "$xdvi_cv_linker_multiple_defns" >&6; } ;; +esac + +if test "x$xdvi_cv_linker_multiple_defns" != xno; then + +cat >>confdefs.h <<\_ACEOF #define LD_ALLOWS_MULTIPLE_DEFINITIONS 1 _ACEOF - else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:$LINENO: WARNING: Linker does not allow multiple definitions. +else + { $as_echo "$as_me:$LINENO: WARNING: 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 * @@ -18664,16 +18665,12 @@ $as_echo "$as_me: WARNING: Linker does not allow multiple definitions. * tooltips, statusline messages and hyperlink location markers * * will not be updated until the mouse is moved. * *****************************************************************" >&2;} - fi - LIBS="$xdvi_ld_save_LIBS" - CFLAGS="$xdvi_ld_save_CFLAGS" - CPPFLAGS="$xdvi_ld_save_CPPFLAGS" - LDFLAGS="$xdvi_ld_save_LDFLAGS" fi + for ac_header in stdint.h inttypes.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` diff --git a/Build/source/texk/xdvik/m4/xdvi-c-bitmap-type.m4 b/Build/source/texk/xdvik/m4/xdvi-c-bitmap-type.m4 index ca6da408555..5a6b372fc26 100644 --- a/Build/source/texk/xdvik/m4/xdvi-c-bitmap-type.m4 +++ b/Build/source/texk/xdvik/m4/xdvi-c-bitmap-type.m4 @@ -1,5 +1,10 @@ -dnl ### Determine integer type to use for bitmaps - +# Autoconf macros for xdvik. +# Copyright (C) 1999 - 2009 Paul Vojta <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_C_BITMAP_TYPE # ------------------ diff --git a/Build/source/texk/xdvik/m4/xdvi-cc-concat.m4 b/Build/source/texk/xdvik/m4/xdvi-cc-concat.m4 index a37cbb2eb98..27d203dcab3 100644 --- a/Build/source/texk/xdvik/m4/xdvi-cc-concat.m4 +++ b/Build/source/texk/xdvik/m4/xdvi-cc-concat.m4 @@ -1,13 +1,21 @@ -dnl ### Check for whether the C compiler does string concatenation +# Autoconf macros for xdvik. +# Copyright (C) 1999 - 2009 Paul Vojta <xdvi-core@lists.sourceforge.net> +# +# This file is free software; the copyright holder +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. +# XDVI_CC_CONCAT +# -------------- +# Check whether the C compiler does string concatenation. AC_DEFUN([XDVI_CC_CONCAT], -[AC_CACHE_CHECK([whether C compiler supports string concatenation], xdvi_cv_cc_concat, -[AC_TRY_COMPILE( -[#include <stdio.h> -], [puts("Testing" " string" " concatenation"); -], [xdvi_cv_cc_concat=yes], [xdvi_cv_cc_concat=no])]) -if test $xdvi_cv_cc_concat = yes; then +[AC_CACHE_CHECK([whether C compiler supports string concatenation], + [xdvi_cv_cc_concat], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], + [[puts("Testing" " string" " concatenation");]])], + [xdvi_cv_cc_concat=yes], + [xdvi_cv_cc_concat=no])]) +if test "x$xdvi_cv_cc_concat" = xyes; then AC_DEFINE([HAVE_CC_CONCAT], 1, [Define if your C compiler can do string concatenation]) -fi]) - - +fi +]) # XDVI_CC_CONCAT diff --git a/Build/source/texk/xdvik/m4/xdvi-func-memicmp.m4 b/Build/source/texk/xdvik/m4/xdvi-func-memicmp.m4 index 29db674b096..b9915a3957e 100644 --- a/Build/source/texk/xdvik/m4/xdvi-func-memicmp.m4 +++ b/Build/source/texk/xdvik/m4/xdvi-func-memicmp.m4 @@ -1,11 +1,21 @@ -dnl ### Check for memicmp(), which some installations have in string.h +# Autoconf macros for xdvik. +# Copyright (C) 2002 - 2009 Stefan Ulrich <xdvi-core@lists.sourceforge.net> +# +# This file is free software; the copyright holder +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# XDVI_FUNC_MEMICMP +# ----------------- +# Check for memicmp(), which some installations have in <string.h>. AC_DEFUN([XDVI_FUNC_MEMICMP], -[AC_CACHE_CHECK([for memicmp], xdvi_cv_memicmp, -[AC_TRY_LINK( -[#include <string.h> -], [(void)memicmp((char *)NULL, (char *)NULL, 0);], -xdvi_cv_memicmp=yes, xdvi_cv_memicmp=no)]) -if test $xdvi_cv_memicmp = yes; then +[AC_CACHE_CHECK([for memicmp], + [xdvi_cv_memicmp], + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <string.h>]], + [[(void)memicmp((char *)NULL, (char *)NULL, 0);]])], + [xdvi_cv_memicmp=yes], + [xdvi_cv_memicmp=no])]) +if test "x$xdvi_cv_memicmp" = xyes; then AC_DEFINE([HAVE_MEMICMP], 1, [Define if the memicmp() function is in <string.h>]) -fi]) - +fi +]) # XDVI_FUNC_MEMICMP diff --git a/Build/source/texk/xdvik/m4/xdvi-func-poll.m4 b/Build/source/texk/xdvik/m4/xdvi-func-poll.m4 index df70d821428..30dfcf9542b 100644 --- a/Build/source/texk/xdvik/m4/xdvi-func-poll.m4 +++ b/Build/source/texk/xdvik/m4/xdvi-func-poll.m4 @@ -1,15 +1,23 @@ -dnl ### Check for poll() +# Autoconf macros for xdvik. +# Copyright (C) 1999 - 2009 Paul Vojta <xdvi-core@lists.sourceforge.net> +# +# This file is free software; the copyright holder +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. +# XDVI_FUNC_POLL +# -------------- +# Check for poll(). AC_DEFUN([XDVI_FUNC_POLL], -[AC_CACHE_CHECK([for poll.h and poll()], xdvi_cv_func_poll, -[AC_TRY_LINK( -[#include <poll.h> -], [poll((struct pollfd *) 0, 0, 0);], -xdvi_cv_func_poll=yes, xdvi_cv_func_poll=no)]) -if test $xdvi_cv_func_poll = yes; then +[AC_CACHE_CHECK([for poll.h and poll()], + [xdvi_cv_func_poll], + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <poll.h>]], + [[poll((struct pollfd *) 0, 0, 0);]])], + [xdvi_cv_func_poll=yes], + [xdvi_cv_func_poll=no])]) +if test "x$xdvi_cv_func_poll" = xyes; then AC_DEFINE([HAVE_POLL], 1, [Define if your system has <poll.h> and poll().]) else - AC_CHECK_HEADERS(sys/select.h select.h) -fi]) - - + AC_CHECK_HEADERS([sys/select.h select.h]) +fi +]) # XDVI_FUNC_POLL diff --git a/Build/source/texk/xdvik/m4/xdvi-func-setsid-in-fork.m4 b/Build/source/texk/xdvik/m4/xdvi-func-setsid-in-fork.m4 index 8d7c6651691..8fa2fcb9dc2 100644 --- a/Build/source/texk/xdvik/m4/xdvi-func-setsid-in-fork.m4 +++ b/Build/source/texk/xdvik/m4/xdvi-func-setsid-in-fork.m4 @@ -1,12 +1,20 @@ -dnl ### Check for whether setsid() is allowed within vfork() -dnl (Mac OS X 10.3 (Panther, 11/2003) is one O/S which does not allow this.) +# Autoconf macros for xdvik. +# Copyright (C) 2002 - 2009 Paul Vojta <xdvi-core@lists.sourceforge.net> +# +# This file is free software; the copyright holder +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. +# XDVI_FUNC_SETSID_IN_VFORK +# ------------------------- +# Check for whether setsid() is allowed within vfork() +# (Mac OS X 10.3 (Panther, 11/2003) is one O/S which does not allow this). AC_DEFUN([XDVI_FUNC_SETSID_IN_VFORK], -[if test $ac_cv_func_vfork_works = yes; then -AC_CACHE_CHECK([for whether setsid() is allowed within vfork()], -xdvi_cv_setsid_in_vfork, -[AC_TRY_RUN( -[/* Test adapted from Gnu autoconf */ +[AS_IF([test "x$ac_cv_func_vfork_works" = xyes], +[AC_CACHE_CHECK([for whether setsid() is allowed within vfork()], + [xdvi_cv_setsid_in_vfork], + [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ +/* Test adapted from Gnu autoconf */ /* Thanks to Paul Eggert for this test. */ #include <stdio.h> #include <sys/types.h> @@ -16,9 +24,8 @@ xdvi_cv_setsid_in_vfork, #endif #ifdef HAVE_VFORK_H #include <vfork.h> -#endif -int -main() { +#endif]], + [[ pid_t parent = getpid (); pid_t child; @@ -40,15 +47,12 @@ main() { /* Did the child fail? (This shouldn't happen.) */ || status ); - } -}], -xdvi_cv_setsid_in_vfork=yes, -xdvi_cv_setsid_in_vfork=no, -# safe value for cross-compiling -xdvi_cv_setsid_in_vfork=no)]) -if test $xdvi_cv_setsid_in_vfork = yes; then + }]])], + [xdvi_cv_setsid_in_vfork=yes], + [xdvi_cv_setsid_in_vfork=no], + [xdvi_cv_setsid_in_vfork=no # safe value for cross-compiling])]) +if test "x$xdvi_cv_setsid_in_vfork" = xyes; then AC_DEFINE([HAVE_GOOD_SETSID_VFORK], 1, [Define if your system allows setsid() within vfork().]) -fi] -fi) - +fi]) +]) # XDVI_FUNC_SETSID_IN_VFORK diff --git a/Build/source/texk/xdvik/m4/xdvi-func-working-vsnprintf.m4 b/Build/source/texk/xdvik/m4/xdvi-func-working-vsnprintf.m4 index 8671e1a1d5b..857452941e2 100644 --- a/Build/source/texk/xdvik/m4/xdvi-func-working-vsnprintf.m4 +++ b/Build/source/texk/xdvik/m4/xdvi-func-working-vsnprintf.m4 @@ -1,28 +1,31 @@ -dnl ### Check for a working implementation of (v)snprintf() -dnl ### which should either return a negative result or the size actually needed -dnl ### (latter is C99 standard). +# Autoconf macros for xdvik. +# Copyright (C) 2000 - 2009 Stefan Ulrich <xdvi-core@lists.sourceforge.net> +# +# This file is free software; the copyright holder +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# XDVI_FUNC_WORKING_VSNPRINTF +# --------------------------- +# Check for a working implementation of (v)snprintf() +# which should either return a negative result or the size actually needed +# (latter is C99 standard). AC_DEFUN([XDVI_FUNC_WORKING_VSNPRINTF], [AC_CACHE_CHECK([for a working implementation of (v)snprintf()], -xdvi_cv_func_good_vsnprintf, -[AC_TRY_RUN( -[ + [xdvi_cv_func_good_vsnprintf], + [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #ifdef IRIX #define _XOPEN_SOURCE 500 #endif -#include <stdio.h> -int main() -{ - char s[2]; +#include <stdio.h>]], + [[char s[2]; int retval = snprintf(s, 2, "test"); if (retval > -1 && retval != 4) /* neither negative nor desired size, not OK */ - return 1; - return 0; -}], -xdvi_cv_func_good_vsnprintf=yes, -xdvi_cv_func_good_vsnprintf=no, -# safe value for cross-compiling -xdvi_cv_func_good_vsnprintf=no)]) -if test $xdvi_cv_func_good_vsnprintf = yes; then + return 1;]])], + [xdvi_cv_func_good_vsnprintf=yes], + [xdvi_cv_func_good_vsnprintf=no], + [xdvi_cv_func_good_vsnprintf=no # safe value for cross-compiling])]) +if test "x$xdvi_cv_func_good_vsnprintf" = xyes; then AC_DEFINE([HAVE_GOOD_VSNPRINTF], 1, [Define if the vsnprintf function works.]) -fi]) - +fi +]) # XDVI_FUNC_WORKING_VSNPRINTF 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 index 20d65877ea5..4c6e74e760f 100644 --- a/Build/source/texk/xdvik/m4/xdvi-iconv-char-pptr-type.m4 +++ b/Build/source/texk/xdvik/m4/xdvi-iconv-char-pptr-type.m4 @@ -1,3 +1,11 @@ +# 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. 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 3de54de5b89..5c67903a2b9 100644 --- a/Build/source/texk/xdvik/m4/xdvi-linker-multiple-defns.m4 +++ b/Build/source/texk/xdvik/m4/xdvi-linker-multiple-defns.m4 @@ -1,66 +1,70 @@ -dnl ### Check if the --allow-multiple-definition linker flag is -dnl ### available (assuming that we need to use it if it is). -dnl ### If it isn't, check if the linker accepts multiple definitions, -dnl ### and if it doesn't, don't define LD_ALLOWS_MULTIPLE_DEFINITIONS. +# Autoconf macros for xdvik. +# Copyright (C) 2002 - 2009 Paul Vojta <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_LINKER_MULTIPLE_DEFNS +# -------------------------- +# Check if the --allow-multiple-definition linker flag is +# available (assuming that we need to use it if it is). +# If it isn't, check if the linker accepts multiple definitions, +# 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" + [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]) + x_linker_options="" -[AC_TRY_LINK( - [#include <stdio.h> - ], - [void foo(void); - ], - [xdvi_cv_linker_multiple_defns=yes], [xdvi_cv_linker_multiple_defns=no] -)] -) -if test $xdvi_cv_linker_multiple_defns = yes; then - x_linker_options="-Xlinker --allow-multiple-definition" - LDFLAGS="$xdvi_save_LDFLAGS" - AC_DEFINE([LD_ALLOWS_MULTIPLE_DEFINITIONS], 1, - [Define if your system allows multiple definitions of functions.]) -else - LDFLAGS="$xdvi_save_LDFLAGS" +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" + 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 $LDFLAGS" - AC_MSG_CHECKING([whether linker supports multiple definitions by default]) - - AC_TRY_LINK( - [#include <X11/Intrinsic.h> + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <X11/Intrinsic.h> - XtIntervalId XtAppAddTimeOut(XtAppContext app, + 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=yes], [xdvi_cv_linker_multiple_defns=no] - ) + { + (void)app; (void)interval; (void)proc; (void)closure; + return (XtIntervalId)0; + } + ]], + [[XtIntervalId i = 0; XtRemoveTimeOut(i);]])], + [xdvi_cv_linker_multiple_defns="by default"]) - if test $xdvi_cv_linker_multiple_defns = yes; then - AC_MSG_RESULT(yes) - AC_DEFINE([LD_ALLOWS_MULTIPLE_DEFINITIONS], 1) - else - AC_MSG_RESULT(no) - AC_MSG_WARN([Linker does not allow multiple definitions. + 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. ***************************************************************** * Warning: Your linker does not allow multiple definitions. * * This does not make xdvik unusable, but it will cause problems * @@ -68,12 +72,6 @@ else * tooltips, statusline messages and hyperlink location markers * * will not be updated until the mouse is moved. * *****************************************************************]) - fi - LIBS="$xdvi_ld_save_LIBS" - CFLAGS="$xdvi_ld_save_CFLAGS" - CPPFLAGS="$xdvi_ld_save_CPPFLAGS" - LDFLAGS="$xdvi_ld_save_LDFLAGS" fi -AC_SUBST(x_linker_options)]) - - +AC_SUBST([x_linker_options]) +]) # XDVI_LINKER_MULTIPLE_DEFNS diff --git a/Build/source/texk/xdvik/m4/xdvi-sys-old-linux.m4 b/Build/source/texk/xdvik/m4/xdvi-sys-old-linux.m4 index 7d7fe046fc6..7b7f80ee483 100644 --- a/Build/source/texk/xdvik/m4/xdvi-sys-old-linux.m4 +++ b/Build/source/texk/xdvik/m4/xdvi-sys-old-linux.m4 @@ -1,14 +1,22 @@ -dnl ### Check for certain broken versions of Linux +# Autoconf macros for xdvik. +# Copyright (C) 2001 - 2009 Paul Vojta <xdvi-core@lists.sourceforge.net> +# +# This file is free software; the copyright holder +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. +# XDVI_SYS_OLD_LINUX +# ------------------ +# Check for certain broken versions of Linux. AC_DEFUN([XDVI_SYS_OLD_LINUX], -[AC_CACHE_CHECK([for certain old versions of Linux], xdvi_cv_sys_old_linux, -[case "`(uname -sr) 2>/dev/null`" in -"Linux 2."[[01]].* | "Linux 2.2."[[0-8]] | "Linux 2.2."[[0-8]]-*) - xdvi_cv_sys_old_linux=yes ;; -*) xdvi_cv_sys_old_linux=no ;; -esac]) -if test $xdvi_cv_sys_old_linux = yes; then +[AC_CACHE_CHECK([for certain old versions of Linux], + [xdvi_cv_sys_old_linux], + [AS_CASE(["`(uname -sr) 2>/dev/null`"], + [["Linux 2."[01].* | "Linux 2.2."[0-8] | "Linux 2.2."[0-8]-*]], + [xdvi_cv_sys_old_linux=yes], + [xdvi_cv_sys_old_linux=no])]) +if test "x$xdvi_cv_sys_old_linux" = xyes; then AC_DEFINE([FLAKY_SIGPOLL], 1, [Define if you are using Linux 2.1.xxx -- 2.2.8, or if you find it necessary.]) -fi]) - +fi +]) # XDVI_SYS_OLD_LINUX diff --git a/Build/source/texk/xdvik/m4/xdvi-sys-streams.m4 b/Build/source/texk/xdvik/m4/xdvi-sys-streams.m4 index 2548c5d96c4..b347b4d9223 100644 --- a/Build/source/texk/xdvik/m4/xdvi-sys-streams.m4 +++ b/Build/source/texk/xdvik/m4/xdvi-sys-streams.m4 @@ -1,16 +1,25 @@ -dnl ### Check for at-least-pretend Streams capability +# Autoconf macros for xdvik. +# Copyright (C) 1999 - 2009 Paul Vojta <xdvi-core@lists.sourceforge.net> +# +# This file is free software; the copyright holder +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. +# XDVI_SYS_STREAMS +# ---------------- +# Check for at-least-pretend Streams capability. AC_DEFUN([XDVI_SYS_STREAMS], -[AC_CACHE_CHECK([for stropts.h and isastream()], xdvi_cv_sys_streams, -[AC_TRY_LINK( -[#include <stropts.h> -], [#ifndef I_SETSIG +[AC_CACHE_CHECK([for stropts.h and isastream()], + [xdvi_cv_sys_streams], + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stropts.h>]], + [[#ifndef I_SETSIG choke me #else isastream(0); -#endif], xdvi_cv_sys_streams=yes, xdvi_cv_sys_streams=no)]) -if test $xdvi_cv_sys_streams = yes; then +#endif]])], + [xdvi_cv_sys_streams=yes], + [xdvi_cv_sys_streams=no])]) +if test "x$xdvi_cv_sys_streams" = xyes; then AC_DEFINE([HAVE_STREAMS], 1, [Define if your system has STREAMS (and if X uses it).]) -fi]) - - +fi +]) # XDVI_SYS_STREAMS diff --git a/Build/source/texk/xdvik/m4/xdvi-sys-sunos4.m4 b/Build/source/texk/xdvik/m4/xdvi-sys-sunos4.m4 index 3d19e3b2a4e..45e52761355 100644 --- a/Build/source/texk/xdvik/m4/xdvi-sys-sunos4.m4 +++ b/Build/source/texk/xdvik/m4/xdvi-sys-sunos4.m4 @@ -1,13 +1,21 @@ -dnl ### Check for SunOS 4 +# Autoconf macros for xdvik. +# Copyright (C) 1999 - 2009 Paul Vojta <xdvi-core@lists.sourceforge.net> +# +# This file is free software; the copyright holder +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. +# XDVI_SYS_SUNOS_4 +# ---------------- +# Check for SunOS 4. AC_DEFUN([XDVI_SYS_SUNOS_4], -[AC_CACHE_CHECK([for SunOS 4], xdvi_cv_sys_sunos_4, -[case "`(uname -sr) 2>/dev/null`" in -"SunOS 4."*) - xdvi_cv_sys_sunos_4=yes ;; -*) xdvi_cv_sys_sunos_4=no ;; -esac]) -if test $xdvi_cv_sys_sunos_4 = yes; then +[AC_CACHE_CHECK([for SunOS 4], + [xdvi_cv_sys_sunos_4], + [AS_CASE(["`(uname -sr) 2>/dev/null`"], + ["SunOS 4."*], + [xdvi_cv_sys_sunos_4=yes], + [xdvi_cv_sys_sunos_4=no])]) +if test "x$xdvi_cv_sys_sunos_4" = xyes; then AC_DEFINE([SUNOS4], 1, [Define if you are using SunOS 4.x.]) -fi]) - +fi +]) # XDVI_SYS_SUNOS_4 |