diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2014-06-23 09:20:03 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2014-06-23 09:28:15 +0200 |
commit | a9ebfeae114b9f211f9b97094e6fa4aab7ba9e1e (patch) | |
tree | 59cf6d3c82a47728fb62fa46a99a156f730e2ab4 | |
parent | 988914384acdf30eab22226d79de3541e7e6f02d (diff) |
build: Modernize autotools build system
-rw-r--r-- | Makefile.am | 8 | ||||
-rwxr-xr-x | autogen.sh | 6 | ||||
-rw-r--r-- | configure.ac | 52 | ||||
-rw-r--r-- | doc/Makefile.am | 4 | ||||
-rw-r--r-- | examples/Makefile.am | 19 | ||||
-rw-r--r-- | gtk-doc.make | 253 | ||||
-rw-r--r-- | m4/as-libtool.m4 | 39 | ||||
-rw-r--r-- | m4/gtk-doc.m4 | 47 | ||||
-rw-r--r-- | m4/pkg.m4 | 149 | ||||
-rw-r--r-- | orc-test/Makefile.am | 4 | ||||
-rw-r--r-- | orc/Makefile.am | 4 | ||||
-rw-r--r-- | testsuite/orcc/Makefile.am | 10 |
12 files changed, 392 insertions, 203 deletions
diff --git a/Makefile.am b/Makefile.am index 897cce1..a95449d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,11 +9,15 @@ DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc pkgconfig_DATA = orc-$(ORC_MAJORMINOR).pc +cp_v_gen = $(cp_v_gen_$(V)) +cp_v_gen_ = $(cp_v_gen_$(AM_DEFAULT_VERBOSITY)) +cp_v_gen_0 = @echo " CP $@"; + orc-$(ORC_MAJORMINOR).pc: orc.pc - cp orc.pc orc-$(ORC_MAJORMINOR).pc + $(cp_v_gen)cp orc.pc orc-$(ORC_MAJORMINOR).pc orc-$(ORC_MAJORMINOR)-uninstalled.pc: orc-uninstalled.pc - cp orc-uninstalled.pc orc-$(ORC_MAJORMINOR)-uninstalled.pc + $(cp_v_gen)cp orc-uninstalled.pc orc-$(ORC_MAJORMINOR)-uninstalled.pc BUILT_SOURCES=orc-$(ORC_MAJORMINOR)-uninstalled.pc @@ -2,10 +2,6 @@ set -e -if [ `whoami` = ds ] ; then - confargs="$confargs --enable-gtk-doc" -fi - test -n "$srcdir" || srcdir=`dirname "$0"` test -n "$srcdir" || srcdir=. @@ -16,5 +12,5 @@ autoreconf -i -f cd "$olddir" -$srcdir/configure --disable-static $confargs $@ +$srcdir/configure --disable-static --enable-maintainer-mode --enable-gtk-doc $@ diff --git a/configure.ac b/configure.ac index 347a925..d13828d 100644 --- a/configure.ac +++ b/configure.ac @@ -1,11 +1,16 @@ -AC_PREREQ([2.58]) -AC_INIT(orc,0.4.19.1) +AC_PREREQ([2.68]) +AC_INIT([orc], [0.4.19.1], [http://bugzilla.gnome.org/enter_bug.cgi?product=orc],[orc]) dnl don't forget to update libversion AS_NANO(ORC_GIT=no,ORC_GIT=yes) -AC_CANONICAL_HOST([]) -AM_INIT_AUTOMAKE(1.6) +AC_CANONICAL_HOST() +AM_INIT_AUTOMAKE([-Wno-portability 1.11 no-dist-gzip dist-xz tar-ustar subdir-objects]) + +dnl use pretty build output with automake >= 1.11 +m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])], + [AM_DEFAULT_VERBOSITY=1 + AC_SUBST(AM_DEFAULT_VERBOSITY)]) ORC_MAJORMINOR=0.4 AC_SUBST(ORC_MAJORMINOR) @@ -19,15 +24,20 @@ dnl - interfaces added -> increment AGE dnl - interfaces removed -> AGE = 0 ORC_LIBVERSION="19:0:19" AC_SUBST(ORC_LIBVERSION) -AC_LIBTOOL_WIN32_DLL -AC_LIBTOOL_TAGS([]) -AC_PROG_LIBTOOL +LT_PREREQ([2.2.6]) +LT_INIT([dlopen win32-dll disable-static]) + +AC_PROG_CC +AC_PROG_CC_STDC AM_PROG_CC_C_O AM_PROG_AS + AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR([orc/orc.h]) +AM_MAINTAINER_MODE([enable]) + ACLOCAL_AMFLAGS="-I m4 $ACLOCAL_AMFLAGS" AC_SUBST(ACLOCAL_AMFLAGS) @@ -41,8 +51,7 @@ AC_CHECK_FUNCS([posix_memalign]) if test "x$cross_compiling" = "xyes" ; then enable_gtk_doc=no fi -GTK_DOC_CHECK([1.0]) - +GTK_DOC_CHECK([1.12]) AS_HOST_DEFINES() @@ -50,6 +59,7 @@ AC_C_BIGENDIAN AC_FUNC_MMAP() +AC_HEADER_STDC AC_CHECK_HEADERS([inttypes.h]) AC_CHECK_HEADERS([sys/time.h]) AC_CHECK_HEADERS([unistd.h]) @@ -181,6 +191,19 @@ AM_CONDITIONAL(ENABLE_BACKEND_ARM, test "x$ENABLE_BACKEND_ARM" = "xyes") AM_CONDITIONAL(ENABLE_BACKEND_C64X, test "x$ENABLE_BACKEND_C64X" = "xyes") AM_CONDITIONAL(ENABLE_BACKEND_MIPS, test "x$ENABLE_BACKEND_MIPS" = "xyes") +dnl Check for -Bsymbolic-functions linker flag used to avoid +dnl intra-library PLT jumps, if available. +AC_ARG_ENABLE(Bsymbolic, + [AS_HELP_STRING([--disable-Bsymbolic],[avoid linking with -Bsymbolic])],, + [SAVED_LDFLAGS="${LDFLAGS}" + AC_MSG_CHECKING([for -Bsymbolic-functions linker flag]) + LDFLAGS=-Wl,-Bsymbolic-functions + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[int main (void) { return 0; }]])],[ + AC_MSG_RESULT(yes) + enable_Bsymbolic=yes],[ + AC_MSG_RESULT(no) + enable_Bsymbolic=no]) + LDFLAGS="${SAVED_LDFLAGS}"]) AC_DEFINE(ORC_EXPORTS, 1, [Defined for compiling internal code]) @@ -193,12 +216,17 @@ AC_SUBST(ORC_LIBS) #CFLAGS=`echo $CFLAGS | sed s/O2/O0/` +ORC_LDFLAGS="-no-undefined -export-symbols-regex \^orc_" +if test "x${enable_Bsymbolic}" = "xyes"; then + ORC_LDFLAGS="$ORC_LDFLAGS -Wl,-Bsymbolic-functions" +fi +AC_SUBST(ORC_LDFLAGS) + pkgconfigdir="\$(libdir)/pkgconfig" AC_SUBST(pkgconfigdir) - AC_CONFIG_FILES([ -Makefile +Makefile doc/Makefile doc/version.entities orc/Makefile @@ -213,5 +241,3 @@ orc.pc ]) AC_OUTPUT - - diff --git a/doc/Makefile.am b/doc/Makefile.am index cb841e7..f4b9cb1 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -3,6 +3,8 @@ # We require automake 1.6 at least. AUTOMAKE_OPTIONS = 1.6 +BUILT_SOURCES = version.entities + # This is a blank Makefile.am for using gtk-doc. # Copy this to your project's API docs directory and modify the variables to # suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples @@ -87,7 +89,7 @@ include $(top_srcdir)/gtk-doc.make # Other files to distribute # e.g. EXTRA_DIST += version.xml.in -EXTRA_DIST += +EXTRA_DIST += version.entities.in # Files not to distribute # for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types diff --git a/examples/Makefile.am b/examples/Makefile.am index a279d77..def7aac 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -33,29 +33,32 @@ nodist_example3_SOURCES = example3orc.c example3orc.h mt19937ar_SOURCES = mt19937ar.c nodist_mt19937ar_SOURCES = mt19937arorc.c mt19937arorc.h +orcc_v_gen = $(orcc_v_gen_$(V)) +orcc_v_gen_ = $(orcc_v_gen_$(AM_DEFAULT_VERBOSITY)) +orcc_v_gen_0 = @echo " ORCC $@"; example1orc.c: $(srcdir)/example1orc.orc - $(top_builddir)/tools/orcc$(EXEEXT) --implementation -o example1orc.c $(srcdir)/example1orc.orc + $(orcc_v_gen)$(top_builddir)/tools/orcc$(EXEEXT) --implementation -o example1orc.c $(srcdir)/example1orc.orc example1orc.h: $(srcdir)/example1orc.orc - $(top_builddir)/tools/orcc$(EXEEXT) --header -o example1orc.h $(srcdir)/example1orc.orc + $(orcc_v_gen)$(top_builddir)/tools/orcc$(EXEEXT) --header -o example1orc.h $(srcdir)/example1orc.orc example2orc.c: $(srcdir)/example2orc.orc - $(top_builddir)/tools/orcc$(EXEEXT) --implementation -o example2orc.c $(srcdir)/example2orc.orc + $(orcc_v_gen)$(top_builddir)/tools/orcc$(EXEEXT) --implementation -o example2orc.c $(srcdir)/example2orc.orc example2orc.h: $(srcdir)/example2orc.orc - $(top_builddir)/tools/orcc$(EXEEXT) --header -o example2orc.h $(srcdir)/example2orc.orc + $(orcc_v_gen)$(top_builddir)/tools/orcc$(EXEEXT) --header -o example2orc.h $(srcdir)/example2orc.orc example3orc.c: $(srcdir)/example3orc.orc - $(top_builddir)/tools/orcc$(EXEEXT) --implementation -o example3orc.c $(srcdir)/example3orc.orc + $(orcc_v_gen)$(top_builddir)/tools/orcc$(EXEEXT) --implementation -o example3orc.c $(srcdir)/example3orc.orc example3orc.h: $(srcdir)/example3orc.orc - $(top_builddir)/tools/orcc$(EXEEXT) --header -o example3orc.h $(srcdir)/example3orc.orc + $(orcc_v_gen)$(top_builddir)/tools/orcc$(EXEEXT) --header -o example3orc.h $(srcdir)/example3orc.orc mt19937arorc.c: $(srcdir)/mt19937arorc.orc - $(top_builddir)/tools/orcc$(EXEEXT) --implementation -o mt19937arorc.c $(srcdir)/mt19937arorc.orc + $(orcc_v_gen)$(top_builddir)/tools/orcc$(EXEEXT) --implementation -o mt19937arorc.c $(srcdir)/mt19937arorc.orc mt19937arorc.h: $(srcdir)/mt19937arorc.orc - $(top_builddir)/tools/orcc$(EXEEXT) --header -o mt19937arorc.h $(srcdir)/mt19937arorc.orc + $(orcc_v_gen)$(top_builddir)/tools/orcc$(EXEEXT) --header -o mt19937arorc.h $(srcdir)/mt19937arorc.orc diff --git a/gtk-doc.make b/gtk-doc.make index ed8c7a6..6d73d0c 100644 --- a/gtk-doc.make +++ b/gtk-doc.make @@ -5,12 +5,12 @@ #################################### if GTK_DOC_USE_LIBTOOL -GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) +GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) GTKDOC_RUN = $(LIBTOOL) --mode=execute else -GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) +GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) GTKDOC_RUN = endif @@ -23,17 +23,19 @@ GPATH = $(srcdir) TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) -EXTRA_DIST = \ +SETUP_FILES = \ $(content_files) \ - $(HTML_IMAGES) \ $(DOC_MAIN_SGML_FILE) \ $(DOC_MODULE)-sections.txt \ $(DOC_MODULE)-overrides.txt -DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \ - pdf-build.stamp \ - $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp \ - $(srcdir)/pdf.stamp +EXTRA_DIST = \ + $(HTML_IMAGES) \ + $(SETUP_FILES) + +DOC_STAMPS=setup-build.stamp scan-build.stamp tmpl-build.stamp sgml-build.stamp \ + html-build.stamp pdf-build.stamp \ + tmpl.stamp sgml.stamp html.stamp pdf.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ @@ -47,9 +49,13 @@ REPORT_FILES = \ $(DOC_MODULE)-undeclared.txt \ $(DOC_MODULE)-unused.txt -CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) +gtkdoc-check.test: Makefile + $(AM_V_GEN)echo "#!/bin/sh -e" > $@; \ + echo "$(GTKDOC_CHECK_PATH) || exit 1" >> $@; \ + chmod +x $@ + +CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) gtkdoc-check.test -if ENABLE_GTK_DOC if GTK_DOC_BUILD_HTML HTML_BUILD_STAMP=html-build.stamp else @@ -61,42 +67,90 @@ else PDF_BUILD_STAMP= endif -all-local: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) -else -all-local: +all-gtk-doc: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) +.PHONY: all-gtk-doc + +if ENABLE_GTK_DOC +all-local: all-gtk-doc endif docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) $(REPORT_FILES): sgml-build.stamp +#### setup #### + +GTK_DOC_V_SETUP=$(GTK_DOC_V_SETUP_$(V)) +GTK_DOC_V_SETUP_=$(GTK_DOC_V_SETUP_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_SETUP_0=@echo " DOC Preparing build"; + +setup-build.stamp: + -$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ + files=`echo $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types`; \ + if test "x$$files" != "x" ; then \ + for file in $$files ; do \ + destdir=`dirname $(abs_builddir)/$$file` ;\ + test -d "$$destdir" || mkdir -p "$$destdir"; \ + test -f $(abs_srcdir)/$$file && \ + cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ + done; \ + fi; \ + test -d $(abs_srcdir)/tmpl && \ + { cp -pR $(abs_srcdir)/tmpl $(abs_builddir)/; \ + chmod -R u+w $(abs_builddir)/tmpl; } \ + fi + $(AM_V_at)touch setup-build.stamp + #### scan #### -scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) - @echo 'gtk-doc: Scanning header files' - @-chmod -R u+w $(srcdir) - @cd $(srcdir) && \ - gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES) - @if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \ - CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \ +GTK_DOC_V_SCAN=$(GTK_DOC_V_SCAN_$(V)) +GTK_DOC_V_SCAN_=$(GTK_DOC_V_SCAN_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_SCAN_0=@echo " DOC Scanning header files"; + +GTK_DOC_V_INTROSPECT=$(GTK_DOC_V_INTROSPECT_$(V)) +GTK_DOC_V_INTROSPECT_=$(GTK_DOC_V_INTROSPECT_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_INTROSPECT_0=@echo " DOC Introspecting gobjects"; + +scan-build.stamp: setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB) + $(GTK_DOC_V_SCAN)_source_dir='' ; \ + for i in $(DOC_SOURCE_DIR) ; do \ + _source_dir="$${_source_dir} --source-dir=$$i" ; \ + done ; \ + gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) + $(GTK_DOC_V_INTROSPECT)if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \ + scanobj_options=""; \ + gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ + if test "$(?)" = "0"; then \ + if test "x$(V)" = "x1"; then \ + scanobj_options="--verbose"; \ + fi; \ + fi; \ + CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ + gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \ else \ - cd $(srcdir) ; \ for i in $(SCANOBJ_FILES) ; do \ - test -f $$i || touch $$i ; \ + test -f $$i || touch $$i ; \ done \ fi - @touch scan-build.stamp + $(AM_V_at)touch scan-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp @true #### templates #### -tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt - @echo 'gtk-doc: Rebuilding template files' - @-chmod -R u+w $(srcdir) - @cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) - @touch tmpl-build.stamp +GTK_DOC_V_TMPL=$(GTK_DOC_V_TMPL_$(V)) +GTK_DOC_V_TMPL_=$(GTK_DOC_V_TMPL_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_TMPL_0=@echo " DOC Rebuilding template files"; + +tmpl-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt + $(GTK_DOC_V_TMPL)gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) + $(AM_V_at)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ + if test -w $(abs_srcdir) ; then \ + cp -pR $(abs_builddir)/tmpl $(abs_srcdir)/; \ + fi \ + fi + $(AM_V_at)touch tmpl-build.stamp tmpl.stamp: tmpl-build.stamp @true @@ -106,72 +160,109 @@ $(srcdir)/tmpl/*.sgml: #### xml #### +GTK_DOC_V_XML=$(GTK_DOC_V_XML_$(V)) +GTK_DOC_V_XML_=$(GTK_DOC_V_XML_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_XML_0=@echo " DOC Building XML"; + sgml-build.stamp: tmpl.stamp $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) - @echo 'gtk-doc: Building XML' - @-chmod -R u+w $(srcdir) - @cd $(srcdir) && \ - gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS) - @cp version.entities $(srcdir)/xml/ - @touch sgml-build.stamp + -$(GTK_DOC_V_XML)chmod -R u+w $(srcdir) && _source_dir='' ; \ + for i in $(DOC_SOURCE_DIR) ; do \ + _source_dir="$${_source_dir} --source-dir=$$i" ; \ + done ; \ + gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) + @cp version.entities $(abs_builddir)/xml/ + $(AM_V_at)touch sgml-build.stamp sgml.stamp: sgml-build.stamp @true #### html #### +GTK_DOC_V_HTML=$(GTK_DOC_V_HTML_$(V)) +GTK_DOC_V_HTML_=$(GTK_DOC_V_HTML_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_HTML_0=@echo " DOC Building HTML"; + +GTK_DOC_V_XREF=$(GTK_DOC_V_XREF_$(V)) +GTK_DOC_V_XREF_=$(GTK_DOC_V_XREF_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_XREF_0=@echo " DOC Fixing cross-references"; + html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) - @echo 'gtk-doc: Building HTML' - @-chmod -R u+w $(srcdir) - @rm -rf $(srcdir)/html - @mkdir $(srcdir)/html - @mkhtml_options=""; \ + $(GTK_DOC_V_HTML)rm -rf html && mkdir html && \ + mkhtml_options=""; \ + gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \ + if test "$(?)" = "0"; then \ + if test "x$(V)" = "x1"; then \ + mkhtml_options="$$mkhtml_options --verbose"; \ + fi; \ + fi; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ if test "$(?)" = "0"; then \ - mkhtml_options=--path="$(srcdir)"; \ + mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \ fi; \ - cd $(srcdir)/html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) - @test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html ) - @echo 'gtk-doc: Fixing cross-references' - @cd $(srcdir) && gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) - @touch html-build.stamp + cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) + -@test "x$(HTML_IMAGES)" = "x" || \ + for file in $(HTML_IMAGES) ; do \ + if test -f $(abs_srcdir)/$$file ; then \ + cp $(abs_srcdir)/$$file $(abs_builddir)/html; \ + fi; \ + if test -f $(abs_builddir)/$$file ; then \ + cp $(abs_builddir)/$$file $(abs_builddir)/html; \ + fi; \ + done; + $(GTK_DOC_V_XREF)gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) + $(AM_V_at)touch html-build.stamp #### pdf #### +GTK_DOC_V_PDF=$(GTK_DOC_V_PDF_$(V)) +GTK_DOC_V_PDF_=$(GTK_DOC_V_PDF_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_PDF_0=@echo " DOC Building PDF"; + pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) - @echo 'gtk-doc: Building PDF' - @-chmod -R u+w $(srcdir) - @rm -rf $(srcdir)/$(DOC_MODULE).pdf - @mkpdf_imgdirs=""; \ + $(GTK_DOC_V_PDF)rm -f $(DOC_MODULE).pdf && \ + mkpdf_options=""; \ + gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \ + if test "$(?)" = "0"; then \ + if test "x$(V)" = "x1"; then \ + mkpdf_options="$$mkpdf_options --verbose"; \ + fi; \ + fi; \ if test "x$(HTML_IMAGES)" != "x"; then \ for img in $(HTML_IMAGES); do \ part=`dirname $$img`; \ - echo $$mkpdf_imgdirs | grep >/dev/null "\-\-imgdir=$$part "; \ + echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \ if test $$? != 0; then \ - mkpdf_imgdirs="$$mkpdf_imgdirs --imgdir=$$part"; \ + mkpdf_options="$$mkpdf_options --imgdir=$$part"; \ fi; \ done; \ fi; \ - cd $(srcdir) && gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_imgdirs $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) - @touch pdf-build.stamp + gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) + $(AM_V_at)touch pdf-build.stamp ############## clean-local: - rm -f *~ *.bak - rm -rf .libs + @rm -f *~ *.bak + @rm -rf .libs + @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-types" ; then \ + rm -f $(DOC_MODULE).types; \ + fi distclean-local: - cd $(srcdir) && \ - rm -rf xml $(REPORT_FILES) $(DOC_MODULE).pdf \ - $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt + @rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \ + $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt + @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ + rm -f $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types; \ + rm -rf tmpl; \ + fi -maintainer-clean-local: clean - cd $(srcdir) && rm -rf xml html +maintainer-clean-local: + @rm -rf xml html install-data-local: - @installfiles=`echo $(srcdir)/html/*`; \ - if test "$$installfiles" = '$(srcdir)/html/*'; \ - then echo '-- Nothing to install' ; \ + @installfiles=`echo $(builddir)/html/*`; \ + if test "$$installfiles" = '$(builddir)/html/*'; \ + then echo 1>&2 'Nothing to install' ; \ else \ if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ @@ -180,14 +271,12 @@ install-data-local: fi; \ $(mkinstalldirs) $${installdir} ; \ for i in $$installfiles; do \ - echo '-- Installing '$$i ; \ + echo ' $(INSTALL_DATA) '$$i ; \ $(INSTALL_DATA) $$i $${installdir}; \ done; \ if test -n "$(DOC_MODULE_VERSION)"; then \ mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ - mv -f $${installdir}/$(DOC_MODULE).devhelp \ - $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp; \ fi; \ $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \ fi @@ -203,23 +292,25 @@ uninstall-local: # # Require gtk-doc when making dist # -if ENABLE_GTK_DOC -dist-check-gtkdoc: +if HAVE_GTK_DOC +dist-check-gtkdoc: docs else dist-check-gtkdoc: - @echo "*** gtk-doc must be installed and enabled in order to make dist" + @echo "*** gtk-doc is needed to run 'make dist'. ***" + @echo "*** gtk-doc was not found when 'configure' ran. ***" + @echo "*** please install gtk-doc and rerun 'configure'. ***" @false endif -dist-hook: dist-check-gtkdoc dist-hook-local - mkdir $(distdir)/tmpl - mkdir $(distdir)/html - -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl - cp $(srcdir)/html/* $(distdir)/html - -cp $(srcdir)/$(DOC_MODULE).pdf $(distdir)/ - -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/ - -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/ - cd $(distdir) && rm -f $(DISTCLEANFILES) - $(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html +dist-hook: dist-check-gtkdoc all-gtk-doc dist-hook-local + @mkdir $(distdir)/tmpl + @mkdir $(distdir)/html + @-cp ./tmpl/*.sgml $(distdir)/tmpl + @cp ./html/* $(distdir)/html + @-cp ./$(DOC_MODULE).pdf $(distdir)/ + @-cp ./$(DOC_MODULE).types $(distdir)/ + @-cp ./$(DOC_MODULE)-sections.txt $(distdir)/ + @cd $(distdir) && rm -f $(DISTCLEANFILES) + @$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html .PHONY : dist-hook-local docs diff --git a/m4/as-libtool.m4 b/m4/as-libtool.m4 deleted file mode 100644 index 135f3f8..0000000 --- a/m4/as-libtool.m4 +++ /dev/null @@ -1,39 +0,0 @@ -dnl as-libtool.m4 0.1.0 -dnl autostars m4 macro for libtool versioning -dnl thomas@apestaart.org -dnl -dnl AS_LIBTOOL(PREFIX, CURRENT, REVISION, AGE, RELEASE) -dnl example -dnl AS_VERSION(GST, 2, 0, 0) -dnl -dnl this macro -dnl - defines [$PREFIX]_CURRENT, REVISION AND AGE -dnl - defines [$PREFIX]_LIBVERSION -dnl - defines [$PREFIX]_LT_LDFLAGS to set versioning -dnl - AC_SUBST's them all -dnl -dnl if USE_RELEASE is used, then add a -release option to the LDFLAGS -dnl with the given release version -dnl then use [$PREFIX]_LT_LDFLAGS in the relevant Makefile.am's - -AC_DEFUN([AS_LIBTOOL], -[ - [$1]_CURRENT=[$2] - [$1]_REVISION=[$3] - [$1]_AGE=[$4] - [$1]_LIBVERSION=[$2]:[$3]:[$4] - AC_SUBST([$1]_CURRENT) - AC_SUBST([$1]_REVISION) - AC_SUBST([$1]_AGE) - AC_SUBST([$1]_LIBVERSION) - -dnl [$1]_LT_LDFLAGS="$[$1]_LT_LDFLAGS -version-info $[$1]_LIBVERSION" - if test ! -z "[$5]" - then - [$1]_LT_LDFLAGS="$[$1]_LT_LDFLAGS -release [$5]" - fi - AC_SUBST([$1]_LT_LDFLAGS) - - AC_LIBTOOL_DLOPEN - AM_PROG_LIBTOOL -]) diff --git a/m4/gtk-doc.m4 b/m4/gtk-doc.m4 index 2cfa1e7..3675543 100644 --- a/m4/gtk-doc.m4 +++ b/m4/gtk-doc.m4 @@ -1,16 +1,33 @@ dnl -*- mode: autoconf -*- -# serial 1 +# serial 2 dnl Usage: dnl GTK_DOC_CHECK([minimum-gtk-doc-version]) AC_DEFUN([GTK_DOC_CHECK], [ + AC_REQUIRE([PKG_PROG_PKG_CONFIG]) AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first + ifelse([$1],[],[gtk_doc_requires="gtk-doc"],[gtk_doc_requires="gtk-doc >= $1"]) + AC_MSG_CHECKING([for gtk-doc]) + PKG_CHECK_EXISTS([$gtk_doc_requires],[have_gtk_doc=yes],[have_gtk_doc=no]) + AC_MSG_RESULT($have_gtk_doc) + + if test "$have_gtk_doc" = "no"; then + AC_MSG_WARN([ + You will not be able to create source packages with 'make dist' + because $gtk_doc_requires is not found.]) + fi + dnl check for tools we added during development - AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check]) + dnl Use AC_CHECK_PROG to avoid the check target using an absolute path that + dnl may not be writable by the user. Currently, automake requires that the + dnl test name must end in '.test'. + dnl https://bugzilla.gnome.org/show_bug.cgi?id=701638 + AC_CHECK_PROG([GTKDOC_CHECK],[gtkdoc-check],[gtkdoc-check.test]) + AC_PATH_PROG([GTKDOC_CHECK_PATH],[gtkdoc-check]) AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true]) AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf]) @@ -27,17 +44,22 @@ AC_DEFUN([GTK_DOC_CHECK], [use gtk-doc to build documentation [[default=no]]]),, [enable_gtk_doc=no]) - if test x$enable_gtk_doc = xyes; then - ifelse([$1],[], - [PKG_CHECK_EXISTS([gtk-doc],, - AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))], - [PKG_CHECK_EXISTS([gtk-doc >= $1],, - AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))]) - fi - AC_MSG_CHECKING([whether to build gtk-doc documentation]) AC_MSG_RESULT($enable_gtk_doc) + if test "x$enable_gtk_doc" = "xyes" && test "$have_gtk_doc" = "no"; then + AC_MSG_ERROR([ + You must have $gtk_doc_requires installed to build documentation for + $PACKAGE_NAME. Please install gtk-doc or disable building the + documentation by adding '--disable-gtk-doc' to '[$]0'.]) + fi + + dnl don't check for glib if we build glib + if test "x$PACKAGE_NAME" != "xglib"; then + dnl don't fail if someone does not have glib + PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0,,[:]) + fi + dnl enable/disable output formats AC_ARG_ENABLE([gtk-doc-html], AS_HELP_STRING([--enable-gtk-doc-html], @@ -52,7 +74,12 @@ AC_DEFUN([GTK_DOC_CHECK], enable_gtk_doc_pdf=no fi + if test -z "$AM_DEFAULT_VERBOSITY"; then + AM_DEFAULT_VERBOSITY=1 + fi + AC_SUBST([AM_DEFAULT_VERBOSITY]) + AM_CONDITIONAL([HAVE_GTK_DOC], [test x$have_gtk_doc = xyes]) AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes]) AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes]) AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes]) @@ -1,4 +1,5 @@ # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant <scott@netsplit.com>. # @@ -25,13 +26,17 @@ # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) -m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) -AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl +m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) +m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) +AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) +AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) + if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then - _pkg_min_version=m4_ifval([$1], [$1], [0.9.0]) + _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) @@ -39,7 +44,6 @@ if test -n "$PKG_CONFIG"; then AC_MSG_RESULT([no]) PKG_CONFIG="" fi - fi[]dnl ])# PKG_PROG_PKG_CONFIG @@ -48,37 +52,47 @@ fi[]dnl # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # -# -# Similar to PKG_CHECK_MODULES, make sure that the first instance of -# this or PKG_CHECK_MODULES is called, or make sure to call -# PKG_CHECK_EXISTS manually +# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +# only at the first occurence in configure.ac, so if the first place +# it's called might be skipped (such as if it is within an "if", you +# have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then - m4_ifval([$2], [$2], [:]) + m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) - # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], -[if test -n "$PKG_CONFIG"; then - if test -n "$$1"; then - pkg_cv_[]$1="$$1" - else - PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], - [pkg_failed=yes]) - fi -else - pkg_failed=untried +[if test -n "$$1"; then + pkg_cv_[]$1="$$1" + elif test -n "$PKG_CONFIG"; then + PKG_CHECK_EXISTS([$3], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes ], + [pkg_failed=yes]) + else + pkg_failed=untried fi[]dnl ])# _PKG_CONFIG +# _PKG_SHORT_ERRORS_SUPPORTED +# ----------------------------- +AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi[]dnl +])# _PKG_SHORT_ERRORS_SUPPORTED + + # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # @@ -100,36 +114,101 @@ AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) +m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS +and $1[]_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details.]) + if test $pkg_failed = yes; then - $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` + AC_MSG_RESULT([no]) + _PKG_SHORT_ERRORS_SUPPORTED + if test $_pkg_short_errors_supported = yes; then + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` + else + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` + fi # Put the nasty error message in config.log where it belongs - echo "$$1[]_PKG_ERRORS" 1>&AS_MESSAGE_LOG_FD + echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD + + m4_default([$4], [AC_MSG_ERROR( +[Package requirements ($2) were not met: + +$$1_PKG_ERRORS - ifelse([$4], , [AC_MSG_ERROR(dnl -[Package requirements ($2) were not met. Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables -to avoid the need to call pkg-config. See the pkg-config man page for -more details.])], - [$4]) +_PKG_TEXT])[]dnl + ]) elif test $pkg_failed = untried; then - ifelse([$4], , [AC_MSG_FAILURE(dnl + AC_MSG_RESULT([no]) + m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. -Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables -to avoid the need to call pkg-config. See the pkg-config man page for -more details. +_PKG_TEXT -To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])], - [$4]) +To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl + ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) - ifelse([$3], , :, [$3]) + $3 fi[]dnl ])# PKG_CHECK_MODULES + + +# PKG_INSTALLDIR(DIRECTORY) +# ------------------------- +# Substitutes the variable pkgconfigdir as the location where a module +# should install pkg-config .pc files. By default the directory is +# $libdir/pkgconfig, but the default can be changed by passing +# DIRECTORY. The user can override through the --with-pkgconfigdir +# parameter. +AC_DEFUN([PKG_INSTALLDIR], +[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) +m4_pushdef([pkg_description], + [pkg-config installation directory @<:@]pkg_default[@:>@]) +AC_ARG_WITH([pkgconfigdir], + [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, + [with_pkgconfigdir=]pkg_default) +AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) +m4_popdef([pkg_default]) +m4_popdef([pkg_description]) +]) dnl PKG_INSTALLDIR + + +# PKG_NOARCH_INSTALLDIR(DIRECTORY) +# ------------------------- +# Substitutes the variable noarch_pkgconfigdir as the location where a +# module should install arch-independent pkg-config .pc files. By +# default the directory is $datadir/pkgconfig, but the default can be +# changed by passing DIRECTORY. The user can override through the +# --with-noarch-pkgconfigdir parameter. +AC_DEFUN([PKG_NOARCH_INSTALLDIR], +[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) +m4_pushdef([pkg_description], + [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) +AC_ARG_WITH([noarch-pkgconfigdir], + [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, + [with_noarch_pkgconfigdir=]pkg_default) +AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) +m4_popdef([pkg_default]) +m4_popdef([pkg_description]) +]) dnl PKG_NOARCH_INSTALLDIR + + +# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, +# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# ------------------------------------------- +# Retrieves the value of the pkg-config variable for the given module. +AC_DEFUN([PKG_CHECK_VAR], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl + +_PKG_CONFIG([$1], [variable="][$3]["], [$2]) +AS_VAR_COPY([$1], [pkg_cv_][$1]) + +AS_VAR_IF([$1], [""], [$5], [$4])dnl +])# PKG_CHECK_VAR diff --git a/orc-test/Makefile.am b/orc-test/Makefile.am index 0493334..3681de8 100644 --- a/orc-test/Makefile.am +++ b/orc-test/Makefile.am @@ -4,9 +4,7 @@ pkgincludedir = $(includedir)/orc-@ORC_MAJORMINOR@/orc-test lib_LTLIBRARIES = liborc-test-@ORC_MAJORMINOR@.la liborc_test_@ORC_MAJORMINOR@_la_LIBADD = $(ORC_LIBS) -liborc_test_@ORC_MAJORMINOR@_la_LDFLAGS = \ - -version-info $(ORC_LIBVERSION) \ - -no-undefined -export-symbols-regex 'orc_' +liborc_test_@ORC_MAJORMINOR@_la_LDFLAGS = $(ORC_LDFLAGS) liborc_test_@ORC_MAJORMINOR@_la_CFLAGS = $(ORC_CFLAGS) \ -DORC_ENABLE_UNSTABLE_API diff --git a/orc/Makefile.am b/orc/Makefile.am index 03225df..82973e6 100644 --- a/orc/Makefile.am +++ b/orc/Makefile.am @@ -4,9 +4,7 @@ pkgincludedir = $(includedir)/orc-@ORC_MAJORMINOR@/orc lib_LTLIBRARIES = liborc-@ORC_MAJORMINOR@.la liborc_@ORC_MAJORMINOR@_la_LIBADD = $(LIBM) $(LIBRT) $(PTHREAD_LIBS) -liborc_@ORC_MAJORMINOR@_la_LDFLAGS = \ - -version-info $(ORC_LIBVERSION) \ - -no-undefined -export-symbols-regex 'orc_' +liborc_@ORC_MAJORMINOR@_la_LDFLAGS = $(ORC_LDFLAGS) liborc_@ORC_MAJORMINOR@_la_CFLAGS = $(ORC_CFLAGS) \ -DORC_ENABLE_UNSTABLE_API diff --git a/testsuite/orcc/Makefile.am b/testsuite/orcc/Makefile.am index 41134fc..2ba0ac0 100644 --- a/testsuite/orcc/Makefile.am +++ b/testsuite/orcc/Makefile.am @@ -18,13 +18,17 @@ LIBS = $(ORC_LIBS) $(top_builddir)/orc-test/liborc-test-@ORC_MAJORMINOR@.la CLEANFILES = testorc.c testorc.h orc_test.c +orcc_v_gen = $(orcc_v_gen_$(V)) +orcc_v_gen_ = $(orcc_v_gen_$(AM_DEFAULT_VERBOSITY)) +orcc_v_gen_0 = @echo " ORCC $@"; + testorc.h: $(srcdir)/../test.orc - $(top_builddir)/tools/orcc$(EXEEXT) --include stdint.h --header -o testorc.h $< + $(orcc_v_gen)$(top_builddir)/tools/orcc$(EXEEXT) --include stdint.h --header -o testorc.h $< testorc.c: $(srcdir)/../test.orc - $(top_builddir)/tools/orcc$(EXEEXT) --include stdint.h --implementation -o testorc.c $< + $(orcc_v_gen)$(top_builddir)/tools/orcc$(EXEEXT) --include stdint.h --implementation -o testorc.c $< orc_test.c: $(srcdir)/../test.orc - $(top_builddir)/tools/orcc$(EXEEXT) --include stdint.h --test -o orc_test.c $< + $(orcc_v_gen)$(top_builddir)/tools/orcc$(EXEEXT) --include stdint.h --test -o orc_test.c $< |