done
LIBS="$old_LIBS `eval echo x $TCL_LIB_SPEC $TCL_LIBS | sed 's/^x//'`"
LDFLAGS="$old_LDFLAGS $TCL_LD_FLAGS"
- AC_TRY_LINK( , [Tcl_CreateInterp ();],
+ AC_TRY_LINK([#include <tcl.h>], [Tcl_CreateInterp ();],
tcl_ok_conf=$file
tcl_vers_maj=$TCL_MAJOR_VERSION
tcl_vers_min=$TCL_MINOR_VERSION
fi
a=no
b=no
-# blindly assume we have 'unlink'...
-AC_TRY_RUN([void foo1() __attribute__((constructor));
+# blindly assume we have 'unlink' and unistd.h.
+AC_TRY_RUN([#include <unistd.h>
+void foo1() __attribute__((constructor));
void foo1() { unlink("conftest.1"); }
void foo2() __attribute__((destructor));
void foo2() { unlink("conftest.2"); }