summaryrefslogtreecommitdiff
path: root/recipes/t1lib/t1lib-5.0.2/configure.patch
blob: f2405c6bc747f4b04d4c0b8f923b9654e209522c (plain)
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

#
# Patch managed by http://www.holgerschurig.de/patcher.html
#

--- t1lib-5.0.2/configure.in~configure.patch
+++ t1lib-5.0.2/configure.in
@@ -75,9 +75,9 @@
 T1LIB_VERSIONSTRING=\"MACRO_T1LIB_IDENTIFIER\"
 
 
-dnl We use this file by Andreas Zeller to check for libXaw
-builtin(include, ac-tools/ice_find_athena.m4)
-builtin(include, ac-tools/aclocal.m4)
+#dnl We use this file by Andreas Zeller to check for libXaw
+#builtin(include, ac-tools/ice_find_athena.m4)
+#builtin(include, ac-tools/aclocal.m4)
 
 dnl We want these before the checks, so the checks can modify their values.
 test -z "$LDLIBS" && LDLIBS=-lm   AC_SUBST(LDLIBS)
@@ -161,6 +161,7 @@
 
 dnl **** Check for underscore on external symbols ****
 
+AH_TEMPLATE([NEED_UNDERSCORE_PREFIX], [Define if external symbols need an underscore prefix])
 AC_CACHE_CHECK("whether external symbols need an underscore prefix",
                ac_cv_c_extern_prefix,
 [saved_libs=$LIBS
@@ -178,64 +179,46 @@
   AC_DEFINE(NEED_UNDERSCORE_PREFIX)
 fi
 
-dnl **** Check which ANSI integer type is 16 bit 
+dnl **** Check which ANSI integer type is 16 bit
+T1_AA_TYPE16=""
+for type in short int; do
+	if test x"`eval echo \\$ac_cv_sizeof_$type`" = "x2"; then
+		T1_AA_TYPE16="-DT1_AA_TYPE16=$type"
+		break
+	fi
+done
 
-AC_CACHE_CHECK( "which ANSI integer type is 16 bit", ac_16bit_type,
-		AC_TRY_RUN([
-int main(void) {
-  if (sizeof(short)==2)
-    return(0);
-  else if (sizeof(int)==2)
-    return(1);
-  else
-    return(2);
-}], ac_16bit_type="short", ac_16bit_type="int", ac_16bit_type=))
-if test "$ac_16bit_type" = "short"
-then
-  T1_AA_TYPE16="-DT1_AA_TYPE16=short"
-else
-  T1_AA_TYPE16="-DT1_AA_TYPE16=int"
+if test x"$T1_AA_TYPE16" = "x"; then
+	AC_MSG_ERROR("Unable to determine which integer type is 16 bit.")
 fi
 
-
 dnl **** Check which ANSI integer type is 32 bit 
+T1_AA_TYPE32=""
+for type in int long; do
+	if test x"`eval echo \\$ac_cv_sizeof_$type`" = "x4"; then
+		T1_AA_TYPE32="-DT1_AA_TYPE32=$type"
+		break
+	fi
+done
 
-AC_CACHE_CHECK( "which ANSI integer type is 32 bit", ac_32bit_type,
-		AC_TRY_RUN([
-int main(void) {
-  if (sizeof(int)==4)
-    return(0);
-  else if (sizeof(long)==4)
-    return(1);
-  else
-    return(2);
-}], ac_32bit_type="int", ac_32bit_type="long", ac_32bit_type=))
-if test "$ac_32bit_type" = "int"
-then
-  T1_AA_TYPE32="-DT1_AA_TYPE32=int"
-else
-  T1_AA_TYPE32="-DT1_AA_TYPE32=long"
+if test x"$T1_AA_TYPE32" = "x"; then
+	AC_MSG_ERROR("Unable to determine which integer type is 32 bit.")
 fi
 
-
 dnl **** Check which ANSI integer type is 64 bit 
+T1_AA_TYPE64=""
+for type in long long_long; do
+	if test x"`eval echo \\$ac_cv_sizeof_$type`" = "x8"; then
+		AC_MSG_WARN("$type is 64 bit")
+		T1_AA_TYPE64="-DT1_AA_TYPE64=\"`echo $type|tr '_' ' '`\""
+		break
+	fi
+done
 
-AC_CACHE_CHECK( "which ANSI integer type is 64 bit", ac_64bit_type,
-		AC_TRY_RUN([
-int main(void) {
-  if (sizeof(long)==8)
-    return(0);
-  else
-    return(1);
-}], ac_64bit_type="long", ac_64bit_type="<none>"))
-if test "$ac_64bit_type" = "long"
-then
-  T1_AA_TYPE64="-DT1_AA_TYPE64=long"
-else
-  T1_AA_TYPE64=
+if test x"$T1_AA_TYPE64" = "x"; then
+	AC_MSG_ERROR("Unable to determine which integer type is 64 bit.")
 fi
 
-
 CFLAGS="${CFLAGS} -DT1LIB_IDENT=\"\\\"${T1LIB_IDENTIFIER}\\\"\" -DGLOBAL_CONFIG_DIR=\"\\\"${T1LIB_DATA_DIR}\\\"\""
 
 dnl **** Check for functions and header files ****