From: Tyler Slabinski Date: Thu, 24 Aug 2017 01:33:51 +0000 (-0400) Subject: Create libfl.pc target for pkgconfig X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c1ed5df2f61abcb201b770e29cea1082a117d0f9;p=flex Create libfl.pc target for pkgconfig --- 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