This is especially important because the library is so small, that even the single recursion within src/ can have a (relative) overhead on the whole build.
Signed-off-by: Diego Elio Pettenò flameeyes@flameeyes.eu --- Makefile.am | 16 +++++++++++++++- configure.ac | 4 ---- include/Makefile.am | 1 - include/osmocom/Makefile.am | 1 - include/osmocom/dsp/Makefile.am | 3 --- src/Makefile.am | 11 ----------- 6 files changed, 15 insertions(+), 21 deletions(-) delete mode 100644 include/Makefile.am delete mode 100644 include/osmocom/Makefile.am delete mode 100644 include/osmocom/dsp/Makefile.am delete mode 100644 src/Makefile.am
diff --git a/Makefile.am b/Makefile.am index ec16da9..de7600d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,7 +2,6 @@ AUTOMAKE_OPTIONS = foreign dist-bzip2 1.6 ACLOCAL_AMFLAGS = -I m4
INCLUDES = $(all_includes) -I$(top_srcdir)/include -SUBDIRS = include src
pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libosmodsp.pc @@ -15,6 +14,21 @@ dist-hook:
EXTRA_DIST = git-version-gen
+pkgincludedir = $(includedir)/osmocom/dsp +pkginclude_HEADERS = include/osmocom/dsp/cxvec.h \ + include/osmocom/dsp/cfile.h \ + include/osmocom/dsp/cxvec_math.h + +# This is _NOT_ the library release version, it's an API version. +# Please read Chapter 6 "Library interface versions" of the libtool documentation before making any modification +LIBVERSION=0:0:0 +AM_CFLAGS = -fPIC -Wall -ffast-math + +lib_LTLIBRARIES = libosmodsp.la + +libosmodsp_la_SOURCES = src/cfile.c src/cxvec.c src/cxvec_math.c +libosmodsp_la_LDFLAGS = -version-info $(LIBVERSION) + if HAVE_DOXYGEN
pkgdocdir=$(docdir)/$(PACKAGE)-$(VERSION) diff --git a/configure.ac b/configure.ac index 2e60a72..6ed54c6 100644 --- a/configure.ac +++ b/configure.ac @@ -39,10 +39,6 @@ AM_CONFIG_HEADER(config.h)
AC_OUTPUT( libosmodsp.pc - include/Makefile - include/osmocom/Makefile - include/osmocom/dsp/Makefile - src/Makefile Makefile Doxyfile ) diff --git a/include/Makefile.am b/include/Makefile.am deleted file mode 100644 index b255997..0000000 --- a/include/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS=osmocom diff --git a/include/osmocom/Makefile.am b/include/osmocom/Makefile.am deleted file mode 100644 index 8369d99..0000000 --- a/include/osmocom/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS=dsp diff --git a/include/osmocom/dsp/Makefile.am b/include/osmocom/dsp/Makefile.am deleted file mode 100644 index 5a6534f..0000000 --- a/include/osmocom/dsp/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -osmodsp_HEADERS = cfile.h cxvec.h cxvec_math.h - -osmodspdir = $(includedir)/osmocom/dsp diff --git a/src/Makefile.am b/src/Makefile.am deleted file mode 100644 index 39a7429..0000000 --- a/src/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ -# This is _NOT_ the library release version, it's an API version. -# Please read Chapter 6 "Library interface versions" of the libtool documentation before making any modification -LIBVERSION=0:0:0 - -INCLUDES = $(all_includes) -I$(top_srcdir)/include -AM_CFLAGS = -fPIC -Wall -ffast-math - -lib_LTLIBRARIES = libosmodsp.la - -libosmodsp_la_SOURCES = cfile.c cxvec.c cxvec_math.c -libosmodsp_la_LDFLAGS = -version-info $(LIBVERSION)
Instead of using a custom pkgdocdir value use the default, and overridable, htmldir. Also make sure that the directory is properly removed at uninstall, to unbreak `make distcheck`.
Signed-off-by: Diego Elio Pettenò flameeyes@flameeyes.eu --- Makefile.am | 11 ++++------- 1 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/Makefile.am b/Makefile.am index de7600d..6b99f58 100644 --- a/Makefile.am +++ b/Makefile.am @@ -31,12 +31,9 @@ libosmodsp_la_LDFLAGS = -version-info $(LIBVERSION)
if HAVE_DOXYGEN
-pkgdocdir=$(docdir)/$(PACKAGE)-$(VERSION) -doc_htmldir=$(pkgdocdir)/html +html_DATA = $(top_builddir)/doc/html.tar
-doc_html_DATA = $(top_builddir)/doc/html.tar - -$(doc_html_DATA): $(top_builddir)/doc/html/index.html +$(html_DATA): $(top_builddir)/doc/html/index.html cd $(top_builddir)/doc && tar cf html.tar html
$(top_builddir)/doc/html/index.html: $(SOURCES) Doxyfile @@ -45,10 +42,10 @@ $(top_builddir)/doc/html/index.html: $(SOURCES) Doxyfile $(DOXYGEN) Doxyfile
install-data-hook: - cd $(DESTDIR)$(doc_htmldir) && tar xf html.tar --strip-components 1 && rm -f html.tar + cd $(DESTDIR)$(htmldir) && tar xf html.tar --strip-components 1 && rm -f html.tar
uninstall-hook: - cd $(DESTDIR) && rm -rf $(doc_htmldir) + rm -rf $(DESTDIR)$(htmldir)
DX_CLEAN = doc/{html,latex}/* doc/html.tar
Also disable building of gzip-compressed tarballs.
Signed-off-by: Diego Elio Pettenò flameeyes@flameeyes.eu --- Makefile.am | 1 - configure.ac | 2 +- 2 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/Makefile.am b/Makefile.am index 6b99f58..27813e9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,3 @@ -AUTOMAKE_OPTIONS = foreign dist-bzip2 1.6 ACLOCAL_AMFLAGS = -I m4
INCLUDES = $(all_includes) -I$(top_srcdir)/include diff --git a/configure.ac b/configure.ac index 6ed54c6..2d54fd1 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_INIT([libosmodsp], m4_esyscmd([./git-version-gen .tarball-version]), [gmr@lists.osmocom.org])
-AM_INIT_AUTOMAKE([dist-bzip2]) +AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip 1.6])
dnl kernel style compile messages m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
Signed-off-by: Diego Elio Pettenò flameeyes@flameeyes.eu --- Makefile.am | 2 +- configure.ac | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/Makefile.am b/Makefile.am index 27813e9..3cd7cfc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -21,7 +21,7 @@ pkginclude_HEADERS = include/osmocom/dsp/cxvec.h \ # This is _NOT_ the library release version, it's an API version. # Please read Chapter 6 "Library interface versions" of the libtool documentation before making any modification LIBVERSION=0:0:0 -AM_CFLAGS = -fPIC -Wall -ffast-math +AM_CFLAGS = -Wall -ffast-math
lib_LTLIBRARIES = libosmodsp.la
diff --git a/configure.ac b/configure.ac index 2d54fd1..052d2c9 100644 --- a/configure.ac +++ b/configure.ac @@ -11,8 +11,7 @@ dnl checks for programs AC_PROG_MAKE_SET AC_PROG_CC AC_PROG_INSTALL -LT_INIT -AC_PROG_LIBTOOL +LT_INIT([pic-only])
AC_PATH_PROG(DOXYGEN,doxygen,false) AM_CONDITIONAL(HAVE_DOXYGEN, test $DOXYGEN != false)
These tests are probably coming from autoscan and are not used in the sources, so there is no reason to have them executed.
Signed-off-by: Diego Elio Pettenò flameeyes@flameeyes.eu --- configure.ac | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac index 052d2c9..c2108d5 100644 --- a/configure.ac +++ b/configure.ac @@ -18,10 +18,6 @@ AM_CONDITIONAL(HAVE_DOXYGEN, test $DOXYGEN != false)
AC_CONFIG_MACRO_DIR([m4])
-dnl checks for header files -AC_HEADER_STDC -AC_CHECK_HEADERS(complex.h math.h fcntl.h unistd.h sys/mman.h sys/types.h sys/stat.h) - # The following test is taken from WebKit's webkit.m4 saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fvisibility=hidden "
On Wed, Jul 4, 2012 at 1:15 PM, Diego Elio Pettenò flameeyes@flameeyes.eu wrote:
These tests are probably coming from autoscan and are not used in the sources, so there is no reason to have them executed.
Ideally I'd like configure to _fail_ completely if not found. Is there a way to do that ?
Because I use those headers and rely on them to be present.
Cheers,
Sylvain
Il 04/07/2012 13:52, Sylvain Munaut ha scritto:
Ideally I'd like configure to _fail_ completely if not found. Is there a way to do that ?
There is, but I don't think that's a very good idea. Basically what happens is that if the headers are not present, both before and after this patch, the build will fail — and it's much easier if you're porting to an OS/combination to fix the issue if you get a build failure than a configure failure (especially because often times the configure checks end up bitrotting).
If you add a failure condition on the configure script, what you get is a longer ./configure time on all systems (compared to after my patch) and the same kind of build failure, just telling you that a header file is missing.
My suggestion is to avoid all kind of checks that would be fatal unless they can be overridden (like the pkg-config checks), or there is a fallback available. Also if there is a fallback available I suggest using a fallback-style check, like the one I describe at http://goo.gl/OAxBt .