blob: 976e0380e4efddfc4dd00a216269926d6d0ca089 [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001From 81c1ba940415595584a837ab1078c64855072f0c Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Mon, 21 Nov 2011 12:00:54 +0100
4Subject: [PATCH] t1lib: add 5.1.2
5
6#
7# Patch managed by http://www.holgerschurig.de/patcher.html
8#
9
10---
11 configure.in | 95 ++++++++++++++++++++++++------------------------------------
12 1 file changed, 38 insertions(+), 57 deletions(-)
13
14diff --git a/configure.in b/configure.in
15index eade4c0..e649ea9 100644
16--- a/configure.in
17+++ b/configure.in
18@@ -74,9 +74,9 @@ T1LIB_PATCHLEVEL=builtin(eval, MACRO_T1LIB_LT_REVISION)
19 T1LIB_VERSIONSTRING=\"MACRO_T1LIB_IDENTIFIER\"
20
21
22-dnl We use this file by Andreas Zeller to check for libXaw
23-builtin(include, ac-tools/ice_find_athena.m4)
24-builtin(include, ac-tools/aclocal.m4)
25+#dnl We use this file by Andreas Zeller to check for libXaw
26+#builtin(include, ac-tools/ice_find_athena.m4)
27+#builtin(include, ac-tools/aclocal.m4)
28
29 dnl We want these before the checks, so the checks can modify their values.
30 test -z "$LDLIBS" && LDLIBS=-lm AC_SUBST(LDLIBS)
31@@ -162,6 +162,7 @@ fi
32
33 dnl **** Check for underscore on external symbols ****
34
35+AH_TEMPLATE([NEED_UNDERSCORE_PREFIX], [Define if external symbols need an underscore prefix])
36 AC_CACHE_CHECK("whether external symbols need an underscore prefix",
37 ac_cv_c_extern_prefix,
38 [saved_libs=$LIBS
39@@ -179,68 +180,48 @@ then
40 AC_DEFINE(NEED_UNDERSCORE_PREFIX)
41 fi
42
43-dnl **** Check which ANSI integer type is 16 bit
44-
45-AC_CACHE_CHECK( "which ANSI integer type is 16 bit", ac_16bit_type,
46- AC_TRY_RUN([
47-int main(void) {
48- if (sizeof(short)==2)
49- return(0);
50- else if (sizeof(int)==2)
51- return(1);
52- else
53- return(2);
54-}], ac_16bit_type="short", ac_16bit_type="int", ac_16bit_type=))
55-if test "$ac_16bit_type" = "short"
56-then
57- T1_AA_TYPE16="-DT1_AA_TYPE16=short"
58- T1_INT16="short"
59-else
60- T1_AA_TYPE16="-DT1_AA_TYPE16=int"
61- T1_INT16="int"
62+dnl **** Check which ANSI integer type is 16 bit
63+T1_AA_TYPE16=""
64+for type in short int; do
65+ if test x"`eval echo \\$ac_cv_sizeof_$type`" = "x2"; then
66+ T1_AA_TYPE16="-DT1_AA_TYPE16=$type"
67+ T1_INT16="$type"
68+ break
69+ fi
70+done
71+
72+if test x"$T1_AA_TYPE16" = "x"; then
73+ AC_MSG_ERROR("Unable to determine which integer type is 16 bit.")
74 fi
75
76-
77 dnl **** Check which ANSI integer type is 32 bit
78-
79-AC_CACHE_CHECK( "which ANSI integer type is 32 bit", ac_32bit_type,
80- AC_TRY_RUN([
81-int main(void) {
82- if (sizeof(int)==4)
83- return(0);
84- else if (sizeof(long)==4)
85- return(1);
86- else
87- return(2);
88-}], ac_32bit_type="int", ac_32bit_type="long", ac_32bit_type=))
89-if test "$ac_32bit_type" = "int"
90-then
91- T1_AA_TYPE32="-DT1_AA_TYPE32=int"
92- T1_INT32="int"
93-else
94- T1_AA_TYPE32="-DT1_AA_TYPE32=long"
95- T1_INT32="long"
96+T1_AA_TYPE32=""
97+for type in int long; do
98+ if test x"`eval echo \\$ac_cv_sizeof_$type`" = "x4"; then
99+ T1_AA_TYPE32="-DT1_AA_TYPE32=$type"
100+ T1_INT32="$type"
101+ break
102+ fi
103+done
104+
105+if test x"$T1_AA_TYPE32" = "x"; then
106+ AC_MSG_ERROR("Unable to determine which integer type is 32 bit.")
107 fi
108
109-
110 dnl **** Check which ANSI integer type is 64 bit
111-
112-AC_CACHE_CHECK( "which ANSI integer type is 64 bit", ac_64bit_type,
113- AC_TRY_RUN([
114-int main(void) {
115- if (sizeof(long)==8)
116- return(0);
117- else
118- return(1);
119-}], ac_64bit_type="long", ac_64bit_type="<none>"))
120-if test "$ac_64bit_type" = "long"
121-then
122- T1_AA_TYPE64="-DT1_AA_TYPE64=long"
123-else
124- T1_AA_TYPE64=
125+T1_AA_TYPE64=""
126+for type in long long_long; do
127+ if test x"`eval echo \\$ac_cv_sizeof_$type`" = "x8"; then
128+ AC_MSG_WARN("$type is 64 bit")
129+ T1_AA_TYPE64="-DT1_AA_TYPE64=\"`echo $type|tr '_' ' '`\""
130+ break
131+ fi
132+done
133+
134+if test x"$T1_AA_TYPE64" = "x"; then
135+ AC_MSG_ERROR("Unable to determine which integer type is 64 bit.")
136 fi
137
138-
139 CFLAGS="${CFLAGS} -DT1LIB_IDENT=\"\\\"${T1LIB_IDENTIFIER}\\\"\" -DGLOBAL_CONFIG_DIR=\"\\\"${T1LIB_DATA_DIR}\\\"\""
140
141 dnl **** Check for functions and header files ****