2013-07-05 15:39:05 +02:00
|
|
|
|
$NetBSD: patch-ab,v 1.4 2013/07/05 13:43:44 ryoon Exp $
|
2011-12-31 17:37:25 +01:00
|
|
|
|
|
|
|
|
|
Caution: the extra cpp checking (the three hunks containing "Should be
|
|
|
|
|
one line") is manually hacked and not reflected in configure.in; do
|
|
|
|
|
not regenerate configure with autoconf without merging it. This
|
|
|
|
|
checking is required because somewhere between gcc 4.1 and 4.5 cpp
|
|
|
|
|
started doing regrettable things with backslash-escaped newlines.
|
2007-06-11 15:38:24 +02:00
|
|
|
|
|
2013-07-05 15:39:05 +02:00
|
|
|
|
* Fix build on NetBSD 6.99.23, gcc -E -traditional-cpp with native X
|
|
|
|
|
results syntax error. Use -traditional-cpp for Makefile generation only.
|
|
|
|
|
|
2007-06-11 15:38:24 +02:00
|
|
|
|
--- configure.orig 2003-03-18 14:19:12.000000000 +0000
|
|
|
|
|
+++ configure
|
|
|
|
|
@@ -822,9 +822,17 @@ case "${canonical}" in
|
|
|
|
|
sparc*-*-netbsd*) machine=sparc ;;
|
|
|
|
|
vax-*-netbsd*) machine=vax ;;
|
|
|
|
|
arm-*-netbsd*) machine=arm ;;
|
|
|
|
|
+ x86_64-*-netbsd*) machine=amd64 ;;
|
|
|
|
|
+ hppa-*-netbsd*) machine=hp800 ;;
|
|
|
|
|
+ shle-*-netbsd*) machine=sh3el ;;
|
|
|
|
|
esac
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
+ ## Darwin / Mac OS X
|
|
|
|
|
+ powerpc-apple-darwin* )
|
|
|
|
|
+ machine=powermac opsys=darwin ;;
|
|
|
|
|
+ i386-apple-darwin* )
|
|
|
|
|
+ machine=intel386 opsys=darwin ;;
|
|
|
|
|
## OpenBSD ports
|
|
|
|
|
*-*-openbsd* )
|
|
|
|
|
opsys=openbsd
|
|
|
|
|
@@ -909,6 +917,10 @@ case "${canonical}" in
|
|
|
|
|
machine=macppc opsys=gnu-linux
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
+ x86_64-*-linux* )
|
|
|
|
|
+ machine=amd64 opsys=gnu-linux
|
|
|
|
|
+ ;;
|
|
|
|
|
+
|
|
|
|
|
## Altos 3068
|
|
|
|
|
m68*-altos-sysv* )
|
|
|
|
|
machine=altos opsys=usg5-2
|
|
|
|
|
@@ -1659,6 +1671,7 @@ case "${canonical}" in
|
|
|
|
|
*-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
|
|
|
|
|
*-386bsd* ) opsys=386bsd ;;
|
|
|
|
|
*-freebsd* ) opsys=freebsd ;;
|
|
|
|
|
+ *-dragonfly* ) opsys=dragonfly ;;
|
|
|
|
|
*-nextstep* ) opsys=nextstep ;;
|
|
|
|
|
## Otherwise, we'll fall through to the generic opsys code at the bottom.
|
|
|
|
|
esac
|
2013-07-05 15:39:05 +02:00
|
|
|
|
@@ -2052,15 +2065,20 @@ else
|
2011-12-31 17:37:25 +01:00
|
|
|
|
CPP="${CC-cc} -E"
|
|
|
|
|
# On the NeXT, cc -E runs the code through the compiler's parser,
|
|
|
|
|
# not just through cpp.
|
|
|
|
|
+ # And, gcc 4.5? and up does not preserve escaped newlines, which is
|
|
|
|
|
+ # fatal for preprocessing makefiles.
|
|
|
|
|
cat > conftest.$ac_ext <<EOF
|
|
|
|
|
#line 2057 "configure"
|
|
|
|
|
#include "confdefs.h"
|
|
|
|
|
#include <assert.h>
|
|
|
|
|
Syntax Error
|
2013-07-05 15:39:05 +02:00
|
|
|
|
+Should be one line.
|
2011-12-31 17:37:25 +01:00
|
|
|
|
EOF
|
|
|
|
|
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
|
|
|
|
+ac_try="$ac_cpp conftest.$ac_ext >conftest2.out 2>conftest.out"
|
|
|
|
|
{ (eval echo configure:2063: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
|
|
|
|
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
|
|
|
|
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"; \
|
2012-01-01 00:56:46 +01:00
|
|
|
|
+ grep -L "Should *be one line" conftest2.out \
|
2011-12-31 17:37:25 +01:00
|
|
|
|
+ `
|
|
|
|
|
if test -z "$ac_err"; then
|
|
|
|
|
:
|
|
|
|
|
else
|
2013-07-05 15:39:05 +02:00
|
|
|
|
@@ -2068,16 +2086,19 @@ else
|
|
|
|
|
echo "configure: failed program was:" >&5
|
|
|
|
|
cat conftest.$ac_ext >&5
|
|
|
|
|
rm -rf conftest*
|
|
|
|
|
- CPP="${CC-cc} -E -traditional-cpp"
|
|
|
|
|
+ CPP="${CC-cc} -E"
|
|
|
|
|
cat > conftest.$ac_ext <<EOF
|
|
|
|
|
#line 2074 "configure"
|
2011-12-31 17:37:25 +01:00
|
|
|
|
#include "confdefs.h"
|
|
|
|
|
#include <assert.h>
|
|
|
|
|
Syntax Error
|
2013-07-05 15:39:05 +02:00
|
|
|
|
+Should be one line.
|
2011-12-31 17:37:25 +01:00
|
|
|
|
EOF
|
|
|
|
|
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
|
|
|
|
+ac_try="$ac_cpp conftest.$ac_ext >conftest2.out 2>conftest.out"
|
|
|
|
|
{ (eval echo configure:2080: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
|
|
|
|
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
|
|
|
|
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"; \
|
2012-01-01 00:56:46 +01:00
|
|
|
|
+ grep -L "Should *be one line" conftest2.out \
|
2011-12-31 17:37:25 +01:00
|
|
|
|
+ `
|
|
|
|
|
if test -z "$ac_err"; then
|
|
|
|
|
:
|
|
|
|
|
else
|
2013-07-05 15:39:05 +02:00
|
|
|
|
@@ -2091,10 +2112,13 @@ else
|
2011-12-31 17:37:25 +01:00
|
|
|
|
#include "confdefs.h"
|
|
|
|
|
#include <assert.h>
|
|
|
|
|
Syntax Error
|
2013-07-05 15:39:05 +02:00
|
|
|
|
+Should be one line.
|
2011-12-31 17:37:25 +01:00
|
|
|
|
EOF
|
|
|
|
|
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
|
|
|
|
+ac_try="$ac_cpp conftest.$ac_ext >conftest2.out 2>conftest.out"
|
|
|
|
|
{ (eval echo configure:2097: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
|
|
|
|
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
|
|
|
|
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"; \
|
2012-01-01 00:56:46 +01:00
|
|
|
|
+ grep -L "Should *be one line" conftest2.out \
|
2011-12-31 17:37:25 +01:00
|
|
|
|
+ `
|
|
|
|
|
if test -z "$ac_err"; then
|
|
|
|
|
:
|
|
|
|
|
else
|
2013-07-05 15:39:05 +02:00
|
|
|
|
@@ -5583,24 +5607,24 @@ if eval "test \"`echo '$ac_cv_header_'$a
|
|
|
|
|
echo "$ac_t""yes" 1>&6
|
|
|
|
|
# EGifPutExtensionLast only exists from version libungif-4.1.0b1.
|
|
|
|
|
# Earlier versions can crash Emacs.
|
|
|
|
|
- echo $ac_n "checking for EGifPutExtensionLast in -lungif""... $ac_c" 1>&6
|
|
|
|
|
-echo "configure:5588: checking for EGifPutExtensionLast in -lungif" >&5
|
|
|
|
|
-ac_lib_var=`echo ungif'_'EGifPutExtensionLast | sed 'y%./+-%__p_%'`
|
|
|
|
|
+ echo $ac_n "checking for EGifPutExtensionTrailer in -lgif""... $ac_c" 1>&6
|
|
|
|
|
+echo "configure:5588: checking for EGifPutExtensionTrailer in -lgif" >&5
|
|
|
|
|
+ac_lib_var=`echo ungif'_'EGifPutExtensionTrailer | sed 'y%./+-%__p_%'`
|
|
|
|
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
|
|
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
|
|
|
else
|
|
|
|
|
ac_save_LIBS="$LIBS"
|
|
|
|
|
-LIBS="-lungif $LIBS"
|
|
|
|
|
+LIBS="-lgif $LIBS"
|
|
|
|
|
cat > conftest.$ac_ext <<EOF
|
|
|
|
|
#line 5596 "configure"
|
|
|
|
|
#include "confdefs.h"
|
|
|
|
|
/* Override any gcc2 internal prototype to avoid an error. */
|
|
|
|
|
/* We use char because int might match the return type of a gcc2
|
|
|
|
|
builtin and then its argument prototype would still apply. */
|
|
|
|
|
-char EGifPutExtensionLast();
|
|
|
|
|
+char EGifPutExtensionTrailer();
|
|
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
|
-EGifPutExtensionLast()
|
|
|
|
|
+EGifPutExtensionTrailer()
|
|
|
|
|
; return 0; }
|
|
|
|
|
EOF
|
|
|
|
|
if { (eval echo configure:5607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|
|
|
|
@@ -9124,6 +9148,22 @@ EOF
|
2007-06-11 15:38:24 +02:00
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+# NETBSD: NetBSD's newer run-time linker fix.
|
|
|
|
|
+if test $opsys = netbsd; then
|
|
|
|
|
+ if test -f /usr/lib/crti.o; then
|
|
|
|
|
+ cat >> confdefs.h <<\EOF
|
|
|
|
|
+#define HAVE_NETBSD_CRTI 1
|
|
|
|
|
+EOF
|
|
|
|
|
+
|
|
|
|
|
+ fi
|
|
|
|
|
+ if test -f /usr/lib/crtn.o; then
|
|
|
|
|
+ cat >> confdefs.h <<\EOF
|
|
|
|
|
+#define HAVE_NETBSD_CRTN 1
|
|
|
|
|
+EOF
|
|
|
|
|
+
|
|
|
|
|
+ fi
|
|
|
|
|
+fi
|
|
|
|
|
+
|
|
|
|
|
# Set up the CFLAGS for real compilation, so we can substitute it.
|
|
|
|
|
CFLAGS="$REAL_CFLAGS"
|
|
|
|
|
CPPFLAGS="$REAL_CPPFLAGS"
|
2013-07-05 15:39:05 +02:00
|
|
|
|
@@ -9735,7 +9777,7 @@ echo creating lib-src/Makefile
|
|
|
|
|
sed -e '1,/start of cpp stuff/d'\
|
|
|
|
|
-e 's,/\*\*/#\(.*\)$,/* \1 */,' \
|
|
|
|
|
< Makefile.c > junk.c
|
|
|
|
|
- $CPP $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c | \
|
|
|
|
|
+ $CPP -traditional-cpp $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c | \
|
|
|
|
|
sed -e 's/^ / /' -e '/^#/d' -e '/^[ ]*$/d' > junk2.c
|
|
|
|
|
cat junk1.c junk2.c > Makefile.new
|
|
|
|
|
rm -f junk.c junk1.c junk2.c
|
|
|
|
|
@@ -9751,7 +9793,7 @@ echo creating src/Makefile
|
|
|
|
|
sed -e '1,/start of cpp stuff/d'\
|
|
|
|
|
-e 's,/\*\*/#\(.*\)$,/* \1 */,' \
|
|
|
|
|
< Makefile.c > junk.c
|
|
|
|
|
- $CPP $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c | \
|
|
|
|
|
+ $CPP -traditional-cpp $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c | \
|
|
|
|
|
sed -e 's/^ / /' -e '/^#/d' -e '/^[ ]*$/d' > junk2.c
|
|
|
|
|
cat junk1.c junk2.c > Makefile.new
|
|
|
|
|
rm -f junk.c junk1.c junk2.c
|