]> granicus.if.org Git - graphviz/commitdiff
libgen (for basename function) is a separate library on SGIs
authorellson <devnull@localhost>
Thu, 6 Jan 2005 02:08:00 +0000 (02:08 +0000)
committerellson <devnull@localhost>
Thu, 6 Jan 2005 02:08:00 +0000 (02:08 +0000)
cmd/dot/Makefile.am
configure.ac

index 9cf8e8f0cee52727523a0b32e877cdd56f332d53..b25cdf0944f78bc2b4adaa8bf27373e9486d0ebc 100644 (file)
@@ -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:
index 7795cde756d64e13b3bd94c17129094e3bb010c6..d8304c200e1a148b856eb38277a2ab57cc445005 100644 (file)
@@ -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