Whamcloud - gitweb
Add pkg-config files to e2fsprogs's libraries.
authorTheodore Ts'o <tytso@mit.edu>
Wed, 26 Jan 2005 17:59:25 +0000 (12:59 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 26 Jan 2005 17:59:25 +0000 (12:59 -0500)
26 files changed:
configure
configure.in
debian/comerr-dev.files
debian/e2fslibs-dev.files
debian/libblkid-dev.files
debian/ss-dev.files
debian/uuid-dev.files
e2fsprogs.spec.in
lib/blkid/ChangeLog
lib/blkid/Makefile.in
lib/blkid/blkid.pc.in [new file with mode: 0644]
lib/e2p/ChangeLog
lib/e2p/Makefile.in
lib/e2p/e2p.pc.in [new file with mode: 0644]
lib/et/ChangeLog
lib/et/Makefile.in
lib/et/com_err.pc.in [new file with mode: 0644]
lib/ext2fs/ChangeLog
lib/ext2fs/Makefile.in
lib/ext2fs/ext2fs.pc.in [new file with mode: 0644]
lib/ss/ChangeLog
lib/ss/Makefile.in
lib/ss/ss.pc.in [new file with mode: 0644]
lib/uuid/ChangeLog
lib/uuid/Makefile.in
lib/uuid/uuid.pc.in [new file with mode: 0644]

index 1e786e6..ec27ba4 100644 (file)
--- a/configure
+++ b/configure
@@ -14276,6 +14276,8 @@ for i in MCONFIG Makefile e2fsprogs.spec \
        lib/et/Makefile lib/ss/Makefile lib/ext2fs/Makefile lib/e2p/Makefile \
        lib/uuid/Makefile lib/uuid/uuid_types.h \
        lib/blkid/Makefile lib/blkid/blkid_types.h \
+       lib/ss/ss.pc lib/uuid/uuid.pc lib/et/com_err.pc \
+       lib/e2p/e2p.pc lib/blkid/blkid.pc lib/ext2fs/ext2fs.pc \
        misc/Makefile ext2ed/Makefile e2fsck/Makefile \
        debugfs/Makefile tests/Makefile tests/progs/Makefile \
        resize/Makefile doc/Makefile intl/Makefile po/Makefile.in ; do
index bbc5076..1e5c55b 100644 (file)
@@ -819,6 +819,8 @@ for i in MCONFIG Makefile e2fsprogs.spec \
        lib/et/Makefile lib/ss/Makefile lib/ext2fs/Makefile lib/e2p/Makefile \
        lib/uuid/Makefile lib/uuid/uuid_types.h \
        lib/blkid/Makefile lib/blkid/blkid_types.h \
+       lib/ss/ss.pc lib/uuid/uuid.pc lib/et/com_err.pc \
+       lib/e2p/e2p.pc lib/blkid/blkid.pc lib/ext2fs/ext2fs.pc \
        misc/Makefile ext2ed/Makefile e2fsck/Makefile \
        debugfs/Makefile tests/Makefile tests/progs/Makefile \
        resize/Makefile doc/Makefile intl/Makefile po/Makefile.in ; do
index aa1bed0..9e5e1e1 100644 (file)
@@ -6,3 +6,4 @@ usr/share/man/man1/compile_et*
 usr/share/man/man3/com_err.3*
 usr/bin/compile_et
 usr/share/et/*
+usr/lib/pkgconfig/com_err.pc
index 7c69e2e..2755b71 100644 (file)
@@ -3,3 +3,5 @@ usr/lib/*.a
 usr/include/ext2fs
 usr/include/e2p
 usr/share/info/libext2fs.info*
+usr/lib/pkgconfig/e2p.pc
+usr/lib/pkgconfig/ext2fs.pc
index c5ad6fc..31ec0f0 100644 (file)
@@ -1,3 +1,4 @@
 usr/lib/libblkid*
 usr/include/blkid
 usr/share/man/man3/libblkid.3
+usr/lib/pkgconfig/blkid.pc
index 83b3464..fa15221 100644 (file)
@@ -4,3 +4,4 @@ usr/include/ss/*
 usr/bin/mk_cmds
 usr/share/ss/*
 usr/share/man/man1/mk_cmds*
+usr/lib/pkgconfig/ss.pc
index 3e29538..44b5163 100644 (file)
@@ -2,3 +2,4 @@ usr/lib/libuuid.so
 usr/lib/libuuid.a
 usr/include/uuid/*
 usr/share/man/man3/uuid*
+usr/lib/pkgconfig/uuid.pc
index a17d6c5..050d505 100644 (file)
@@ -166,6 +166,13 @@ exit 0
 %{_libdir}/libuuid.a
 %{_libdir}/libuuid.so
 
+%{_libdir}/pkgconfig/blkid.pc
+%{_libdir}/pkgconfig/com_err.pc
+%{_libdir}/pkgconfig/e2p.pc
+%{_libdir}/pkgconfig/ext2fs.pc
+%{_libdir}/pkgconfig/ss.pc
+%{_libdir}/pkgconfig/uuid.pc
+
 %{_datadir}/et
 %{_datadir}/ss
 %{_includedir}/blkid
index 3a16375..22732b2 100644 (file)
@@ -1,3 +1,7 @@
+2005-01-26  Theodore Ts'o  <tytso@mit.edu>
+
+       * blkid.pc.in: Add pkg-config files.
+
 2005-01-25  Theodore Ts'o  <tytso@mit.edu>
 
        * probe.c: Windows can perform a "quick format" that doesn't clear
index b70bae6..4f3050f 100644 (file)
@@ -60,7 +60,7 @@ DEPLIBS_BLKID=        $(DEPSTATIC_LIBBLKID) $(DEPSTATIC_LIBUUID)
 @ELF_CMT@      @$(CC) $(ALL_CFLAGS) -fPIC -o elfshared/$*.o -c $<
 @BSDLIB_CMT@   @$(CC) $(ALL_CFLAGS) $(BSDLIB_PIC_FLAG) -o pic/$*.o -c $<
 
-all:: $(SMANPAGES)
+all:: $(SMANPAGES) blkid.pc
 
 $(top_builddir)/lib/blkid/blkid_types.h: $(srcdir)/blkid_types.h.in $(top_builddir)/config.status
        @echo " CONFIG.STATUS $@"
@@ -119,10 +119,14 @@ blkid: ../../misc/blkid.o libblkid.a $(DEPLIBUUID)
 check:: all tst_cache tst_devname tst_devno tst_getsize tst_probe \
  tst_read tst_resolve tst_save
 
+blkid.pc: $(srcdir)/blkid.pc.in $(top_builddir)/config.status
+       @echo " CONFIG.STATUS $@"
+       @cd $(top_builddir); CONFIG_FILES=lib/blkid/blkid.pc ./config.status
+
 installdirs::
        @echo " MKINSTALLDIRS $(libdir) $(includedir)/blkid"
        @$(MKINSTALLDIRS) $(DESTDIR)$(libdir) \
-               $(DESTDIR)$(includedir)/blkid
+               $(DESTDIR)$(includedir)/blkid $(DESTDIR)$(libdir)/pkgconfig
 
 install:: all installdirs 
        @echo " INSTALL_DATA $(libdir)/libblkid.a"
@@ -141,9 +145,12 @@ install:: all installdirs
                echo "  INSTALL_DATA $(man3dir)/$$i"; \
                $(INSTALL_DATA) $$i $(DESTDIR)$(man3dir)/$$i; \
        done
+       @echo " INSTALL_DATA $(libdir)/pkgconfig/blkid.pc"
+       @$(INSTALL_DATA) blkid.pc $(DESTDIR)$(libdir)/pkgconfig/blkid.pc
 
 uninstall::
-       $(RM) -f $(DESTDIR)$(libdir)/libblkid.a
+       $(RM) -f $(DESTDIR)$(libdir)/libblkid.a \
+               $(DESTDIR)$(libdir)/pkgconfig/blkid.pc
        $(RM) -rf $(DESTDIR)$(includedir)/blkid
        for i in $(SMANPAGES); do \
                $(RM) -f $(DESTDIR)$(man3dir)/$$i; \
diff --git a/lib/blkid/blkid.pc.in b/lib/blkid/blkid.pc.in
new file mode 100644 (file)
index 0000000..fda7f92
--- /dev/null
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: blkid
+Description: Block device id library
+Version: @E2FSPROGS_VERSION@
+Requires: uuid
+Cflags: -I${includedir} 
+Libs: -L${libdir} -lblkid
index d98931f..ae7d9ec 100644 (file)
@@ -1,3 +1,7 @@
+2005-01-26  Theodore Ts'o  <tytso@mit.edu>
+
+       * e2p.pc.in: Add pkg-config files.
+
 2005-01-19  Theodore Ts'o  <tytso@mit.edu>
 
        * ls.c (list_super2): Interpret OS Creator values for FreeBSD and
index 4b11a61..f91ad03 100644 (file)
@@ -14,7 +14,7 @@ INSTALL = @INSTALL@
 
 @MCONFIG@
 
-all::
+all::  e2p.pc
 
 OBJS=          feature.o fgetflags.o fsetflags.o fgetversion.o fsetversion.o \
                getflags.o getversion.o hashstr.o iod.o ls.o mntopts.o \
@@ -59,10 +59,14 @@ BSDLIB_INSTALL_DIR = $(root_libdir)
 @ELF_CMT@      @$(CC) $(ALL_CFLAGS) -fPIC -o elfshared/$*.o -c $<
 @BSDLIB_CMT@   @$(CC) $(ALL_CFLAGS) $(BSDLIB_PIC_FLAG) -o pic/$*.o -c $<
 
+e2p.pc: $(srcdir)/e2p.pc.in $(top_builddir)/config.status
+       @echo " CONFIG.STATUS $@"
+       @cd $(top_builddir); CONFIG_FILES=lib/e2p/e2p.pc ./config.status
+
 installdirs::
        @echo " MKINSTALLDIRS $(libdir) $(includedir)/e2p"
        @$(MKINSTALLDIRS) $(DESTDIR)$(libdir) \
-               $(DESTDIR)$(includedir)/e2p
+               $(DESTDIR)$(includedir)/e2p $(DESTDIR)$(libdir)/pkgconfig
 
 install:: all installdirs 
        @echo " INSTALL_DATA $(libdir)/libe2p.a"
@@ -73,9 +77,12 @@ install:: all installdirs
          echo "        INSTALL_DATA $(includedir)/e2p/$$i"; \
          $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir)/e2p/$$i; \
        done
+       @echo " INSTALL_DATA $(libdir)/pkgconfig/e2p.pc"
+       @$(INSTALL_DATA) e2p.pc $(DESTDIR)$(libdir)/pkgconfig/e2p.pc
 
 uninstall::
-       $(RM) -f $(DESTDIR)$(libdir)/libe2p.a
+       $(RM) -f $(DESTDIR)$(libdir)/libe2p.a \
+               $(DESTDIR)$(libdir)/pkgconfig/e2p.pc
        $(RM) -rf $(DESTDIR)$(includedir)/e2p
 
 clean::
diff --git a/lib/e2p/e2p.pc.in b/lib/e2p/e2p.pc.in
new file mode 100644 (file)
index 0000000..41b4129
--- /dev/null
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: e2p
+Description: Ext2fs userpace programs utility library
+Version: @E2FSPROGS_VERSION@
+Requires: 
+Cflags: -I${includedir} 
+Libs: -L${libdir} -le2p
index aa393c5..5835d3f 100644 (file)
@@ -1,3 +1,7 @@
+2005-01-26  Theodore Ts'o  <tytso@mit.edu>
+
+       * com_err.pc.in: Add pkg-config files.
+
 2004-12-14  Theodore Ts'o  <tytso@mit.edu>
 
        * Makefile.in: Use Linux-kernel-style makefile output for "make
index 6f27cb8..51acd37 100644 (file)
@@ -13,7 +13,7 @@ DEP_MAKEFILE = $(DEP_LIB_MAKEFILES)
 
 @MCONFIG@
 
-all:: compile_et
+all:: compile_et com_err.pc
 
 OBJS= error_message.o et_name.o init_et.o com_err.o com_right.o
 SRCS = $(srcdir)/error_message.c $(srcdir)/et_name.c $(srcdir)/init_et.c \
@@ -62,6 +62,10 @@ compile_et: $(DEP_SUBSTITUTE) $(srcdir)/compile_et.sh.in
 com_err.ps : com_err.dvi
 com_err.dvi: com_err.texinfo
 
+com_err.pc: $(srcdir)/com_err.pc.in $(top_builddir)/config.status
+       @echo " CONFIG.STATUS $@"
+       @cd $(top_builddir); CONFIG_FILES=lib/et/com_err.pc ./config.status
+
 #libcom_err.o: $(LIBOBJS)
 #      $(LD) -r -s -o libcom_err.o $(LIBOBJS)
 #      chmod -x libcom_err.o
@@ -74,9 +78,9 @@ installdirs::
        @$(MKINSTALLDIRS) $(DESTDIR)$(libdir) \
                $(DESTDIR)$(includedir)/et $(DESTDIR)$(datadir)/et \
                $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir) \
-               $(DESTDIR)$(man3dir)
+               $(DESTDIR)$(man3dir) $(DESTDIR)$(libdir)/pkgconfig
 
-install:: compile_et libcom_err.a $(HFILES) installdirs
+install:: compile_et libcom_err.a $(HFILES) installdirs com_err.pc
        @echo " INSTALL_DATA $(libdir)/libcom_err.a"
        @$(INSTALL_DATA) libcom_err.a $(DESTDIR)$(libdir)/libcom_err.a
        @-$(RANLIB) $(DESTDIR)$(libdir)/libcom_err.a
@@ -96,10 +100,13 @@ install:: compile_et libcom_err.a $(HFILES) installdirs
        @echo " INSTALL_DATA $(man1dir)/compile_et.1"
        @$(INSTALL_DATA) $(srcdir)/compile_et.1 \
                        $(DESTDIR)$(man1dir)/compile_et.1
+       @echo " INSTALL_DATA $(libdir)/pkgconfig/com_err.pc"
+       @$(INSTALL_DATA) com_err.pc $(DESTDIR)$(libdir)/pkgconfig/com_err.pc
 
 uninstall::
        $(RM) -f $(DESTDIR)$(libdir)/libcom_err.a \
-                       $(DESTDIR)$(bindir)/compile_et
+               $(DESTDIR)$(bindir)/compile_et \
+               $(DESTDIR)$(libdir)/pkgconfig/com_err.pc
        $(RM) -rf $(DESTDIR)$(includedir)/et $(DESTDIR)$(datadir)/et
 
 check:: compile_et
diff --git a/lib/et/com_err.pc.in b/lib/et/com_err.pc.in
new file mode 100644 (file)
index 0000000..c42774a
--- /dev/null
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: com_err
+Description: Common error description library
+Version: @E2FSPROGS_VERSION@
+Requires:
+Cflags: -I${includedir} 
+Libs: -L${libdir} -lcom_err
index 451491e..c7c8d01 100644 (file)
@@ -1,3 +1,7 @@
+2005-01-26  Theodore Ts'o  <tytso@mit.edu>
+
+       * ext2fs.pc.in: Add pkg-config files.
+
 2005-01-25  Theodore Ts'o  <tytso@mit.edu>
 
        * ext2fs.h: Add definition of struct ext2_inode_large
index 75fb344..d9ab05f 100644 (file)
@@ -158,6 +158,8 @@ BSDLIB_INSTALL_DIR = $(root_libdir)
 @MAKEFILE_PROFILE@
 @MAKEFILE_CHECKER@
 
+all:: ext2fs.pc
+
 .c.o:
        @echo " CC $<"
        @$(CC) $(ALL_CFLAGS) -c $< -o $@
@@ -178,6 +180,10 @@ ext2_err.c ext2_err.h: ext2_err.et
        @echo " COMPILE_ET ex2_err.et"
        @$(COMPILE_ET) ext2_err.et
 
+ext2fs.pc: $(srcdir)/ext2fs.pc.in $(top_builddir)/config.status
+       @echo " CONFIG.STATUS $@"
+       @cd $(top_builddir); CONFIG_FILES=lib/ext2fs/ext2fs.pc ./config.status
+
 tst_badblocks: tst_badblocks.o freefs.o \
                read_bb_file.o write_bb_file.o badblocks.o 
        @echo " LD $@"
@@ -226,9 +232,9 @@ check:: tst_badblocks tst_iscan @SWAPFS_CMT@ tst_byteswap
 installdirs::
        @echo " MKINSTALLDIRS $(libdir) $(includedir)/ext2fs"
        @$(MKINSTALLDIRS) $(DESTDIR)$(libdir) \
-               $(DESTDIR)$(includedir)/ext2fs
+               $(DESTDIR)$(includedir)/ext2fs $(DESTDIR)$(libdir)/pkgconfig
 
-install:: all $(HFILES) $(HFILES_IN) installdirs 
+install:: all $(HFILES) $(HFILES_IN) installdirs ext2fs.pc
        @echo " INSTALL_DATA $(libdir)/libext2fs.a"
        @$(INSTALL_DATA) libext2fs.a $(DESTDIR)$(libdir)/libext2fs.a
        @-$(RANLIB) $(DESTDIR)$(libdir)/libext2fs.a
@@ -241,10 +247,13 @@ install:: all $(HFILES) $(HFILES_IN) installdirs
                echo "  INSTALL_DATA $(includedir)/ext2fs/$$i"; \
                $(INSTALL_DATA) $$i $(DESTDIR)$(includedir)/ext2fs/$$i; \
        done
+       @echo " INSTALL_DATA $(libdir)/pkgconfig/ext2fs.pc"
+       @$(INSTALL_DATA) ext2fs.pc $(DESTDIR)$(libdir)/pkgconfig/ext2fs.pc
 
 uninstall::
-       $(RM) -f $(DESTDIR)$(libdir)/libext2fs.a
-       $(RM) -rf $(DESTDIR)$(includedir)/ext2fs
+       $(RM) -f $(DESTDIR)$(libdir)/libext2fs.a \
+               $(DESTDIR)$(libdir)/pkgconfig/ext2fs.pc
+       $(RM) -rf $(DESTDIR)$(includedir)/ext2fs 
 
 clean::
        $(RM) -f \#* *.s *.o *.a *~ *.bak core profiled/* checker/* \
diff --git a/lib/ext2fs/ext2fs.pc.in b/lib/ext2fs/ext2fs.pc.in
new file mode 100644 (file)
index 0000000..0a5cd86
--- /dev/null
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: ext2fs
+Description: Ext2fs library
+Version: @E2FSPROGS_VERSION@
+Requires: com_err
+Cflags: -I${includedir} 
+Libs: -L${libdir} -lext2fs
index 99d5d46..941909d 100644 (file)
@@ -1,3 +1,7 @@
+2005-01-26  Theodore Ts'o  <tytso@mit.edu>
+
+       * ss.pc.in: Add pkg-config files.
+
 2005-01-18  Theodore Ts'o  <tytso@mit.edu>
 
        * Makefile.in: Fix the kernel compile-time echo commands to be
index d1282d2..cd3ee2f 100644 (file)
@@ -95,7 +95,7 @@ FILES=        $(SRCS) $(MKCMDSFILES) $(HFILES) \
        ss_err.et std_rqs.ct Makefile \
        test_ss.c ss 
 
-all::  libss.a # libss_p.a lint
+all::  libss.a ss.pc # libss_p.a lint
 
 std_rqs.c: std_rqs.ct mk_cmds
        @echo " MK_CMDS $@"
@@ -120,13 +120,17 @@ mk_cmds: $(DEP_SUBSTITUTE) $(srcdir)/mk_cmds.sh.in
        @$(SUBSTITUTE) $(srcdir)/mk_cmds.sh.in mk_cmds
        @$(CHMOD) +x mk_cmds
 
+ss.pc: $(srcdir)/ss.pc.in $(top_builddir)/config.status
+       @echo " CONFIG.STATUS $@"
+       @cd $(top_builddir); CONFIG_FILES=lib/ss/ss.pc ./config.status
+
 installdirs::
        @echo " MKINSTALLDIRS $(libdir) $(includedir)/ss $(datadir)/ss $(bindir)"
        @$(MKINSTALLDIRS) $(DESTDIR)$(libdir) \
                $(DESTDIR)$(includedir)/ss $(DESTDIR)$(datadir)/ss \
-               $(DESTDIR)$(bindir)
+               $(DESTDIR)$(bindir) $(DESTDIR)$(libdir)/pkgconfig
 
-install:: libss.a $(INSTALL_HFILES) installdirs ss_err.h mk_cmds
+install:: libss.a $(INSTALL_HFILES) installdirs ss_err.h mk_cmds ss.pc
        @echo " INSTALL_DATA $(DESTDIR)$(libdir)/libss.a"
        @$(INSTALL_DATA) libss.a $(DESTDIR)$(libdir)/libss.a
        @-$(RANLIB) $(DESTDIR)$(libdir)/libss.a
@@ -146,13 +150,17 @@ install:: libss.a $(INSTALL_HFILES) installdirs ss_err.h mk_cmds
        @$(INSTALL) mk_cmds $(DESTDIR)$(bindir)/mk_cmds
        @echo " INSTALL_DATA $(man1dir)/mk_cmds.1"
        @$(INSTALL_DATA) $(srcdir)/mk_cmds.1 $(DESTDIR)$(man1dir)/mk_cmds.1
+       @echo " INSTALL_DATA $(libdir)/pkgconfig/ss.pc"
+       @$(INSTALL_DATA) ss.pc $(DESTDIR)$(libdir)/pkgconfig/ss.pc
 
 uninstall::
-       $(RM) -f $(DESTDIR)$(libdir)/libss.a $(DESTDIR)$(bindir)/mk_cmds
+       $(RM) -f $(DESTDIR)$(libdir)/libss.a $(DESTDIR)$(bindir)/mk_cmds \
+               $(DESTDIR)$(libdir)/pkgconfig/ss.pc \
+               $(DESTDIR)$(man1dir)/mk_cmds.1 
        $(RM) -rf $(DESTDIR)$(includedir)/ss $(DESTDIR)$(datadir)/ss
 
 clean::
-       $(RM) -f ../libss.a libss.a mk_cmds ss_err.h ss_err.c std_rqs.c \
+       $(RM) -f ../libss.a libss.a mk_cmds ss_err.h ss_err.c std_rqs.c ss.pc \
                *.o *~ \#* *.bak core 
 
 mostlyclean:: clean
diff --git a/lib/ss/ss.pc.in b/lib/ss/ss.pc.in
new file mode 100644 (file)
index 0000000..0218fd5
--- /dev/null
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: ss
+Description: Subsystem command parsing library
+Version: @E2FSPROGS_VERSION@
+Requires: com_err
+Cflags: -I${includedir} 
+Libs: -L${libdir} -lss @DLOPEN_LIB@
index 0a76257..c17aee2 100644 (file)
@@ -1,3 +1,7 @@
+2005-01-26  Theodore Ts'o  <tytso@mit.edu>
+
+       * uuid.pc.in: Add pkg-config files.
+
 2005-01-18  Theodore Ts'o  <tytso@mit.edu>
 
        * Makefile.in: Fix the kernel compile-time echo commands to be
index 010233e..358776b 100644 (file)
@@ -67,7 +67,7 @@ BSDLIB_INSTALL_DIR = $(root_libdir)
 @ELF_CMT@      @$(CC) $(ALL_CFLAGS) -fPIC -o elfshared/$*.o -c $<
 @BSDLIB_CMT@   @$(CC) $(ALL_CFLAGS) $(BSDLIB_PIC_FLAG) -o pic/$*.o -c $<
 
-all:: tst_uuid uuid_time $(SMANPAGES)
+all:: tst_uuid uuid_time $(SMANPAGES) uuid.pc
 
 $(top_builddir)/lib/uuid/uuid_types.h: $(srcdir)/uuid_types.h.in $(top_builddir)/config.status
        cd $(top_builddir); CONFIG_FILES=$(my_dir)/uuid_types.h ./config.status
@@ -121,10 +121,15 @@ uuid_unparse.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_unparse.3.in
        @echo " SUBST $@"
        @$(SUBSTITUTE_UPTIME) $(srcdir)/uuid_unparse.3.in uuid_unparse.3
 
+uuid.pc: $(srcdir)/uuid.pc.in $(top_builddir)/config.status
+       @echo " CONFIG.STATUS $@"
+       @cd $(top_builddir); CONFIG_FILES=lib/uuid/uuid.pc ./config.status
+
 installdirs::
        @echo " MKINSTALLDIRS $(libdir) $(includedir)/uuid $(man3dir)"
        @$(MKINSTALLDIRS) $(DESTDIR)$(libdir)  \
-               $(DESTDIR)$(includedir)/uuid $(DESTDIR)$(man3dir)
+               $(DESTDIR)$(includedir)/uuid $(DESTDIR)$(man3dir) \
+               $(DESTDIR)$(libdir)/pkgconfig
 
 install:: all installdirs 
        @echo " INSTALL_DATA $(libdir)/libuuid.a"
@@ -144,9 +149,12 @@ install:: all installdirs
        @$(LN) -f $(DESTDIR)$(man3dir)/uuid_generate.3 $(DESTDIR)$(man3dir)/uuid_generate_random.3
        @echo " LINK $(man3dir)/uuid_generate_time.3"
        @$(LN) -f $(DESTDIR)$(man3dir)/uuid_generate.3 $(DESTDIR)$(man3dir)/uuid_generate_time.3
+       @echo " INSTALL_DATA $(libdir)/pkgconfig/uuid.pc"
+       @$(INSTALL_DATA) uuid.pc $(DESTDIR)$(libdir)/pkgconfig/uuid.pc
 
 uninstall::
-       $(RM) -f $(DESTDIR)$(libdir)/libuuid.a
+       $(RM) -f $(DESTDIR)$(libdir)/libuuid.a \
+               $(DESTDIR)$(libdir)/pkgconfig/uuid.pc
        for i in $(SMANPAGES); do \
                $(RM) -f $(DESTDIR)$(man3dir)/$$i; \
        done
diff --git a/lib/uuid/uuid.pc.in b/lib/uuid/uuid.pc.in
new file mode 100644 (file)
index 0000000..e15a2be
--- /dev/null
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: uuid
+Description: Universally unique id library
+Version: @E2FSPROGS_VERSION@
+Requires: 
+Cflags: -I${includedir} 
+Libs: -L${libdir} -luuid