case $host_os in
*mingw*) AC_DEFINE([MSWIN_API], 1,
[Define to 1 to use Microsoft Windows native API.])
+ EXTRA_LIBS='-lws2_32'
mswin_api=yes;;
*) mswin_api=no;;
esac
AC_MSG_RESULT([$mswin_api])
AM_CONDITIONAL(MSWIN_API, test "$mswin_api" = "yes")
+AC_SUBST(EXTRA_LIBS)
# Taken from dbus
AC_ARG_ENABLE(ansi, [ --enable-ansi enable -ansi -pedantic gcc flags],enable_ansi=$enableval,enable_ansi=no)
Description: library for depsolving, installing and removing packages
Version: @VERSION@
Requires: libcurl
-Libs: -L${libdir} -lexpat -lz -lrazor
+Libs: -L${libdir} -lexpat -lz -lrazor @EXTRA_LIBS@
Cflags: -I${includedir}/razor
merger.c \
transaction.c
-librazor_la_LIBADD = $(ZLIB_LIBS) ../gl/libgnu.la
+librazor_la_LIBADD = $(ZLIB_LIBS) ../gl/libgnu.la $(EXTRA_LIBS)
clean-local :
rm -f *~
#include <dirent.h>
#include <unistd.h>
#if MSWIN_API
-#include <winsock.h> /* For ntohl() */
+#include <winsock2.h> /* For ntohl() */
#else
#include <arpa/inet.h>
#endif
if HAVE_RPMLIB
razor_SOURCES += import-rpmdb.c
endif
-razor_LDADD = $(RPM_LIBS) $(EXPAT_LIBS) $(CURL_LIBS) $(top_builddir)/librazor/librazor.la $(top_builddir)/gl/libgnu.la
+razor_LDADD = $(RPM_LIBS) $(EXPAT_LIBS) $(CURL_LIBS) $(top_builddir)/librazor/librazor.la $(top_builddir)/gl/libgnu.la $(EXTRA_LIBS)
rpm_SOURCES = rpm.c
-rpm_LDADD = $(top_builddir)/librazor/librazor.la
+rpm_LDADD = $(top_builddir)/librazor/librazor.la $(EXTRA_LIBS)
test_driver_SOURCES = test-driver.c
-test_driver_LDADD = $(EXPAT_LIBS) $(top_builddir)/librazor/librazor.la
+test_driver_LDADD = $(EXPAT_LIBS) $(top_builddir)/librazor/librazor.la $(EXTRA_LIBS)
TESTS = test-driver