summaryrefslogtreecommitdiff
path: root/print/tex-dvipsk/files/patch-texk-dvipsk-configure
blob: 1623aca7f5c9a610c1692439dc96cd0f6af8d71c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
--- configure.orig	2013-05-08 04:57:35.000000000 +0900
+++ configure	2013-05-08 04:57:38.000000000 +0900
@@ -772,6 +772,7 @@
 with_system_kpathsea
 with_kpathsea_includes
 with_kpathsea_libdir
+with_paper
 '
       ac_precious_vars='build_alias
 host_alias
@@ -781,7 +782,8 @@
 LDFLAGS
 LIBS
 CPPFLAGS
-CPP'
+CPP
+CPPFLAGS'
 ac_subdirs_all='squeeze'
 
 # Initialize some variables set by options.
@@ -1430,6 +1432,7 @@
                           kpathsea headers installed in DIR
   --with-kpathsea-libdir=DIR
                           kpathsea library installed in DIR
+  --with-paper=DIR        use paper include/library files from DIR
 
 Some influential environment variables:
   CC          C compiler command
@@ -2894,12 +2897,6 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
 $as_echo "$MKDIR_P" >&6; }
 
-mkdir_p="$MKDIR_P"
-case $mkdir_p in
-  [\\/$]* | ?:[\\/]*) ;;
-  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-
 for ac_prog in gawk mawk nawk awk
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -7596,6 +7593,12 @@
 
 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 
+# For better backward compatibility.  To be removed once Automake 1.9.x
+# dies out for good.  For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+mkdir_p='$(MKDIR_P)'
+
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
 # Always define AMTAR for backward compatibility.  Yes, it's still used
@@ -14344,6 +14347,102 @@
 fi
 
 
+eval CPPFLAGS=\"$LIBPAPER_INCLUDES \$CPPFLAGS\"
+eval LIBS=\"$LIBPAPER_LIBS \$LIBS\"
+
+_cppflags=$CPPFLAGS _ldflags=$LDFLAGS
+
+# Check whether --with-paper was given.
+if test "${with_paper+set}" = set; then :
+  withval=$with_paper; if test -d "$withval"; then
+     CPPFLAGS="$CPPFLAGS -I$withval/include"
+     LDFLAGS="$LDFLAGS -L$withval/lib"
+   fi
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for paper header files" >&5
+$as_echo_n "checking for paper header files... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <paper.h>
+int
+main ()
+{
+struct paper *p;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing paperpswidth" >&5
+$as_echo_n "checking for library containing paperpswidth... " >&6; }
+if ${ac_cv_search_paperpswidth+:} false; 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 paperpswidth ();
+int
+main ()
+{
+return paperpswidth ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' paper; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib LIBS="-lpaper $LIBS" $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_paperpswidth=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_paperpswidth+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_paperpswidth+:} false; then :
+
+else
+  ac_cv_search_paperpswidth=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_paperpswidth" >&5
+$as_echo "$ac_cv_search_paperpswidth" >&6; }
+ac_res=$ac_cv_search_paperpswidth
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+$as_echo "#define HAVE_LIBPAPER 1" >>confdefs.h
+
+fi
+
+else
+  CPPFLAGS=$_cppflags
+   LDDFLAGS=$_ldflags
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
 
 
 subdirs="$subdirs squeeze"