-dnl $Id: aclocal.m4,v 1.28 1998/09/29 17:30:09 sof Exp $
+dnl $Id: aclocal.m4,v 1.29 1998/10/05 14:15:32 simonm Exp $
dnl
dnl Extra autoconf macros for the Glasgow fptools
dnl
dnl
dnl We assume that they _haven't_ if anything goes wrong.
dnl
+dnl Some nlist implementations seem to try to be compatible by ignoring
+dnl a leading underscore sometimes (eg. FreeBSD). We therefore have
+dnl to work around this by checking for *no* leading underscore first.
+dnl Sigh. --SDM
+dnl
AC_DEFUN(FPTOOLS_UNDERSCORE,
[AC_CHECK_LIB(elf, nlist, LIBS="-lelf $LIBS")dnl
AC_CACHE_CHECK([leading underscore in symbol names], fptools_cv_lead_uscore,
#include <nlist.h>
changequote(<<, >>)dnl
<<
-struct nlist xYzzY[] = {{"_xYzzY", 0},{0}};
+struct nlist xYzzY1[] = {{"xYzzY1", 0},{0}};
+struct nlist xYzzY2[] = {{"_xYzzY2", 0},{0}};
#endif
main(argc, argv)
char **argv;
{
#ifdef HAVE_NLIST_H
- if(nlist(argv[0], xYzzY) == 0 && xYzzY[0].n_value != 0)
+ if(nlist(argv[0], xYzzY1) == 0 && xYzzY1[0].n_value != 0)
+ exit(1);
+ if(nlist(argv[0], xYzzY2) == 0 && xYzzY2[0].n_value != 0)
exit(0);>>
changequote([, ])dnl
#endif
HostVendor_CPP='unknown'
HostOS_CPP='linux'
;;
-i[[3456]]86-*-freebsd*)
- HostPlatform=i386-unknown-freebsd # hack again
- TargetPlatform=i386-unknown-freebsd
- BuildPlatform=i386-unknown-freebsd
- HostPlatform_CPP='i386_unknown_freebsd'
+i[[3456]]86-*-freebsd3*) # FreeBSD 3.0+ uses ELF
+ HostPlatform=i386-unknown-freebsd3 # hack again
+ TargetPlatform=i386-unknown-freebsd3
+ BuildPlatform=i386-unknown-freebsd3
+ HostPlatform_CPP='i386_unknown_freebsd3'
HostArch_CPP='i386'
HostVendor_CPP='unknown'
- HostOS_CPP='freebsd'
+ HostOS_CPP='freebsd3'
+ ;;
+i[[3456]]86-*-freebsd2*) # Older FreeBSDs are a.out
+ HostPlatform=i386-unknown-freebsd2 # hack again
+ TargetPlatform=i386-unknown-freebsd2
+ BuildPlatform=i386-unknown-freebsd2
+ HostPlatform_CPP='i386_unknown_freebsd2'
+ HostArch_CPP='i386'
+ HostVendor_CPP='unknown'
+ HostOS_CPP='freebsd2'
;;
i[[3456]]86-*-netbsd*)
HostPlatform=i386-unknown-netbsd # hack again