Browse Source

Move the special windows lib config into the configure script

pull/1137/head
Hamish Coleman 1 year ago
parent
commit
59ecadcab2
  1. 1
      Makefile
  2. 3
      configure.ac
  3. 5
      scripts/hack_fakeautoconf.sh

1
Makefile

@ -154,7 +154,6 @@ LDLIBS+=$(LDLIBS_EXTRA)
ifeq ($(CONFIG_TARGET),mingw) ifeq ($(CONFIG_TARGET),mingw)
LDLIBS+=$(abspath win32/n2n_win32.a) LDLIBS+=$(abspath win32/n2n_win32.a)
LDLIBS+=-lnetapi32 -lws2_32 -liphlpapi
N2N_DEPS+=win32/n2n_win32.a N2N_DEPS+=win32/n2n_win32.a
SUBDIRS+=win32 SUBDIRS+=win32
endif endif

3
configure.ac

@ -18,6 +18,9 @@ case "$host_os" in
# and comment "For OpenSolaris (Solaris too?)" # and comment "For OpenSolaris (Solaris too?)"
LIBS="-lsocket -lnsl $LIBS" LIBS="-lsocket -lnsl $LIBS"
;; ;;
mingw*)
LIBS="-lnetapi32 -lws2_32 -liphlpapi $LIBS"
;;
esac esac
# This replicates the old config logic from the Makefile. # This replicates the old config logic from the Makefile.

5
scripts/hack_fakeautoconf.sh

@ -18,12 +18,15 @@ chmod a+x configure
cat >config.mak <<EOF cat >config.mak <<EOF
CONFIG_HOST=x86_64-w64-mingw32 CONFIG_HOST=x86_64-w64-mingw32
CONFIG_HOST_OS=mingw32
CONFIG_PREFIX=/usr/local
CC=gcc CC=gcc
AR=ar AR=ar
WINDRES=windres WINDRES=windres
CFLAGS=$CFLAGS -g -O2 CFLAGS=$CFLAGS -g -O2
LDFLAGS=$LDFLAGS LDFLAGS=$LDFLAGS
LDLIBS_EXTRA=$LDLIBS LDLIBS_EXTRA=-lnetapi32 -lws2_32 -liphlpapi
EOF EOF
cat <<EOF >include/config.h cat <<EOF >include/config.h

Loading…
Cancel
Save