$NetBSD: patch-ah,v 1.1 2007/08/16 03:25:05 joerg Exp $

--- configure.orig	2007-08-16 05:17:41.000000000 +0200
+++ configure
@@ -24632,183 +24632,35 @@ _ACEOF
 
 fi
 
-
-echo "$as_me:$LINENO: checking \"which ANSI integer type is 16 bit\"" >&5
-echo $ECHO_N "checking \"which ANSI integer type is 16 bit\"... $ECHO_C" >&6
-if test "${ac_16bit_type+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "$cross_compiling" = yes; then
-  ac_16bit_type=
+if [ $ac_cv_sizeof_short = 2 ]; then
+    T1_AA_TYPE16="-DT1_AA_TYPE16=short"
+    T1_INT16="short"
+elif [ $ac_cv_sizeof_int = 2 ]; then
+    T1_AA_TYPE16="-DT1_AA_TYPE16=int"
+    T1_INT16="int"
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int main(void) {
-  if (sizeof(short)==2)
-    return(0);
-  else if (sizeof(int)==2)
-    return(1);
-  else
-    return(2);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_16bit_type="short"
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_16bit_type="int"
+    echo "No 16 bit type found"
+    exit 1
 fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_16bit_type" >&5
-echo "${ECHO_T}$ac_16bit_type" >&6
-if test "$ac_16bit_type" = "short"
-then
-  T1_AA_TYPE16="-DT1_AA_TYPE16=short"
-  T1_INT16="short"
-else
-  T1_AA_TYPE16="-DT1_AA_TYPE16=int"
-  T1_INT16="int"
-fi
-
-
-
-echo "$as_me:$LINENO: checking \"which ANSI integer type is 32 bit\"" >&5
-echo $ECHO_N "checking \"which ANSI integer type is 32 bit\"... $ECHO_C" >&6
-if test "${ac_32bit_type+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "$cross_compiling" = yes; then
-  ac_32bit_type=
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-int main(void) {
-  if (sizeof(int)==4)
-    return(0);
-  else if (sizeof(long)==4)
-    return(1);
-  else
-    return(2);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_32bit_type="int"
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_32bit_type="long"
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_32bit_type" >&5
-echo "${ECHO_T}$ac_32bit_type" >&6
-if test "$ac_32bit_type" = "int"
-then
+if [ $ac_cv_sizeof_int = 4 ]; then
   T1_AA_TYPE32="-DT1_AA_TYPE32=int"
   T1_INT32="int"
-else
+elif [ $ac_cv_sizeof_long = 4 ]; then
   T1_AA_TYPE32="-DT1_AA_TYPE32=long"
   T1_INT32="long"
-fi
-
-
-
-echo "$as_me:$LINENO: checking \"which ANSI integer type is 64 bit\"" >&5
-echo $ECHO_N "checking \"which ANSI integer type is 64 bit\"... $ECHO_C" >&6
-if test "${ac_64bit_type+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "$cross_compiling" = yes; then
-  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int main(void) {
-  if (sizeof(long)==8)
-    return(0);
-  else
-    return(1);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_64bit_type="long"
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_64bit_type="<none>"
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
+    echo "No 32 bit type found"
+    exit 1
 fi
-echo "$as_me:$LINENO: result: $ac_64bit_type" >&5
-echo "${ECHO_T}$ac_64bit_type" >&6
-if test "$ac_64bit_type" = "long"
-then
+
+if [ $ac_cv_sizeof_long = 8 ]; then
   T1_AA_TYPE64="-DT1_AA_TYPE64=long"
+elif [ $ac_cv_sizeof_long_long = 8 ]; then
+  T1_AA_TYPE64='-DT1_AA_TYPE64="long long"'
 else
-  T1_AA_TYPE64=
+    echo "No 64 bit type found"
+    exit 1
 fi
 
 
