Pinch a fix/workaround from 2.16.5's configure script to ensure that
endianness is detected correctly on all platforms. ok martynas@ Also drop a bogus configure patch that is a no-op.
This commit is contained in:
parent
96548d0dc6
commit
7ff60146b4
@ -1,11 +1,11 @@
|
||||
# $OpenBSD: Makefile,v 1.48 2008/07/24 10:02:57 martynas Exp $
|
||||
# $OpenBSD: Makefile,v 1.49 2008/08/01 20:53:05 naddy Exp $
|
||||
|
||||
COMMENT-main= general-purpose utility library
|
||||
COMMENT-docs= glib2 documentation
|
||||
|
||||
VERSION= 2.16.4
|
||||
DISTNAME= glib-${VERSION}
|
||||
PKGNAME-main= glib2-${VERSION}p0
|
||||
PKGNAME-main= glib2-${VERSION}p1
|
||||
PKGNAME-docs= glib2-docs-${VERSION}p0
|
||||
CATEGORIES= devel
|
||||
|
||||
|
@ -1,12 +1,151 @@
|
||||
$OpenBSD: patch-configure,v 1.9 2008/07/08 08:38:26 brad Exp $
|
||||
--- configure.orig Tue Jul 1 21:31:24 2008
|
||||
+++ configure Wed Jul 2 05:03:56 2008
|
||||
@@ -32625,6 +32625,8 @@ _ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
+#include <sys/param.h>
|
||||
+#include <sys/mount.h>
|
||||
$ac_includes_default
|
||||
int
|
||||
main ()
|
||||
$OpenBSD: patch-configure,v 1.10 2008/08/01 20:53:05 naddy Exp $
|
||||
--- configure.orig Wed Jul 2 03:31:24 2008
|
||||
+++ configure Thu Jul 31 17:09:17 2008
|
||||
@@ -31448,46 +31448,6 @@ if test "${ac_cv_c_bigendian+set}" = set; then
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_cv_c_bigendian=unknown
|
||||
- # See if __BIG_ENDIAN__ or __LITTLE_ENDIAN__ is defined.
|
||||
- cat >conftest.$ac_ext <<_ACEOF
|
||||
-/* confdefs.h. */
|
||||
-_ACEOF
|
||||
-cat confdefs.h >>conftest.$ac_ext
|
||||
-cat >>conftest.$ac_ext <<_ACEOF
|
||||
-/* end confdefs.h. */
|
||||
-#if ! (defined __BIG_ENDIAN__ || defined __LITTLE_ENDIAN__)
|
||||
- neither is defined;
|
||||
- #endif
|
||||
- typedef int dummy;
|
||||
-
|
||||
-_ACEOF
|
||||
-rm -f conftest.$ac_objext
|
||||
-if { (ac_try="$ac_compile"
|
||||
-case "(($ac_try" in
|
||||
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
- *) ac_try_echo=$ac_try;;
|
||||
-esac
|
||||
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
|
||||
-$as_echo "$ac_try_echo") >&5
|
||||
- (eval "$ac_compile") 2>conftest.er1
|
||||
- ac_status=$?
|
||||
- grep -v '^ *+' conftest.er1 >conftest.err
|
||||
- rm -f conftest.er1
|
||||
- cat conftest.err >&5
|
||||
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
- (exit $ac_status); } && {
|
||||
- test -z "$ac_c_werror_flag" ||
|
||||
- test ! -s conftest.err
|
||||
- } && test -s conftest.$ac_objext; then
|
||||
- ac_cv_c_bigendian=universal
|
||||
-else
|
||||
- $as_echo "$as_me: failed program was:" >&5
|
||||
-sed 's/^/| /' conftest.$ac_ext >&5
|
||||
-
|
||||
-
|
||||
-fi
|
||||
-
|
||||
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
if test $ac_cv_c_bigendian = unknown; then
|
||||
# See if sys/param.h defines the BYTE_ORDER macro.
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
@@ -31836,6 +31796,100 @@ $as_echo "$as_me: error: unknown endianness
|
||||
{ (exit 1); exit 1; }; } ;;
|
||||
esac
|
||||
|
||||
+if test x$ac_cv_c_bigendian = xuniversal ; then
|
||||
+cat >conftest.$ac_ext <<_ACEOF
|
||||
+/* confdefs.h. */
|
||||
+_ACEOF
|
||||
+cat confdefs.h >>conftest.$ac_ext
|
||||
+cat >>conftest.$ac_ext <<_ACEOF
|
||||
+/* end confdefs.h. */
|
||||
+#include <endian.h>
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+#if __BYTE_ORDER == __BIG_ENDIAN
|
||||
+#else
|
||||
+#error Not a big endian.
|
||||
+#endif
|
||||
+ ;
|
||||
+ return 0;
|
||||
+}
|
||||
+_ACEOF
|
||||
+rm -f conftest.$ac_objext
|
||||
+if { (ac_try="$ac_compile"
|
||||
+case "(($ac_try" in
|
||||
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
+ *) ac_try_echo=$ac_try;;
|
||||
+esac
|
||||
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
|
||||
+$as_echo "$ac_try_echo") >&5
|
||||
+ (eval "$ac_compile") 2>conftest.er1
|
||||
+ ac_status=$?
|
||||
+ grep -v '^ *+' conftest.er1 >conftest.err
|
||||
+ rm -f conftest.er1
|
||||
+ cat conftest.err >&5
|
||||
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
+ (exit $ac_status); } && {
|
||||
+ test -z "$ac_c_werror_flag" ||
|
||||
+ test ! -s conftest.err
|
||||
+ } && test -s conftest.$ac_objext; then
|
||||
+ ac_cv_c_bigendian=yes
|
||||
+
|
||||
+else
|
||||
+ $as_echo "$as_me: failed program was:" >&5
|
||||
+sed 's/^/| /' conftest.$ac_ext >&5
|
||||
+
|
||||
+ cat >conftest.$ac_ext <<_ACEOF
|
||||
+/* confdefs.h. */
|
||||
+_ACEOF
|
||||
+cat confdefs.h >>conftest.$ac_ext
|
||||
+cat >>conftest.$ac_ext <<_ACEOF
|
||||
+/* end confdefs.h. */
|
||||
+#include <endian.h>
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
+#else
|
||||
+#error Not a little endian.
|
||||
+#endif
|
||||
+ ;
|
||||
+ return 0;
|
||||
+}
|
||||
+_ACEOF
|
||||
+rm -f conftest.$ac_objext
|
||||
+if { (ac_try="$ac_compile"
|
||||
+case "(($ac_try" in
|
||||
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
+ *) ac_try_echo=$ac_try;;
|
||||
+esac
|
||||
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
|
||||
+$as_echo "$ac_try_echo") >&5
|
||||
+ (eval "$ac_compile") 2>conftest.er1
|
||||
+ ac_status=$?
|
||||
+ grep -v '^ *+' conftest.er1 >conftest.err
|
||||
+ rm -f conftest.er1
|
||||
+ cat conftest.err >&5
|
||||
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
+ (exit $ac_status); } && {
|
||||
+ test -z "$ac_c_werror_flag" ||
|
||||
+ test ! -s conftest.err
|
||||
+ } && test -s conftest.$ac_objext; then
|
||||
+ ac_cv_c_bigendian=no
|
||||
+
|
||||
+else
|
||||
+ $as_echo "$as_me: failed program was:" >&5
|
||||
+sed 's/^/| /' conftest.$ac_ext >&5
|
||||
+
|
||||
+ { $as_echo "$as_me:$LINENO: WARNING: Could not determine endianness." >&5
|
||||
+$as_echo "$as_me: WARNING: Could not determine endianness." >&2;}
|
||||
+fi
|
||||
+
|
||||
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
+fi
|
||||
+
|
||||
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
+fi
|
||||
|
||||
# check for header files
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user