$NetBSD: patch-aa,v 1.3 2022/05/05 13:49:41 nia Exp $

Don't use the root /etc. XXX: it shouldn't use the etc in PREFIX either...

--- configure.orig	2002-05-19 10:06:07.000000000 +0000
+++ configure
@@ -3360,10 +3360,10 @@ return(0);
 }
 EOF
 if { (eval echo configure:3363: \"$mh_compile\") 1>&5; (eval $mh_compile) 2>&5; } && test -s conftest.o; then
-        mh_dyn_link='ld -shared -o conftest.so.1.0 conftest.o -lc 1>&5'
+        mh_dyn_link='${CC} ${LDFLAGS} -shared -o conftest.so.1.0 conftest.o -lc 1>&5'
 #       mh_dyn_link='${CC} -Wl,-shared -o conftest.so.1.0 conftest.o -lc 1>&AC_FD_CC'
         if { (eval echo configure:3366: \"$mh_dyn_link\") 1>&5; (eval $mh_dyn_link) 2>&5; } && test -s conftest.so.1.0; then
-                SHL_LD="ld -shared -o ${SHLPRE}${SHLFILE}${SHLPST} "'$('SHOFILES')'" -lc"
+                SHL_LD="${CC} ${LDFLAGS} -shared -o ${SHLPRE}${SHLFILE}${SHLPST} "'$('SHOFILES')'" -lc"
 #               SHL_LD="${CC} -Wl,-shared -o ${SHLPRE}${SHLFILE}${SHLPST} "'$('SHOFILES')'" -lc"
         else
                 mh_dyn_link='ld -G -o conftest.so.1.0 conftest.o 1>&5'
@@ -3421,11 +3421,11 @@ return(0);
 }
 EOF
 if { (eval echo configure:3424: \"$mh_compile\") 1>&5; (eval $mh_compile) 2>&5; } && test -s conftest.o; then
-        mh_dyn_link='ld -shared -o conftest.rxlib conftest.o -lc 1>&5'
+        mh_dyn_link='${CC} ${LDFLAGS} -shared -o conftest.rxlib conftest.o -lc 1>&5'
 #       mh_dyn_link='${CC} -Wl,-shared -o conftest.rxlib conftest.o -lc 1>&AC_FD_CC'
         if { (eval echo configure:3427: \"$mh_dyn_link\") 1>&5; (eval $mh_dyn_link) 2>&5; } && test -s conftest.rxlib; then
-                LD_RXLIB_A1="ld -shared"
-                LD_RXLIB_A2="ld -shared"
+                LD_RXLIB_A1="${CC} ${LDFLAGS} -shared"
+                LD_RXLIB_A2="${CC} ${LDFLAGS} -shared"
 #               LD_RXLIB1="${CC} -Wl,-shared"
                 LD_RXLIB_B1="-L. -l${SHLFILE}"
                 LD_RXLIB_B2="-L. -l${SHLFILE}"
@@ -3598,7 +3598,7 @@ cat >> confdefs.h <<\EOF
 EOF
 
 
-STARTUPDIR="/etc"
+STARTUPDIR="${exec_prefix}/etc"
 if test -d /etc/rc.d/init.d; then
 	STARTUPDIR="/etc/rc.d/init.d"
 else
