AC_CHECK_HEADERS([string.h strings.h errno.h unistd.h stdio.h stdlib.h])
AC_CHECK_HEADERS([sys/stat.h sys/types.h dirent.h sys/time.h])
-AC_CHECK_LIBS([readdir], [c])
-AC_CHECK_LIBS([strcpy], [c])
-AC_CHECK_LIBS([strstr], [c])
-AC_CHECK_LIBS([memcpy], [c])
+AC_CHECK_LIB([c], [readdir])
+AC_CHECK_LIB([c], [strcpy])
+AC_CHECK_LIB([c], [strstr])
+AC_CHECK_LIB([c], [memcpy])
AC_ARG_ENABLE(tbz2tool,
AC_HELP_STRING([--enable-tbz2tool],[build tbz2tool, tool for creating binpkgs (default yes)]),