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/m4 | |
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/m4')
-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 |
11 files changed, 226 insertions, 157 deletions
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 |