-INCLUDES = -I$(top_srcdir)/src/include
+AM_CPPFLAGS = -I$(top_srcdir)/src/include
if MINGW
WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
NATCLIENT = gnunet-helper-nat-client-windows.c
endif
+libexecdir= $(pkglibdir)/libexec/
-if ENABLE_TEST_RUN
- nattest = $(bindir)/gnunet-nat-server
-endif
+pkgcfgdir= $(pkgdatadir)/config.d/
+dist_pkgcfg_DATA = \
+ nat.conf
if LINUX
-NATBIN = gnunet-helper-nat-server gnunet-helper-nat-client
-NATSERVER = gnunet-helper-nat-server.c
-NATCLIENT = gnunet-helper-nat-client.c
+ NATBIN = gnunet-helper-nat-server gnunet-helper-nat-client
+ NATSERVER = gnunet-helper-nat-server.c
+ NATCLIENT = gnunet-helper-nat-client.c
+install-exec-hook:
+ $(top_srcdir)/src/nat/install-nat-helper.sh $(libexecdir) $(SUDO_BINARY) || true
+else
+if XFREEBSD
+ NATBIN = gnunet-helper-nat-server gnunet-helper-nat-client
+ NATSERVER = gnunet-helper-nat-server.c
+ NATCLIENT = gnunet-helper-nat-client.c
install-exec-hook:
- $(SUDO_BINARY) chown root:root $(bindir)/gnunet-helper-nat-server $(bindir)/gnunet-helper-nat-client $(nattest) || true
- $(SUDO_BINARY) chmod u+s $(bindir)/gnunet-helper-nat-server $(bindir)/gnunet-helper-nat-client $(nattest) || true
+ $(top_srcdir)/src/nat/install-nat-helper.sh $(libexecdir) $(SUDO_BINARY) || true
+endif
else
install-exec-hook:
endif
bin_PROGRAMS = \
- gnunet-nat-server \
+ gnunet-nat-server
+
+libexec_PROGRAMS = \
$(NATBIN)
gnunet_nat_server_SOURCES = \
libgnunetnat_la_SOURCES = \
nat.c nat.h \
+ nat_auto.c \
nat_test.c \
- nat_mini.c
+ nat_mini.c
libgnunetnat_la_LIBADD = \
$(top_builddir)/src/util/libgnunetutil.la \
libgnunetnat_la_LDFLAGS = \
$(GN_LIB_LDFLAGS) $(WINFLAGS) \
- -version-info 0:0:0
+ -version-info 1:1:1
check_PROGRAMS = \
test_nat \
test_nat_test
if ENABLE_TEST_RUN
+ AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
TESTS = $(check_PROGRAMS)
endif
EXTRA_DIST = \
test_nat_data.conf \
- test_nat_test_data.conf
\ No newline at end of file
+ test_nat_test_data.conf