>From fa424d1f2bcb27409142f5c3f6842a8dc4aea3f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Tue, 13 May 2014 16:31:51 +0200 Subject: [PATCH] Add a metadata file for pkg-config - readline.pc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It facilitates finding readline presence and defining LIBS and CFLAGS, like this: PKG_CHECK_MODULES(READLINE, readline) AC_SUBST(READLINE_CFLAGS) AC_SUBST(READLINE_LIBS) Signed-off-by: Jiří Klimeš --- MANIFEST | 1 + Makefile | 5 ++++- Makefile.in | 3 +++ configure | 2 +- configure.ac | 2 +- configure.in | 2 +- readline.pc.in | 13 +++++++++++++ 7 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 readline.pc.in diff --git a/MANIFEST b/MANIFEST index ec98f19..614fc08 100644 --- a/MANIFEST +++ b/MANIFEST @@ -20,6 +20,7 @@ config.h.in f configure f configure.ac f Makefile.in f +readline.pc.in f ansi_stdlib.h f chardefs.h f colors.h f diff --git a/Makefile b/Makefile index afeab8b..d56e621 100644 --- a/Makefile +++ b/Makefile @@ -94,7 +94,7 @@ DOCOBJECT = doc/readline.dvi DOCSUPPORT = doc/Makefile DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT) -SUPPORT = Makefile ChangeLog $(DOCSUPPORT) examples/[-a-z.]* +SUPPORT = Makefile ChangeLog $(DOCSUPPORT) examples/[-a-z.]* readline.pc SOURCES = $(CSOURCES) $(HSOURCES) $(DOCSOURCE) @@ -184,6 +184,9 @@ mostlyclean: clean distclean realclean: clean rm -f Makefile config.status config.h stamp-config +readline.pc: config.status $(srcdir)/readline.pc.in + $(SHELL) config.status + # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/Makefile.in b/Makefile.in index c0a0f1c..5d8df83 100644 --- a/Makefile.in +++ b/Makefile.in @@ -207,6 +207,9 @@ stamp-h: config.status $(srcdir)/config.h.in # cd $(srcdir) && autoconf ## Comment-me-out in distribution +readline.pc: config.status $(srcdir)/readline.pc.in + $(SHELL) config.status + shared: force -test -d shlib || mkdir shlib ( cd shlib ; ${MAKE} ${MFLAGS} all ) diff --git a/configure b/configure index f11ee25..57a5b01 100755 --- a/configure +++ b/configure @@ -6484,7 +6484,7 @@ esac -ac_config_files="$ac_config_files Makefile doc/Makefile examples/Makefile shlib/Makefile" +ac_config_files="$ac_config_files Makefile doc/Makefile examples/Makefile shlib/Makefile readline.pc" ac_config_commands="$ac_config_commands default" diff --git a/configure.ac b/configure.ac index cea8f91..a595ab5 100644 --- a/configure.ac +++ b/configure.ac @@ -296,7 +296,7 @@ AC_SUBST(LIBVERSION) AC_SUBST(TERMCAP_LIB) -AC_OUTPUT([Makefile doc/Makefile examples/Makefile shlib/Makefile], +AC_OUTPUT([Makefile doc/Makefile examples/Makefile shlib/Makefile readline.pc], [ # Makefile uses this timestamp file to record whether config.h is up to date. echo > stamp-h diff --git a/configure.in b/configure.in index 0fba243..3417656 100644 --- a/configure.in +++ b/configure.in @@ -292,7 +292,7 @@ AC_SUBST(LIBVERSION) AC_SUBST(TERMCAP_LIB) -AC_OUTPUT([Makefile doc/Makefile examples/Makefile shlib/Makefile], +AC_OUTPUT([Makefile doc/Makefile examples/Makefile shlib/Makefile readline.pc], [ # Makefile uses this timestamp file to record whether config.h is up to date. echo > stamp-h diff --git a/readline.pc.in b/readline.pc.in new file mode 100644 index 0000000..18154d2 --- /dev/null +++ b/readline.pc.in @@ -0,0 +1,13 @@ address@hidden@ address@hidden@ address@hidden@ address@hidden@ + +Name: Readline +Description: Gnu Readline library for command line editing +URL: http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html +Version: @LIBVERSION@ +Requires.private: tinfo +Libs: -L${libdir} -lreadline +Cflags: -I${includedir}/readline + -- 1.7.11.7