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