From b9770cb473c189e38574f2c723716c487aad5856 Mon Sep 17 00:00:00 2001 From: ellson Date: Thu, 26 Jul 2007 18:21:54 +0000 Subject: [PATCH] upgrade mylibgd tree to gd-2.0.35 use system gd-2.0.34 or later on fc7 or later distros --- cmd/dot/Makefile.am | 12 ++-- configure.ac | 129 ++++++++++++------------------------ contrib/diffimg/Makefile.am | 3 +- graphviz.spec.in | 2 + lib/gd/Makefile.am | 2 +- 5 files changed, 52 insertions(+), 96 deletions(-) diff --git a/cmd/dot/Makefile.am b/cmd/dot/Makefile.am index 455d39164..d5abe0165 100644 --- a/cmd/dot/Makefile.am +++ b/cmd/dot/Makefile.am @@ -81,7 +81,7 @@ dot_static_LDADD = \ $(top_builddir)/lib/graph/libgraph_C.la \ $(top_builddir)/lib/cdt/libcdt_C.la \ $(top_builddir)/lib/gd/libgvgd_C.la \ - @ICONV_LIBS@ @FC_LIBS@ @FT_LIBS@ @JPEG_LIBS@ @PNG_LIBS@ @EXPAT_LIBS@ @Z_LIBS@ @LIBGEN_LIBS@ @LIBLTDL@ @SOCKET_LIBS@ @IPSEPCOLA_LIBS@ @PANGOCAIRO_LIBS@ @MATH_LIBS@ + @ICONV_LIBS@ @FONTCONFIG_LIBS@ @FREETYPE2_LIBS@ @JPEG_LIBS@ @PNG_LIBS@ @EXPAT_LIBS@ @Z_LIBS@ @LIBGEN_LIBS@ @LIBLTDL@ @SOCKET_LIBS@ @IPSEPCOLA_LIBS@ @PANGOCAIRO_LIBS@ @MATH_LIBS@ else dot_static_LDADD = \ $(top_builddir)/plugin/dot_layout/.libs/libgvplugin_dot_layout_C.a \ @@ -93,7 +93,7 @@ dot_static_LDADD = \ $(top_builddir)/lib/graph/libgraph_C.la \ $(top_builddir)/lib/cdt/libcdt_C.la \ $(top_builddir)/lib/gd/libgvgd_C.la \ - @ICONV_LIBS@ @FC_LIBS@ @FT_LIBS@ @JPEG_LIBS@ @PNG_LIBS@ @EXPAT_LIBS@ @Z_LIBS@ @LIBGEN_LIBS@ @LIBLTDL@ @SOCKET_LIBS@ @IPSEPCOLA_LIBS@ @MATH_LIBS@ + @ICONV_LIBS@ @FONTCONFIG_LIBS@ @FREETYPE2_LIBS@ @JPEG_LIBS@ @PNG_LIBS@ @EXPAT_LIBS@ @Z_LIBS@ @LIBGEN_LIBS@ @LIBLTDL@ @SOCKET_LIBS@ @IPSEPCOLA_LIBS@ @MATH_LIBS@ endif else dot_static_LDADD = \ @@ -106,7 +106,7 @@ dot_static_LDADD = \ $(top_builddir)/lib/pathplan/libpathplan_C.la \ $(top_builddir)/lib/graph/libgraph_C.la \ $(top_builddir)/lib/cdt/libcdt_C.la \ - @GD_LIBS@ @ICONV_LIBS@ @FC_LIBS@ @FT_LIBS@ @JPEG_LIBS@ @PNG_LIBS@ @EXPAT_LIBS@ @Z_LIBS@ @LIBGEN_LIBS@ @LIBLTDL@ @SOCKET_LIBS@ @IPSEPCOLA_LIBS@ @PANGOCAIRO_LIBS@ @MATH_LIBS@ + @GD_LIBS@ @ICONV_LIBS@ @FONTCONFIG_LIBS@ @FREETYPE2_LIBS@ @JPEG_LIBS@ @PNG_LIBS@ @EXPAT_LIBS@ @Z_LIBS@ @LIBGEN_LIBS@ @LIBLTDL@ @SOCKET_LIBS@ @IPSEPCOLA_LIBS@ @PANGOCAIRO_LIBS@ @MATH_LIBS@ endif dot_builtins_SOURCES = dot.c $(top_srcdir)/lib/gvc/dot_builtins.c $(top_srcdir)/lib/gvc/no_demand_loading.c @@ -123,7 +123,7 @@ dot_builtins_LDADD = \ $(top_builddir)/lib/graph/libgraph.la \ $(top_builddir)/lib/cdt/libcdt.la \ $(top_builddir)/lib/gd/libgvgd_C.la \ - @ICONV_LIBS@ @FC_LIBS@ @FT_LIBS@ @JPEG_LIBS@ @PNG_LIBS@ @EXPAT_LIBS@ @Z_LIBS@ @LIBGEN_LIBS@ @LIBLTDL@ @SOCKET_LIBS@ @IPSEPCOLA_LIBS@ @PANGOCAIRO_LIBS@ @MATH_LIBS@ + @ICONV_LIBS@ @FONTCONFIG_LIBS@ @FREETYPE2_LIBS@ @JPEG_LIBS@ @PNG_LIBS@ @EXPAT_LIBS@ @Z_LIBS@ @LIBGEN_LIBS@ @LIBLTDL@ @SOCKET_LIBS@ @IPSEPCOLA_LIBS@ @PANGOCAIRO_LIBS@ @MATH_LIBS@ else dot_builtins_LDADD = \ $(top_builddir)/plugin/dot_layout/libgvplugin_dot_layout.la \ @@ -135,7 +135,7 @@ dot_builtins_LDADD = \ $(top_builddir)/lib/graph/libgraph.la \ $(top_builddir)/lib/cdt/libcdt.la \ $(top_builddir)/lib/gd/libgvgd_C.la \ - @ICONV_LIBS@ @FC_LIBS@ @FT_LIBS@ @JPEG_LIBS@ @PNG_LIBS@ @EXPAT_LIBS@ @Z_LIBS@ @LIBGEN_LIBS@ @LIBLTDL@ @SOCKET_LIBS@ @IPSEPCOLA_LIBS@ @MATH_LIBS@ + @ICONV_LIBS@ @FONTCONFIG_LIBS@ @FREETYPE2_LIBS@ @JPEG_LIBS@ @PNG_LIBS@ @EXPAT_LIBS@ @Z_LIBS@ @LIBGEN_LIBS@ @LIBLTDL@ @SOCKET_LIBS@ @IPSEPCOLA_LIBS@ @MATH_LIBS@ endif else dot_builtins_LDADD = \ @@ -148,7 +148,7 @@ dot_builtins_LDADD = \ $(top_builddir)/lib/pathplan/libpathplan.la \ $(top_builddir)/lib/graph/libgraph.la \ $(top_builddir)/lib/cdt/libcdt.la \ - @GD_LIBS@ @ICONV_LIBS@ @FC_LIBS@ @FT_LIBS@ @JPEG_LIBS@ @PNG_LIBS@ @EXPAT_LIBS@ @Z_LIBS@ @LIBGEN_LIBS@ @LIBLTDL@ @SOCKET_LIBS@ @IPSEPCOLA_LIBS@ @PANGOCAIRO_LIBS@ @MATH_LIBS@ + @GD_LIBS@ @ICONV_LIBS@ @FONTCONFIG_LIBS@ @FREETYPE2_LIBS@ @JPEG_LIBS@ @PNG_LIBS@ @EXPAT_LIBS@ @Z_LIBS@ @LIBGEN_LIBS@ @LIBLTDL@ @SOCKET_LIBS@ @IPSEPCOLA_LIBS@ @PANGOCAIRO_LIBS@ @MATH_LIBS@ endif diff --git a/configure.ac b/configure.ac index 9cce7660a..5cd00a9c8 100644 --- a/configure.ac +++ b/configure.ac @@ -1362,6 +1362,29 @@ AC_SUBST(PANGOCAIRO_LIBS) fi AM_CONDITIONAL(WITH_PANGOCAIRO, [test "x$HAVE_PANGOCAIRO" != "x"]) +dnl ----------------------------------- +dnl INCLUDES and LIBS for FREETYPE2 + +AC_ARG_WITH(freetype2, + [AC_HELP_STRING([--with-freetype2], + [use freetype2 library])]) + +### default is to build with freetype2 +if test "x$with_freetype2" != "xno"; then + with_freetype2=yes +fi + +if test "x$with_freetype2" = "xyes"; then +PKG_CHECK_MODULES(FREETYPE2, [freetype2], + [HAVE_FREETYPE2=1 + AC_DEFINE_UNQUOTED(HAVE_FREETYPE2,1, + [Define if you have the freetype2 library])], + [AC_MSG_WARN(freetype2 library not available)]) +AC_SUBST(FREETYPE2_CFLAGS) +AC_SUBST(FREETYPE2_LIBS) +fi +AM_CONDITIONAL(WITH_FREETYPE2, [test "x$HAVE_FREETYPE2" != "x"]) + dnl ----------------------------------- dnl INCLUDES and LIBS for FONTCONFIG @@ -1375,7 +1398,7 @@ if test "x$with_fontconfig" != "xno"; then fi if test "x$with_fontconfig" = "xyes"; then -PKG_CHECK_MODULES(FONTCONFIG, [fontconfig >= 1.0], +PKG_CHECK_MODULES(FONTCONFIG, [fontconfig], [HAVE_FONTCONFIG=1 AC_DEFINE_UNQUOTED(HAVE_FONTCONFIG,1, [Define if you have the fontconfig library])], @@ -1567,6 +1590,24 @@ AC_SUBST(HAVE_LIBGD) AM_CONDITIONAL(WITH_LIBGD, [test "x$with_libgd" = "xyes"]) AM_CONDITIONAL(WITH_MYLIBGD, [test "x$with_mylibgd" = "xyes"]) +dnl ---------------------------------- +dnl INCLUDES and LIBS for FREETYPE2 (only with mylibgd) + +if test "x$with_mylibgd" = "xyes"; then +if test "x$HAVE_FREETYPE2" != "x"; then +AC_DEFINE_UNQUOTED(HAVE_GD_FREETYPE,1,[Define if the GD library has the GD_FREETYPE feature]) +fi +fi + +dnl ---------------------------------- +dnl INCLUDES and LIBS for FONTCONFIG (only with mylibgd) + +if test "x$with_mylibgd" = "xyes"; then +if test "x$HAVE_FONTCONFIG" != "x"; then +AC_DEFINE_UNQUOTED(HAVE_GD_FONTCONFIG,1,[Define if the GD library has the GD_FONTCONFIG feature]) +fi +fi + dnl ----------------------------------- dnl INCLUDES and LIBS for ICONV (only with mylibgd) @@ -1606,92 +1647,6 @@ AC_SUBST(ICONV_LIBS) fi -dnl ---------------------------------- -dnl INCLUDES and LIBS for FREETYPE (only with mylibgd) - -if test "x$with_mylibgd" = "xyes"; then - -dnl FreeType configure tests snarfed from libgd ..from libwmf .. - - FREETYPE_DIR="yes" - AC_ARG_WITH(freetype, - [ --with-freetype=DIR where to find the freetype 2.x library], - FREETYPE_DIR=$withval) - - ### default is to build with freetype - if test "x$with_freetype" = "xno"; then - AC_MSG_WARN(Optional FREETYPE library disabled) - else - - if test "x$FREETYPE_DIR" = "xyes"; then - AC_PATH_PROG(FREETYPE_CONFIG,freetype-config) - else - AC_PATH_PROG(FREETYPE_CONFIG,freetype-config,,[$FREETYPE_DIR/bin:$PATH]) - fi - - if test -n "$FREETYPE_CONFIG"; then - if test "x$FREETYPE_DIR" != "xyes"; then - FT_INCLUDES="`$FREETYPE_CONFIG --cflags` -I$FREETYPE_DIR/include" - else - FT_INCLUDES=`$FREETYPE_CONFIG --cflags` - fi - ft_libtool=`$FREETYPE_CONFIG --libtool` - # check that it really exists (FreeBSD apparently forgot to insttall it!) - if test -f "$ft_libtool"; then - FT_LIBTOOL="$ft_libtool" - else - FT_LIBTOOL="" - fi - FT_LIBS=`$FREETYPE_CONFIG --libs` - FT_LDFLAGS=`echo " $FT_LIBS" |sed 's/ -l[[^ ]][[^ ]]*//g'` - else - if test "x$FREETYPE_DIR" != "xyes"; then - FT_INCLUDES="-I$FREETYPE_DIR/include/freetype2 -I$FREETYPE_DIR/include" - FT_LDFLAGS="-L$FREETYPE_DIR/lib" - FT_LIBS="-lfreetype" - else - FT_INCLUDES="" - FT_LDFLAGS="" - FT_LIBS="" - fi - FT_LIBTOOL="" - fi - - save_CPPFLAGS=$CPPFLAGS - save_LDFLAGS=$LDFLAGS - CPPFLAGS="$CPPFLAGS $FT_INCLUDES" - LDFLAGS="$LDFLAGS $FT_LDFLAGS" - AC_CHECK_HEADERS(ft2build.h) - if test `eval echo '${'$as_ac_Header'}'` = yes; then - AC_CHECK_LIB(freetype,main, - [FT_LIBS="$FT_LIBTOOL $FT_LIBS" - AC_DEFINE_UNQUOTED(HAVE_GD_FREETYPE,1,[Define if the GD library has the GD_FREETYPE feature]) - AC_DEFINE_UNQUOTED(HAVE_LIBFREETYPE,1,[Define if you have the FREETYPE2 library])], - [AC_MSG_WARN(Optional FREETYPE2 library not available - no libfreetype.)]) - else - AC_MSG_WARN(Optional FREETYPE2 library not available - no ft2build.h) - fi - CPPFLAGS=$save_CPPFLAGS - LDFLAGS=$save_LDFLAGS - AC_SUBST(FT_INCLUDES) - AC_SUBST(FT_LIBS) - fi -fi - -dnl ---------------------------------- -dnl INCLUDES and LIBS for FONTCONFIG (only with mylibgd) - -if test "x$with_mylibgd" = "xyes"; then -if test "x$HAVE_FONTCONFIG" != "x"; then -FC_INCLUDES="$FONTCONFIG_INCLUDES" -FC_LIBS="$FONTCONFIG_LIBS" -AC_DEFINE_UNQUOTED(HAVE_GD_FONTCONFIG,1,[Define if the GD library has the GD_FONTCONFIG feature]) -AC_DEFINE_UNQUOTED(HAVE_LIBFONTCONFIG,1,[Define if you have the FONTCONFIG library])], -AC_SUBST(FC_INCLUDES) -AC_SUBST(FC_LIBS) -fi -fi - dnl ----------------------------------- dnl INCLUDES and LIBS for PNG (only with mylibgd) diff --git a/contrib/diffimg/Makefile.am b/contrib/diffimg/Makefile.am index 43d220ff2..c0a84ced1 100644 --- a/contrib/diffimg/Makefile.am +++ b/contrib/diffimg/Makefile.am @@ -13,7 +13,7 @@ diffimg_SOURCES = diffimg.c if WITH_MYLIBGD diffimg_LDADD = $(top_builddir)/lib/gd/libgvgd_C.la \ - @FC_LIBS@ @FT_LIBS@ @JPEG_LIBS@ @PNG_LIBS@ @Z_LIBS@ @MATH_LIBS@ + @FONTCONFIG_LIBS@ @FREETYPE2_LIBS@ @JPEG_LIBS@ @PNG_LIBS@ @Z_LIBS@ @MATH_LIBS@ else diffimg_LDADD = @GD_LIBS@ @MATH_LIBS@ endif @@ -28,4 +28,3 @@ test: diffimg if `./diffimg hello1.png hello2.png >test2.png`;then echo same;else echo different;fi CLEANFILES = *.png - diff --git a/graphviz.spec.in b/graphviz.spec.in index dae6dc440..39d7652c8 100644 --- a/graphviz.spec.in +++ b/graphviz.spec.in @@ -115,6 +115,8 @@ BuildRequires: cairo-devel >= 1.1.10 pango-devel gmp-devel lua-devel gtk2-devel %endif %if "%fedora" >= "7" BuildRequires: gtk2-devel libgnomeui-devel +BuildRequires: gd gd-devel +%define MYLIBGD --without-mylibgd %endif %endif diff --git a/lib/gd/Makefile.am b/lib/gd/Makefile.am index c263c09ce..ea913c5da 100644 --- a/lib/gd/Makefile.am +++ b/lib/gd/Makefile.am @@ -3,7 +3,7 @@ html = gd.html -AM_CPPFLAGS = @FT_INCLUDES@ @FC_INCLUDES@ @PNG_INCLUDES@ @JPEG_INCLUDES@ @Z_INCLUDES@ +AM_CPPFLAGS = @FREETYPE2_CFLAGS@ @FONTCONFIG_CFLAGS@ @PNG_INCLUDES@ @JPEG_INCLUDES@ @Z_INCLUDES@ htmldir = $(pkgdatadir)/doc/html -- 2.40.0