From c1ed5df2f61abcb201b770e29cea1082a117d0f9 Mon Sep 17 00:00:00 2001 From: Tyler Slabinski Date: Wed, 23 Aug 2017 21:33:51 -0400 Subject: [PATCH] Create libfl.pc target for pkgconfig --- Makefile.am | 3 +++ configure.ac | 4 ++++ libfl.pc.in | 10 ++++++++++ 3 files changed, 17 insertions(+) create mode 100644 libfl.pc.in diff --git a/Makefile.am b/Makefile.am index 638c549..e790e9d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -49,6 +49,9 @@ SUBDIRS = \ tests \ tools +pkgconfigdir = @pkgconfigdir@ +pkgconfig_DATA = libfl.pc + # Create the ChangeLog, but only if we're inside a git working directory ChangeLog: $(srcdir)/tools/git2cl diff --git a/configure.ac b/configure.ac index d9aab34..8882016 100644 --- a/configure.ac +++ b/configure.ac @@ -54,6 +54,9 @@ AC_PROG_LN_S AC_PROG_AWK AC_PROG_INSTALL +pkgconfigdir=${libdir}/pkgconfig +AC_SUBST(pkgconfigdir) + # allow passing a variable `WARNINGFLAGS', # either when invoking `configure', or when invoking `make' # default to something useful if GCC was detected @@ -180,6 +183,7 @@ po/Makefile.in src/Makefile tools/Makefile tests/Makefile +libfl.pc ) AC_OUTPUT diff --git a/libfl.pc.in b/libfl.pc.in new file mode 100644 index 0000000..058c089 --- /dev/null +++ b/libfl.pc.in @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libfl +Description: The fast lexical analyser +Version: @PACKAGE_VERSION@ +Libs: -L${libdir} -lfl +Cflags: -I${includedir} \ No newline at end of file -- 2.50.1