2013-09-26 17:14:40 +02:00

30 lines
1.1 KiB
Plaintext

$NetBSD: patch-bb,v 1.2 2012/12/20 22:07:57 joerg Exp $
fix void main.
--- Config/autoconf.orig 1998-03-22 23:26:53.000000000 +0000
+++ Config/autoconf
@@ -6,7 +6,7 @@ touch Config test.h config.h config.outp
# Test for broken include files (SunOS)
echo "#include <stdio.h>" > test.c
-echo "void main() { fprintf(stderr,\"hello\"); }" >> test.c
+echo "int main() { fprintf(stderr,\"hello\"); return 0; }" >> test.c
if gcc -Wall -c test.c 2>config.output; then
if grep -q implicit config.output; then
echo "Some function prototypes seem to be missing"
@@ -173,11 +173,11 @@ if sh ./runtest x11.c; then
echo "Successfully linked sample X11 program"
echo "X11EXTRA = $X11EXTRA" >>Config
else
- libs="-idirafter $X11INCLUDE -R$X11LIB -L$X11LIB -lX11 $X11EXTRA"
+ libs="-idirafter $X11INCLUDE -Wl,-R$X11LIB -L$X11LIB -lX11 $X11EXTRA"
export libs
if sh ./runtest x11.c; then
echo "Successfully linked sample X11 program by using -R$X11LIB"
- echo "X11EXTRA = -R$X11LIB $X11EXTRA" >>Config
+ echo "X11EXTRA = -Wl,-R$X11LIB $X11EXTRA" >>Config
else
echo "Failed to link sample X11 program"
exit 1