aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGilles Chehade <gilles@poolp.org>2020-01-09 02:02:49 +0100
committerGilles Chehade <gilles@poolp.org>2020-01-09 02:02:49 +0100
commit1a803f93013aaad1baca281dd3a710b36f139a98 (patch)
treeff47c6aefc29a474c6d3b932ae299657e79703aa
parentremove useless define exclusions and add missing header (diff)
downloadOpenSMTPD-1a803f93013aaad1baca281dd3a710b36f139a98.tar.xz
OpenSMTPD-1a803f93013aaad1baca281dd3a710b36f139a98.zip
build libasr into libopenbsd
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac1
-rw-r--r--mk/smtpctl/Makefile.am1
-rw-r--r--mk/smtpd/Makefile.am1
-rw-r--r--openbsd-compat/Makefile.am28
-rw-r--r--openbsd-compat/libasr/Makefile.am21
6 files changed, 28 insertions, 26 deletions
diff --git a/Makefile.am b/Makefile.am
index 0e3a33c5..7d95a5b8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,3 +1,3 @@
-SUBDIRS = openbsd-compat openbsd-compat/libasr mk contrib
+SUBDIRS = openbsd-compat mk contrib
ACLOCAL_AMFLAGS = -I m4
diff --git a/configure.ac b/configure.ac
index ab487ac7..53899000 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2040,7 +2040,6 @@ AM_CONDITIONAL([NEED_PROGNAME], [test "x$ac_cv_libc_defines___progname" != "xyes
AC_CONFIG_FILES([Makefile
openbsd-compat/Makefile
- openbsd-compat/libasr/Makefile
mk/Makefile
mk/mail/Makefile
mk/mail/mail.lmtp/Makefile
diff --git a/mk/smtpctl/Makefile.am b/mk/smtpctl/Makefile.am
index 6564742b..3aac9bd7 100644
--- a/mk/smtpctl/Makefile.am
+++ b/mk/smtpctl/Makefile.am
@@ -71,7 +71,6 @@ FIXPATHSCMD= $(SED) $(PATHSUBS)
if NEED_LIBASR
AM_CPPFLAGS+= -I$(top_srcdir)/openbsd-compat/libasr
-LIBCOMPAT+= $(top_builddir)/openbsd-compat/libasr/libasr.a
endif
$(MANPAGES): $(MANPAGES_IN)
diff --git a/mk/smtpd/Makefile.am b/mk/smtpd/Makefile.am
index 99be86e6..546ee8f0 100644
--- a/mk/smtpd/Makefile.am
+++ b/mk/smtpd/Makefile.am
@@ -102,7 +102,6 @@ endif
LIBCOMPAT= $(top_builddir)/openbsd-compat/libopenbsd.a
if NEED_LIBASR
AM_CPPFLAGS+= -I$(top_srcdir)/openbsd-compat/libasr
-LIBCOMPAT+= $(top_builddir)/openbsd-compat/libasr/libasr.a
endif
LDADD= $(LIBCOMPAT) $(DB_LIB) $(ASR_LIB)
diff --git a/openbsd-compat/Makefile.am b/openbsd-compat/Makefile.am
index 07e4f0dd..d2308e45 100644
--- a/openbsd-compat/Makefile.am
+++ b/openbsd-compat/Makefile.am
@@ -1,7 +1,29 @@
noinst_LIBRARIES = libopenbsd.a
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/smtpd -I$(top_srcdir)/openbsd-compat
+
libopenbsd_a_SOURCES = empty.c
+if NEED_LIBASR
+AM_CPPFLAGS += -I$(top_srcdir)/openbsd-compat/libasr
+
+libopenbsd_a_SOURCES += libasr/asr.c
+libopenbsd_a_SOURCES += libasr/asr_debug.c
+libopenbsd_a_SOURCES += libasr/asr_compat.c
+libopenbsd_a_SOURCES += libasr/asr_utils.c
+libopenbsd_a_SOURCES += libasr/event_asr_run.c
+libopenbsd_a_SOURCES += libasr/getaddrinfo_async.c
+libopenbsd_a_SOURCES += libasr/gethostnamadr_async.c
+libopenbsd_a_SOURCES += libasr/getnameinfo_async.c
+libopenbsd_a_SOURCES += libasr/getnetnamadr_async.c
+libopenbsd_a_SOURCES += libasr/res_search_async.c
+libopenbsd_a_SOURCES += libasr/res_send_async.c
+
+include_HEADERS = libasr/asr.h
+endif
+
+
+
if NEED_PROGNAME
libopenbsd_a_SOURCES += progname.c
endif
@@ -191,7 +213,11 @@ EXTRA_DIST += sys/queue.h
EXTRA_DIST += sys/tree.h
EXTRA_DIST += bsd-vis.h
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/smtpd -I$(top_srcdir)/openbsd-compat
+if NEED_LIBASR
+EXTRA_DIST += libasr/asr_compat.h
+EXTRA_DIST += libasr/asr_private.h
+endif
+
if !NEED_ERR_H
AM_CPPFLAGS += -I$(top_srcdir)/openbsd-compat/err_h
diff --git a/openbsd-compat/libasr/Makefile.am b/openbsd-compat/libasr/Makefile.am
deleted file mode 100644
index 32677e63..00000000
--- a/openbsd-compat/libasr/Makefile.am
+++ /dev/null
@@ -1,21 +0,0 @@
-noinst_LIBRARIES = libasr.a
-
-libasr_a_SOURCES = asr.c
-libasr_a_SOURCES += asr_debug.c
-libasr_a_SOURCES += asr_compat.c
-libasr_a_SOURCES += asr_utils.c
-libasr_a_SOURCES += event_asr_run.c
-libasr_a_SOURCES += getaddrinfo_async.c
-libasr_a_SOURCES += gethostnamadr_async.c
-libasr_a_SOURCES += getnameinfo_async.c
-libasr_a_SOURCES += getnetnamadr_async.c
-libasr_a_SOURCES += res_search_async.c
-libasr_a_SOURCES += res_send_async.c
-
-include_HEADERS = asr.h
-
-libasr_a_CPPFLAGS = -I$(builddir)/..
-libasr_a_LIBADD = $(builddir)/../libopenbsd.a
-
-EXTRA_DIST = asr_compat.h
-EXTRA_DIST += asr_private.h