From fd3837ec269060644f9bb7a883ae89915a064169 Mon Sep 17 00:00:00 2001 From: ellson Date: Thu, 6 Jan 2005 02:08:00 +0000 Subject: [PATCH] libgen (for basename function) is a separate library on SGIs --- cmd/dot/Makefile.am | 4 ++-- configure.ac | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/cmd/dot/Makefile.am b/cmd/dot/Makefile.am index 9cf8e8f0c..b25cdf094 100644 --- a/cmd/dot/Makefile.am +++ b/cmd/dot/Makefile.am @@ -40,7 +40,7 @@ if DISABLE_GVRENDER dot_LDADD = \ $(top_builddir)/lib/common/libcommon.la \ $(top_builddir)/lib/gvc/libgvc.la \ - $(top_builddir)/plugin/layout/libgvplugin_layout.la + $(top_builddir)/plugin/layout/libgvplugin_layout.la @LIBGEN_LIBS@ else dot_LDADD = \ $(top_builddir)/lib/common/libcommon.la \ @@ -48,7 +48,7 @@ dot_LDADD = \ $(top_builddir)/plugin/cairo/libgvplugin_cairo.la \ $(top_builddir)/plugin/gd/libgvplugin_gd.la \ $(top_builddir)/plugin/text/libgvplugin_text.la \ - $(top_builddir)/plugin/layout/libgvplugin_layout.la @CAIRO_LIBS@ + $(top_builddir)/plugin/layout/libgvplugin_layout.la @CAIRO_LIBS@ @LIBGEN_LIBS@ endif install-data-hook: diff --git a/configure.ac b/configure.ac index 7795cde75..d8304c200 100644 --- a/configure.ac +++ b/configure.ac @@ -980,6 +980,20 @@ fi AC_SUBST(CAIRO_CFLAGS) AC_SUBST(CAIRO_LIBS) +dnl ----------------------------------- +dnl INCLUDES and LIBS for libgen (provides basename function) + +save_CPPFLAGS=$CPPFLAGS +save_LDFLAGS=$LDFLAGS +AC_CHECK_HEADER(libgen.h, + AC_CHECK_LIB(gen,basename, + [LIBGEN_LIBS="-lgen" + AC_DEFINE_UNQUOTED(HAVE_LIBGEN,1,[Define if the LIBGEN library has the basename feature])]), + AC_MSG_WARN(libgen.h header not available)) +LDFLAGS=$save_LDFLAGS +CPPFLAGS=$save_CPPFLAGS +AC_SUBST(LIBGEN_LIBS) + # ----------------------------------- # Checks for library functions -- 2.40.0