Skip to content

Commit

Permalink
Update configure.ac
Browse files Browse the repository at this point in the history
  • Loading branch information
cybergarage committed Jan 2, 2025
1 parent 59fbe34 commit 89e1679
Show file tree
Hide file tree
Showing 11 changed files with 137 additions and 41 deletions.
45 changes: 33 additions & 12 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,29 @@ if MUPNP_ENABLE_TEST
SUBDIRS += test
endif

devdocsdir = $(datadir)/doc/clinkc-dev
docsdir = $(datadir)/doc/clinkc0
##############################
# Code coverage
##############################

# include $(top_srcdir)/aminclude_static.am

CFLAGS="$CFLAGS $(CODE_COVERAGE_CFLAGS)"
CPPFLAGS="$CPPFLAGS $(CODE_COVERAGE_CPPFLAGS)"
CXXFLAGS="$CXXFLAGS $(CODE_COVERAGE_CXXFLAGS)"

# clean-local: code-coverage-clean
# distclean-local: code-coverage-dist-clean

##############################
# Dist
##############################

devdocsdir = $(datadir)/doc/mupnp-dev
docsdir = $(datadir)/doc/mupnp0

EXTRA_DIST = debian/changelog \
debian/clinkc0.install \
debian/clinkc-dev.install \
debian/mupnp0.install \
debian/mupnp-dev.install \
debian/compat \
debian/control \
debian/copyright \
Expand All @@ -34,6 +51,17 @@ dist_devdocs_DATA = \
# doxygen/html/* \
# doxygen-objc/html/*

deb: dist
-mkdir $(top_builddir)/debian-build
-cp $(top_builddir)/../$(PACKAGE)*.orig.tar.gz $(top_builddir)/debian-build/
cd $(top_builddir)/debian-build && tar zxf ../$(top_builddir)/$(PACKAGE)-$(VERSION).tar.gz
cd $(top_builddir)/debian-build/$(PACKAGE)-$(VERSION) && dpkg-buildpackage -rfakeroot -sa -D
-rm -rf $(top_builddir)/debian-build/$(PACKAGE)-$(VERSION)

##############################
# Doxygen
##############################

doxygen: doxygen/html/* doxygen/html/*

doxygen/html/*:
Expand All @@ -42,11 +70,4 @@ doxygen/html/*:

doxygen-objc/html/*:
cd $(srcdir) && doxygen Doxyfile.objc
# scp -r doxygen-objc skonno,[email protected]:/home/groups/c/cl/clinkobjc/htdocs

deb: dist
-mkdir $(top_builddir)/debian-build
-cp $(top_builddir)/../$(PACKAGE)*.orig.tar.gz $(top_builddir)/debian-build/
cd $(top_builddir)/debian-build && tar zxf ../$(top_builddir)/$(PACKAGE)-$(VERSION).tar.gz
cd $(top_builddir)/debian-build/$(PACKAGE)-$(VERSION) && dpkg-buildpackage -rfakeroot -sa -D
-rm -rf $(top_builddir)/debian-build/$(PACKAGE)-$(VERSION)
# scp -r doxygen-objc skonno,[email protected]:/home/groups/c/cl/clinkobjc/htdocs
45 changes: 31 additions & 14 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -244,14 +244,20 @@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@

##############################
# Code coverage
##############################

# include $(top_srcdir)/aminclude_static.am
CFLAGS = "$CFLAGS $(CODE_COVERAGE_CFLAGS)"
CLOG_DEBUG_FLAGS = @CLOG_DEBUG_FLAGS@
CPPFLAGS = @CPPFLAGS@
CPPFLAGS = "$CPPFLAGS $(CODE_COVERAGE_CPPFLAGS)"
CSCOPE = @CSCOPE@
CTAGS = @CTAGS@
CXX = @CXX@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXXFLAGS = "$CXXFLAGS $(CODE_COVERAGE_CXXFLAGS)"
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
Expand Down Expand Up @@ -336,11 +342,18 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = include lib $(am__append_1) $(am__append_2)
devdocsdir = $(datadir)/doc/clinkc-dev
docsdir = $(datadir)/doc/clinkc0

# clean-local: code-coverage-clean
# distclean-local: code-coverage-dist-clean

##############################
# Dist
##############################
devdocsdir = $(datadir)/doc/mupnp-dev
docsdir = $(datadir)/doc/mupnp0
EXTRA_DIST = debian/changelog \
debian/clinkc0.install \
debian/clinkc-dev.install \
debian/mupnp0.install \
debian/mupnp-dev.install \
debian/compat \
debian/control \
debian/copyright \
Expand Down Expand Up @@ -914,6 +927,17 @@ uninstall-am: uninstall-dist_devdocsDATA uninstall-dist_docsDATA \
# doxygen/html/* \
# doxygen-objc/html/*

deb: dist
-mkdir $(top_builddir)/debian-build
-cp $(top_builddir)/../$(PACKAGE)*.orig.tar.gz $(top_builddir)/debian-build/
cd $(top_builddir)/debian-build && tar zxf ../$(top_builddir)/$(PACKAGE)-$(VERSION).tar.gz
cd $(top_builddir)/debian-build/$(PACKAGE)-$(VERSION) && dpkg-buildpackage -rfakeroot -sa -D
-rm -rf $(top_builddir)/debian-build/$(PACKAGE)-$(VERSION)

##############################
# Doxygen
##############################

doxygen: doxygen/html/* doxygen/html/*

doxygen/html/*:
Expand All @@ -924,13 +948,6 @@ doxygen-objc/html/*:
cd $(srcdir) && doxygen Doxyfile.objc
# scp -r doxygen-objc skonno,[email protected]:/home/groups/c/cl/clinkobjc/htdocs

deb: dist
-mkdir $(top_builddir)/debian-build
-cp $(top_builddir)/../$(PACKAGE)*.orig.tar.gz $(top_builddir)/debian-build/
cd $(top_builddir)/debian-build && tar zxf ../$(top_builddir)/$(PACKAGE)-$(VERSION).tar.gz
cd $(top_builddir)/debian-build/$(PACKAGE)-$(VERSION) && dpkg-buildpackage -rfakeroot -sa -D
-rm -rf $(top_builddir)/debian-build/$(PACKAGE)-$(VERSION)

# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
3 changes: 3 additions & 0 deletions config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
(-lboost_unit_test_framework-mt). */
#undef HAVE_LIBBOOST_UNIT_TEST_FRAMEWORK_MT

/* Define to 1 if you have the `gcov' library (-lgcov). */
#undef HAVE_LIBGCOV

/* Define to 1 if you have the `iconv' library (-liconv). */
#undef HAVE_LIBICONV

Expand Down
48 changes: 48 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -5352,6 +5352,12 @@ then :
fi


##############################
# Code coverage
##############################

AX_CODE_COVERAGE

##############################
# Checks for Long Long
##############################
Expand Down Expand Up @@ -7007,6 +7013,48 @@ else $as_nop
as_fn_error $? "mUPnP needs boost::boost_unit_test_framework" "$LINENO" 5
fi

fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lgcov" >&5
printf %s "checking for main in -lgcov... " >&6; }
if test ${ac_cv_lib_gcov_main+y}
then :
printf %s "(cached) " >&6
else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-lgcov $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
namespace conftest {
extern "C" int main ();
}
int
main (void)
{
return conftest::main ();
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
ac_cv_lib_gcov_main=yes
else $as_nop
ac_cv_lib_gcov_main=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gcov_main" >&5
printf "%s\n" "$ac_cv_lib_gcov_main" >&6; }
if test "x$ac_cv_lib_gcov_main" = xyes
then :
printf "%s\n" "#define HAVE_LIBGCOV 1" >>confdefs.h

LIBS="-lgcov $LIBS"

fi

fi
Expand Down
7 changes: 7 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ AM_PROG_CC_C_O

AC_CHECK_HEADERS([stdbool.h])

##############################
# Code coverage
##############################

AX_CODE_COVERAGE

##############################
# Checks for Long Long
##############################
Expand Down Expand Up @@ -549,6 +555,7 @@ AM_CONDITIONAL(MUPNP_ENABLE_TEST,test "$build_test" = yes)
if [ test "$build_test" = yes ]; then
AC_CHECK_LIB([boost_unit_test_framework-mt],[main],,
[AC_CHECK_LIB([boost_unit_test_framework],[main],,[AC_MSG_ERROR(mUPnP needs boost::boost_unit_test_framework)])])
AC_CHECK_LIB([gcov],[main])
fi

##############################
Expand Down
4 changes: 2 additions & 2 deletions lib/unix/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ nobase_libmupnpinclude_HEADERS = \
#if HAVE_LIBTOOL
#libmupnp_la_SOURCES = \
# $(mupnp_source)
#libmupnp_la_LIBADD = @HTTP_LIBS@ @XML_LIBS@
#libmupnp_la_LIBADD = @HTTP_LIBS@ @XML_LIBS@ $(CODE_COVERAGE_LIBS)
#else
libmupnp_a_SOURCES = \
$(mupnp_sources)
libmupnp_a_CFLAGS = $(AM_CFLAGS)
#libmupnp_a_LIBADD = @HTTP_LIBS@ @XML_LIBS@
#libmupnp_a_LIBADD = @HTTP_LIBS@ @XML_LIBS@ $(CODE_COVERAGE_LIBS)
#endif
4 changes: 2 additions & 2 deletions lib/unix/Makefile.am.build
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ nobase_libmupnpinclude_HEADERS = \\
#if HAVE_LIBTOOL
#libmupnp_la_SOURCES = \\
# \$(mupnp_source)
#libmupnp_la_LIBADD = \@HTTP_LIBS\@ \@XML_LIBS\@
#libmupnp_la_LIBADD = \@HTTP_LIBS\@ \@XML_LIBS\@ \$(CODE_COVERAGE_LIBS)
#else
libmupnp_a_SOURCES = \\
\$(mupnp_sources)
libmupnp_a_CFLAGS = \$(AM_CFLAGS)
#libmupnp_a_LIBADD = \@HTTP_LIBS\@ \@XML_LIBS\@
#libmupnp_a_LIBADD = \@HTTP_LIBS\@ \@XML_LIBS\@ \$(CODE_COVERAGE_LIBS)
#endif
FOTTER
4 changes: 2 additions & 2 deletions lib/unix/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ nobase_libmupnpinclude_HEADERS = \
#if HAVE_LIBTOOL
#libmupnp_la_SOURCES = \
# $(mupnp_source)
#libmupnp_la_LIBADD = @HTTP_LIBS@ @XML_LIBS@
#libmupnp_la_LIBADD = @HTTP_LIBS@ @XML_LIBS@ $(CODE_COVERAGE_LIBS)
#else
libmupnp_a_SOURCES = \
$(mupnp_sources)
Expand Down Expand Up @@ -2937,7 +2937,7 @@ uninstall-am: uninstall-libLIBRARIES \

.PRECIOUS: Makefile

#libmupnp_a_LIBADD = @HTTP_LIBS@ @XML_LIBS@
#libmupnp_a_LIBADD = @HTTP_LIBS@ @XML_LIBS@ $(CODE_COVERAGE_LIBS)
#endif

# Tell versions [3.59,3.63) of GNU make to not export all variables.
Expand Down
6 changes: 3 additions & 3 deletions test/unix/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
TESTS = mupnptest
check_PROGRAMS = mupnptest

AM_CPPFLAGS = -I$(top_srcdir)/include -I../
AM_CPPFLAGS = -I$(top_srcdir)/include -I../ $(CODE_COVERAGE_CPPFLAGS)

noinst_HEADERS = \
../ClinkUnitTest.h \
Expand All @@ -31,7 +31,7 @@ mupnptest_SOURCES = \
../DictionaryTest.cpp \
../ServiceTest.cpp
#if HAVE_LIBTOOL
#mupnptest_LDADD = ../../lib/unix/libmupnp.la @XML_LIBS@
#mupnptest_LDADD = ../../lib/unix/libmupnp.la @XML_LIBS@ $(CODE_COVERAGE_LIBS)
#else
mupnptest_LDADD = ../../lib/unix/libmupnp.a @XML_LIBS@
mupnptest_LDADD = ../../lib/unix/libmupnp.a @XML_LIBS@ $(CODE_COVERAGE_LIBS)
#endif
6 changes: 3 additions & 3 deletions test/unix/Makefile.am.build
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ print<<HEADER;
TESTS = mupnptest
check_PROGRAMS = mupnptest
AM_CPPFLAGS = -I\$(top_srcdir)/include -I../
AM_CPPFLAGS = -I\$(top_srcdir)/include -I../ \$(CODE_COVERAGE_CPPFLAGS)
HEADER

Expand Down Expand Up @@ -44,9 +44,9 @@ print join(" \\\n", @source_files) . "\n";

print<<FOTTER;
#if HAVE_LIBTOOL
#mupnptest_LDADD = ../../lib/unix/libmupnp.la \@XML_LIBS\@
#mupnptest_LDADD = ../../lib/unix/libmupnp.la \@XML_LIBS\@ \$(CODE_COVERAGE_LIBS)
#else
mupnptest_LDADD = ../../lib/unix/libmupnp.a \@XML_LIBS\@
mupnptest_LDADD = ../../lib/unix/libmupnp.a \@XML_LIBS\@ \$(CODE_COVERAGE_LIBS)
#endif
FOTTER

6 changes: 3 additions & 3 deletions test/unix/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = -I$(top_srcdir)/include -I../
AM_CPPFLAGS = -I$(top_srcdir)/include -I../ $(CODE_COVERAGE_CPPFLAGS)
noinst_HEADERS = \
../ClinkUnitTest.h \
../TestDevice.h
Expand All @@ -521,9 +521,9 @@ mupnptest_SOURCES = \
../ServiceTest.cpp

#if HAVE_LIBTOOL
#mupnptest_LDADD = ../../lib/unix/libmupnp.la @XML_LIBS@
#mupnptest_LDADD = ../../lib/unix/libmupnp.la @XML_LIBS@ $(CODE_COVERAGE_LIBS)
#else
mupnptest_LDADD = ../../lib/unix/libmupnp.a @XML_LIBS@
mupnptest_LDADD = ../../lib/unix/libmupnp.a @XML_LIBS@ $(CODE_COVERAGE_LIBS)
all: all-am

.SUFFIXES:
Expand Down

0 comments on commit 89e1679

Please sign in to comment.