From 15572c9cd95b94501b445169e836b5271c451b33 Mon Sep 17 00:00:00 2001 From: Chris Bagwell Date: Tue, 6 Apr 2010 10:38:38 -0500 Subject: [PATCH] Add stub for future pkg-config support Not quite ready to support pkg-config yet but go ahead and provide basic support in configure to discourage distributions that are patching pkg-config support in to no longer run "autoreconf -f" and wiping out our custom libtool. sane-backends.pc will not be installed currently. Also, fixed a LDFLAGS bug in sane-config for GPHOTO2 support. Signed-off-by: Chris Bagwell --- ChangeLog | 8 ++++++++ configure | 3 +++ configure.in | 1 + tools/Makefile.in | 6 ++++-- tools/sane-backends.pc.in | 14 ++++++++++++++ tools/sane-config.in | 2 +- 6 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 tools/sane-backends.pc.in diff --git a/ChangeLog b/ChangeLog index 64426c90b..64797ed6e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2010-04-06 Chris Bagwell + * configure.in, tools/sane-backends.pc.in: Add stub for future + pkg-config support to configure. This allows distributes + that are patching in pkg-config support to not rerun + autoconf and wipe out our custom libtool. + * tools/sane-config.in: Fix LDFLAGS bug related to GPHOTO2 + support. + 2010-04-02 Chris Bagwell * acinclude.m4: Add --enable-rpath option to configure. Ported from Fedora patches. diff --git a/configure b/configure index b16e69898..6607a3baa 100755 --- a/configure +++ b/configure @@ -34609,6 +34609,8 @@ ac_config_files="$ac_config_files Makefile lib/Makefile sanei/Makefile frontend/ ac_config_files="$ac_config_files tools/sane-config" +ac_config_files="$ac_config_files tools/sane-backends.pc" + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -35321,6 +35323,7 @@ do "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;; "doc/doxygen-sanei.conf") CONFIG_FILES="$CONFIG_FILES doc/doxygen-sanei.conf" ;; "tools/sane-config") CONFIG_FILES="$CONFIG_FILES tools/sane-config" ;; + "tools/sane-backends.pc") CONFIG_FILES="$CONFIG_FILES tools/sane-backends.pc" ;; *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} diff --git a/configure.in b/configure.in index 6d0a785b4..a30b4d441 100644 --- a/configure.in +++ b/configure.in @@ -674,6 +674,7 @@ AC_CONFIG_FILES([Makefile lib/Makefile sanei/Makefile frontend/Makefile \ japi/Makefile backend/Makefile include/Makefile doc/Makefile \ po/Makefile testsuite/Makefile tools/Makefile doc/doxygen-sanei.conf]) AC_CONFIG_FILES([tools/sane-config], [chmod a+x tools/sane-config]) +AC_CONFIG_FILES([tools/sane-backends.pc]) AC_OUTPUT dnl *********************************************************************** diff --git a/tools/Makefile.in b/tools/Makefile.in index 324cbedbd..b031d2510 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -39,7 +39,7 @@ bin_PROGRAMS = sane-find-scanner$(EXEEXT) gamma4scanimage$(EXEEXT) noinst_PROGRAMS = sane-desc$(EXEEXT) umax_pp$(EXEEXT) subdir = tools DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/sane-config.in + $(srcdir)/sane-backends.pc.in $(srcdir)/sane-config.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/byteorder.m4 \ @@ -48,7 +48,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/sane/config.h -CONFIG_CLEAN_FILES = sane-config +CONFIG_CLEAN_FILES = sane-config sane-backends.pc CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) @@ -340,6 +340,8 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): sane-config: $(top_builddir)/config.status $(srcdir)/sane-config.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +sane-backends.pc: $(top_builddir)/config.status $(srcdir)/sane-backends.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" diff --git a/tools/sane-backends.pc.in b/tools/sane-backends.pc.in new file mode 100644 index 000000000..5781121ee --- /dev/null +++ b/tools/sane-backends.pc.in @@ -0,0 +1,14 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ +ldflags=@LDFLAGS@ @GPHOTO2_LDFLAGS@ +libs=@LIBS@ @DL_LIBS@ @LIBV4L_LIBS@ @MATH_LIB@ @TIFF_LIBS@ @JPEG_LIBS@ @GPHOTO2_LIBS@ @SOCKET_LIBS@ @AVAHI_LIBS@ @USB_LIBS@ @SCSI_LIBS@ @RESMGR_LIBS@ + +Name: SANE Backends +Description: Backends for SANE, the universal scanner interface +Version: @VERSION@ +Requires: +Libs: -L$(libdir) -lsane +Libs.private: $(ldflags) $(libs) +Cflags: -I$(includedir) diff --git a/tools/sane-config.in b/tools/sane-config.in index c0324defa..200922e4a 100644 --- a/tools/sane-config.in +++ b/tools/sane-config.in @@ -12,7 +12,7 @@ LINKER_RPATH="@LINKER_RPATH@" prefix="@prefix@" exec_prefix="@exec_prefix@" -LDFLAGS="@LDFLAGS@ @GPHOTO2@" +LDFLAGS="@LDFLAGS@ @GPHOTO2_LDFLAGS@" LIBS="@LIBS@ @DL_LIBS@ @LIBV4L_LIBS@ @MATH_LIB@ @TIFF_LIBS@ @JPEG_LIBS@ @GPHOTO2_LIBS@ @SOCKET_LIBS@ @AVAHI_LIBS@ @USB_LIBS@ @SCSI_LIBS@ @REGMGR_LIBS@" pkgincludedir="@pkgincludedir@" pkglibdir="@pkglibdir@"