pkgsrc-wip/links-hacked/patches/patch-aa
2006-08-14 22:43:54 +00:00

65 lines
1.9 KiB
Text

$NetBSD: patch-aa,v 1.3 2006/08/14 22:43:54 thomasklausner Exp $
--- configure.in.orig 2003-07-09 07:10:59.000000000 +0000
+++ configure.in
@@ -86,36 +86,6 @@ AC_CHECK_SIZEOF(int,"$default_int")
AC_CHECK_SIZEOF(unsigned, "$default_int")
AC_CHECK_SIZEOF(long, "$default_int")
AC_CHECK_SIZEOF(unsigned long, "$default_int")
-AC_CACHE_CHECK([for big endian], ac_cv_big_endian,
- AC_TRY_RUN([
- long l;
- char *c = (char *)&l;
- int main()
- {
- l = 0x12345678L;
- return !(c[[sizeof(long) - 1]] == 0x78 && c[[sizeof(long) - 2]] == 0x56 && c[[sizeof(long) - 3]] == 0x34 && c[[sizeof(long) - 4]] == 0x12);
- }
- ], ac_cv_big_endian=yes, ac_cv_big_endian=no, ac_cv_big_endian=no)
-)
-AC_CACHE_CHECK([for little endian], ac_cv_little_endian,
- AC_TRY_RUN([
- long l;
- char *c = (char *)&l;
- int main()
- {
- l = 0x12345678L;
- return !(c[[0]] == 0x78 && c[[1]] == 0x56 && c[[2]] == 0x34 && c[[3]] == 0x12);
- }
- ], ac_cv_little_endian=yes, ac_cv_little_endian=no, ac_cv_little_endian="$ac_cv_have_emx")
-)
-
-if test "$ac_cv_big_endian" = yes; then
- AC_DEFINE(AC_BIG_ENDIAN)
-else if test "$ac_cv_little_endian" = yes; then
- AC_DEFINE(AC_LITTLE_ENDIAN)
-fi
-fi
-
dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_FUNC_MEMCMP
@@ -281,12 +251,12 @@ cf_result=no
if test -z "$disable_lua"; then
# It's double here in order to have the piggyswitch hack working
# Hack, indeed. Guess why? Yes, it's Debian!
- for luadir in "" /usr /usr /usr/local /usr/local; do
+ for luadir in "${PREFIX}"; do
if test "$cf_result" = no; then
if test "$xyz_piggyswitch" = "cow"; then
LIBS="-llua40 -llualib40 -lm $LIBS_X"
else
- LIBS="-llua -llualib -lm $LIBS_X"
+ LIBS="-llua -lm $LIBS_X"
fi
if test ! -z "$luadir"; then
@@ -302,7 +272,7 @@ if test -z "$disable_lua"; then
fi
AC_TRY_LINK([#include <lua.h>],
- [lua_open(0)],
+ [lua_open();],
cf_result=yes, cf_result=no)
fi
done