--- tnftp-20050625/configure.in.orig 2005-11-26 20:54:03.000000000 +0100 +++ tnftp-20050625/configure.in 2005-11-26 20:54:35.000000000 +0100 @@ -199,7 +199,7 @@ dnl Always replace glob(3); the vendor's may not be secure. dnl -LIBOBJS="$LIBOBJS glob.o" +AC_LIBOBJ([glob]) if test $ac_cv_func_strptime = yes; then AC_MSG_TRY_COMPILE([for strptime() declaration], @@ -323,7 +323,7 @@ #include ], [ int f = sl_add((StringList *)0, "foo") - ], [ : ], [LIBOBJS="$LIBOBJS sl_init.o"]) + ], [ : ], [AC_LIBOBJ([sl_init])]) fi @@ -342,7 +342,7 @@ AC_MSG_RESULT(yes) else if test $ac_cv_func_getaddrinfo = yes; then - LIBOBJS="$LIBOBJS getaddrinfo.o" + AC_LIBOBJ([getaddrinfo]) AC_MSG_RESULT([no - using local version]) else AC_MSG_RESULT([using local version]) @@ -359,12 +359,22 @@ fi -if test -n "$LIBOBJS"; then - INCLUDES="$INCLUDES -I\${srcdir}/../libnetbsd" - LDFLAGS="$LDFLAGS -L../libnetbsd" - LIBS="$LIBS -lnetbsd" - LIBNETBSD=libnetbsd.a - LIBDEPENDS="$LIBDEPENDS ../libnetbsd/libnetbsd.a" +INCLUDES="$INCLUDES -I\${srcdir}/../libnetbsd" +LDFLAGS="$LDFLAGS -L../libnetbsd" +LIBS="$LIBS -lnetbsd" +LIBNETBSD=libnetbsd.a +LIBDEPENDS="$LIBDEPENDS ../libnetbsd/libnetbsd.a" + +AC_MSG_CHECKING([for apple's gcc]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#ifndef __APPLE__ +make an error +#endif]])], + [ac_cv_apple_gcc=yes], + [ac_cv_apple_gcc=no]) + +if test $ac_cv_apple_gcc = yes; then + LDFLAGS="$LDFLAGS -Xlinker -search_paths_first" fi dnl Create the Makefiles