[syslinux] [patch] ./configure problem on Solaris with Sun's CC
Mike Bristow
mike at urgle.com
Mon Jun 9 08:42:22 PDT 2003
Hi,
I have a problem with tftpd-hpa on Solaris-8, in that the configure
script cannot find the regex engine.
This is because of the following in configure.in:
LIBXTRA=false
AC_SEARCH_LIBS(xmalloc, iberty, , LIBXTRA=true AC_LIBOBJ(xmalloc))
AC_SEARCH_LIBS(xstrdup, iberty, , LIBXTRA=true AC_LIBOBJ(xstrdup))
AC_SEARCH_LIBS(bsd_signal, bsd, , LIBXTRA=true AC_LIBOBJ(bsdsignal))
if $LIBXTRA; then
LIBS="../lib/libxtra.a $LIBS"
fi
Solaris doesn't have xmalloc and friends available and so LIBS
includes ../lib/libxtra.a.
This causes all future invokations of the compiler to fail like so:
configure:10955: /opt/SUNWspro/bin/cc -o conftest -fast -g -xs -v -xstrconst -xdepend -xtarget=ultra2 -xarch=v8plusa -xprefetch -fast -g -xs -v -xstrconst -xdepend -xtarget=ultra2 -xarch=v8plusa -xprefetch -D_XPG4_2 -D_XOPEN_SOURCE -D__EXTENSIONS__ -D_BSD_SOURCE -D_ISO9X_SOURCE -D_OSF_SOURCE -D_XOPEN_SOURCE_EXTENDED -fno-strict-aliasing -xildoff -xildoff -xildoff -xildoff conftest.c ../lib/libxtra.a -lresolv -lnsl -lsocket >&5
cc: Warning: illegal option -fno-strict-aliasing
ld: fatal: file ../lib/libxtra.a: open failed: No such file or directory
ld: fatal: File processing errors. No output written to conftest
Because, of course, libxtra doesn't exist yet.
(The illegal option warning is annoying in the build logs, but
harmless and easily ignorable).
I've attached a patch which I believe fixes this problem, without
any undesirable side effects.
Can anyone see a problem with it?
Ta,
Mike
Index: tftphpa/configure.in
===================================================================
RCS file: /cvsroot/upstream/tftphpa/configure.in,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 configure.in
--- tftphpa/configure.in 2003/01/31 02:17:01 1.1.1.1
+++ tftphpa/configure.in 2003/06/09 15:05:41
@@ -124,7 +124,7 @@
AC_SEARCH_LIBS(xstrdup, iberty, , LIBXTRA=true AC_LIBOBJ(xstrdup))
AC_SEARCH_LIBS(bsd_signal, bsd, , LIBXTRA=true AC_LIBOBJ(bsdsignal))
if $LIBXTRA; then
- LIBS="../lib/libxtra.a $LIBS"
+ XTRA_LIBS="../lib/libxtra.a"
fi
dnl
@@ -159,7 +159,7 @@
])
],:)
-TFTPD_LIBS="$LIBS"
+TFTPD_LIBS="$LIBS $XTRA_LIBS"
LIBS="$common_libs"
dnl
@@ -187,8 +187,8 @@
])
],:)
-TFTP_LIBS="$LIBS"
-LIBS="$common_libs"
+TFTP_LIBS="$LIBS $XTRA_LIBS"
+LIBS="$common_libs $XTRA_LIBS"
AC_SUBST(TFTP_LIBS)
AC_SUBST(TFTPD_LIBS)
More information about the Syslinux
mailing list