Files
pkgsrc-ng/devel/libmtp/patches/patch-configure
2016-11-18 22:39:22 +01:00

65 lines
1.7 KiB
Plaintext

$NetBSD: patch-configure,v 1.3 2016/04/09 10:09:14 richard Exp $
fix == in test
--- configure.orig 2016-02-10 20:17:35.000000000 +0000
+++ configure
@@ -15087,7 +15087,7 @@ fi
# (No need to use AC_SUBST on this default substituted environment variable.)
# Only add these additional CFLAGS if we are using GCC. Other C compilers may
# not support them.
-if test x"$GCC" == "xyes" ; then
+if test x"$GCC" = "xyes" ; then
CFLAGS="$CFLAGS -Wall -Wmissing-prototypes"
fi
@@ -15684,6 +15684,36 @@ else
$as_echo "no" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSWAP_32 in sys/byteorder.h" >&5
+$as_echo_n "checking for BSWAP_32 in sys/byteorder.h... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/byteorder.h>
+#ifdef BSWAP_32
+ symbol is present
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "symbol is present|\<BSWAP_32\>" >/dev/null 2>&1; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ cat >> "src/gphoto2-endian.h" << EOF
+/* Define generic byte swapping functions */
+EOF
+cat >> "src/gphoto2-endian.h" << EOF
+#define swap16(x) BSWAP_16(x)
+#define swap32(x) BSWAP_32(x)
+#define swap64(x) BSWAP_64(x)
+
+EOF
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bswap32 in machine/endian.h" >&5
$as_echo_n "checking for bswap32 in machine/endian.h... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -15844,6 +15874,11 @@ rm -f conftest*
+fi
+rm -f conftest*
+
+
+
if test "$HAVE_LE32TOH" != "1"; then
cat >> "src/gphoto2-endian.h" << EOF