]> diplodocus.org Git - nmh/commitdiff
For the autoconf/automake stuff to replace getline, the following
authorOliver Kiddle <okiddle@yahoo.co.uk>
Tue, 11 Oct 2016 14:20:52 +0000 (10:20 -0400)
committerDavid Levine <levinedl@acm.org>
Tue, 11 Oct 2016 14:20:52 +0000 (10:20 -0400)
patch seems to work.

The final change on configure.ac is to cope with cc -V output having
slightly changed in the most recent version of the compiler.

Makefile.am
configure.ac

index 91b53ef..2cd95a0 100644 (file)
@@ -504,7 +504,7 @@ test_fakesmtp_SOURCES = test/fakesmtp.c test/server.c
 test_fakesmtp_LDADD = $(POSTLINK)
 
 test_fakehttp_SOURCES = test/fakehttp.c test/server.c
-test_fakehttp_LDADD = $(POSTLINK)
+test_fakehttp_LDADD = $(LDADD) $(POSTLINK)
 
 test_getcwidth_SOURCES = test/getcwidth.c
 test_getcwidth_LDADD = $(POSTLINK)
@@ -632,6 +632,8 @@ sbr_libmh_a_SOURCES = sbr/addrsbr.c sbr/ambigsw.c sbr/atooi.c sbr/arglist.c \
                      config/config.c config/version.c \
                      thirdparty/jsmn/jsmn.c
 
+sbr_libmh_a_LIBADD = $(LIBOBJS)
+
 ##
 ## Because these files use the definitions in the libmh rule below,
 ## they need to be rebuilt if the Makefile changes.
index b87dd64..4ed79bb 100644 (file)
@@ -111,6 +111,10 @@ dnl CHECK FUNCTIONS
 dnl ---------------
 AC_CHECK_FUNCS([wcwidth mbtowc getutxent arc4random mkstemps])
 
+dnl Use custom getline for platforms that don't have it.
+AC_CONFIG_LIBOBJ_DIR([sbr])
+AC_REPLACE_FUNCS([getline])
+
 dnl -----------------------
 dnl CHECK MULTIBYTE SUPPORT
 dnl -----------------------
@@ -135,7 +139,7 @@ if test "$GCC" != yes; then
   dnl better to use an autoconf test, except -v will probably succeed
   dnl with many other compilers but have different meaning.
   AS_CASE([`${CC} -V 2>&1`],
-          [cc:\ Sun\ C*], [CFLAGS=\
+          [cc:*\ Sun\ C*], [CFLAGS=\
 "${CFLAGS:+$CFLAGS }-v -errtags=yes -erroff=E_STATEMENT_NOT_REACHED"])
 fi