diff --git a/Makefile.am b/Makefile.am index b14d5e1..0a6ebc9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,3 +3,8 @@ ACLOCAL_AMFLAGS = -I config SUBDIRS = include examples docs tests msc config +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = $(PACKAGE).pc +EXTRA_DIST = $(PACKAGE).pc.in + +DISTCLEANFILES = $(PACKAGE).pc diff --git a/configure.in b/configure.in index a8420f3..2a8e028 100644 --- a/configure.in +++ b/configure.in @@ -11,7 +11,11 @@ AC_CHECK_PROG(DOT,dot,YES,NO) AC_PROG_RANLIB AC_PROG_INSTALL BB_ENABLE_DOXYGEN + +AM_CONDITIONAL([HAVE_GNU_COMPILERS], [test x$ac_cv_cxx_compiler_gnu = xyes]) + AC_OUTPUT([ Makefile \ + tclap.pc examples/Makefile \ include/Makefile \ include/tclap/Makefile \ diff --git a/docs/Makefile.am b/docs/Makefile.am index 2228d1d..43c6f98 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -10,7 +10,20 @@ all: endif -EXTRA_DIST = index.html manual.html style.css manual.xml +EXTRA_DIST = manual.xml +dist_doc_DATA = index.html manual.html style.css + +install-data-local : + $(MKDIR_P) $(DESTDIR)$(docdir)/html + cp -R html $(DESTDIR)$(docdir)/html + +uninstall-local : + chmod -R +w $(DESTDIR)$(docdir)/html + rm -rf $(DESTDIR)$(docdir)/html + +dist-hook : + $(MKDIR_P) $(distdir)/html + cp -R html $(distdir) clean-local: $(RM) -rf html diff --git a/examples/Makefile.am b/examples/Makefile.am index e4d88aa..4ba159f 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -25,4 +25,6 @@ test19_SOURCES = test19.cpp AM_CPPFLAGS = -I$(top_srcdir)/include -AM_CXXFLAGS = -Wall -Wextra +if HAVE_GNU_COMPILERS + AM_CXXFLAGS = -Wall -Wextra +endif diff --git a/tclap.pc.in b/tclap.pc.in new file mode 100644 index 0000000..8e8129b --- /dev/null +++ b/tclap.pc.in @@ -0,0 +1,7 @@ +prefix=@prefix@ +includedir=@includedir@ + +Name: tclap +Description: Templatized C++ Command Line Parser +Version: @VERSION@ +Cflags: -I${includedir}