1 # Process this file with autoconf to produce a configure script
4 dnl ===========================================================================
5 dnl Set Graphviz version information
8 # graphviz_version_major
9 # graphviz_version_minor
10 # graphviz_version_micro
11 # graphviz_version_date
12 # graphviz_change_date
13 # graphviz_author_name
14 # graphviz_author_email
15 # graphviz_version_commit
16 m4_include(./version.m4)
18 AC_INIT([graphviz],[graphviz_version_major().graphviz_version_minor().graphviz_version_micro()],
19 [https://gitlab.com/graphviz/graphviz/-/issues])
21 GRAPHVIZ_VERSION_MAJOR=graphviz_version_major()
22 GRAPHVIZ_VERSION_MINOR=graphviz_version_minor()
23 GRAPHVIZ_VERSION_MICRO=graphviz_version_micro()
25 # NB: date/time of last commit - or "0"
26 GRAPHVIZ_VERSION_DATE=graphviz_version_date()
28 GRAPHVIZ_GIT_DATE=graphviz_git_date()
29 GRAPHVIZ_AUTHOR_NAME=graphviz_author_name()
30 GRAPHVIZ_AUTHOR_EMAIL=graphviz_author_email()
31 GRAPHVIZ_CHANGE_DATE=graphviz_change_date()
33 # NB: git commit hash of last commit
34 GRAPHVIZ_VERSION_COMMIT=graphviz_version_commit()
36 GRAPHVIZ_SOURCES=graphviz/SOURCES
38 AC_SUBST([GRAPHVIZ_VERSION_MAJOR])
39 AC_SUBST([GRAPHVIZ_VERSION_MINOR])
40 AC_SUBST([GRAPHVIZ_VERSION_MICRO])
41 AC_SUBST([GRAPHVIZ_VERSION_DATE])
42 AC_SUBST([GRAPHVIZ_GIT_DATE])
43 AC_SUBST([GRAPHVIZ_AUTHOR_NAME])
44 AC_SUBST([GRAPHVIZ_AUTHOR_EMAIL])
45 AC_SUBST([GRAPHVIZ_CHANGE_DATE])
46 AC_SUBST([GRAPHVIZ_VERSION_COMMIT])
47 AC_SUBST([GRAPHVIZ_SOURCES])
49 dnl ===========================================================================
51 # libtool shared library version for plugins
53 # Increment if the interface has additions, changes, removals.
56 # Increment any time the source changes; set to
57 # 0 if you increment CURRENT
60 # Increment if any interfaces have been added; set to 0
61 # if any interfaces have been removed. removal has
62 # precedence over adding, so set to 0 if both happened.
65 GVPLUGIN_CONFIG_FILE="config$GVPLUGIN_CURRENT"
66 AC_DEFINE_UNQUOTED(GVPLUGIN_CONFIG_FILE,"$GVPLUGIN_CONFIG_FILE",[Filename for plugin configuration file.])
67 AC_SUBST([GVPLUGIN_CONFIG_FILE])
69 GVPLUGIN_VERSION_INFO="$GVPLUGIN_CURRENT:$GVPLUGIN_REVISION:$GVPLUGIN_AGE"
70 AC_SUBST([GVPLUGIN_VERSION_INFO])
72 dnl ===========================================================================
75 AC_CONFIG_SRCDIR([configure.ac])
76 AC_CONFIG_AUX_DIR([config])
77 AC_CONFIG_MACRO_DIR([m4])
79 dnl -----------------------------------
80 dnl Checks for system type
84 # This nonsense drives me crazy!!
86 *irix* | *nonstopux* )
87 GVPLUGIN_VERSION=`expr $GVPLUGIN_CURRENT + 1`
90 GVPLUGIN_VERSION=$GVPLUGIN_CURRENT
93 AC_DEFINE_UNQUOTED(GVPLUGIN_VERSION,$GVPLUGIN_VERSION,[Compatibility version number for plugins.])
94 AC_SUBST([GVPLUGIN_VERSION])
96 GRAPHVIZ_VERSION_BUILD=0
97 GRAPHVIZ_VERSION_REVISION=0
99 *uwin* | *cygwin* | *mingw32* )
100 # Windows version numbers
101 # For the build number: months since Jan 2000, day of month from the timestamp
102 # For the revision number: hour, minute from the timestamp
103 if test $GRAPHVIZ_VERSION_MICRO != "0"; then
104 GRAPHVIZ_VERSION_BUILD=`expr \( ${GRAPHVIZ_VERSION_MICRO:0:4} - 2000 \) \* 12 + ${GRAPHVIZ_VERSION_MICRO:4:2}`${GRAPHVIZ_VERSION_MICRO:6:2}
105 GRAPHVIZ_VERSION_REVISION=${GRAPHVIZ_VERSION_MICRO:9:4}
109 AC_SUBST([GRAPHVIZ_VERSION_BUILD])
110 AC_SUBST([GRAPHVIZ_VERSION_REVISION])
112 AC_ARG_VAR(LIBPOSTFIX, [subscript to lib, e.g. "/64" for "/usr/lib/64" on Solaris])
113 AC_ARG_VAR(INTGOSIZE, [integer size for go, 32 or 64])
114 AC_ARG_VAR(RUBY_VER, [version number of the ruby package])
117 if test -z "$LIBPOSTFIX"; then
120 case "${host_cpu}" in
121 aarch64 | powerpc64 | powerpc64le | s390x | x86_64 | sparc64 | mips64* | riscv64 | e2k )
128 case "${host_cpu}" in
145 DEFAULT_FONTPATH="C:/WINDOWS/FONTS;C:/WINNT/Fonts;C:/winnt/fonts"
152 DEFAULT_FONTPATH="C:/WINDOWS/FONTS;C:/WINNT/Fonts;C:/winnt/fonts"
159 DEFAULT_FONTPATH="C:/WINDOWS/FONTS;C:/WINNT/Fonts;C:/winnt/fonts"
166 AC_DEFINE_UNQUOTED(DARWIN,1,[Define for any Darwin-based OS.])
167 DEFAULT_FONTPATH="~/Library/Fonts:/Library/Fonts:/Network/Library/Fonts:/System/Library/Fonts"
171 AC_DEFINE_UNQUOTED(DARWIN_DYLIB,"$DARWIN_DYLIB",[Define for Darwin-style shared library names.])
178 *darwin9.4* | *darwin9.5* )
179 EXTRA_SMYRNA_LDFLAGS="-dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"
183 * ) # This sucks! Whatever happened to standards for file system layout? (Good job its no longer used unless fontconfig is unavailable.)
184 DEFAULT_FONTPATH="/usr/share/fonts/sun/TrueType:/usr/share/fonts/TrueType:/usr/X11/lib/X11/fonts/TrueType:/usr/share/fonts/sun/Type1:/usr/openwin/lib/X11/fonts/Type1:/usr/share/fonts/X11/Type1:/usr/share/fonts/default/Type1:/usr/X11R6/lib/X11/fonts/TrueType:/usr/X11R6/lib/X11/fonts/truetype:/usr/X11R6/lib/X11/fonts/TTF:/usr/share/fonts/truetype:/usr/openwin/lib/X11/fonts/TrueType:/usr/X11R6/lib/X11/fonts/Type1:/usr/common/share/fonts/ttf";
194 AC_SUBST([EXTRA_SMYRNA_LDFLAGS])
195 JNI_EXTRA_LDFLAGS="-shrext .$JSHEXT"
196 AC_SUBST([JNI_EXTRA_LDFLAGS])
198 AC_DEFINE_UNQUOTED(DEFAULT_FONTPATH,"$DEFAULT_FONTPATH",[Path to TrueType fonts.])
199 AC_DEFINE_UNQUOTED(PATHSEPARATOR,"$PATHSEPARATOR",[Path separator character.])
200 AM_CONDITIONAL(WITH_WIN32, [test "x$UWIN" = "xyes" -o "x$CYGWIN" = "xyes" -o "x$MINGW32" = "xyes"])
201 AM_CONDITIONAL(WITH_DARWIN9, [test "x$DARWIN9" = "xyes"])
202 AM_CONDITIONAL(WITH_CYGWIN, [test "x$CYGWIN" = "xyes"])
203 AM_CONDITIONAL(WITH_MINGW, [test "x$MINGW32" = "xyes"])
206 AC_DEFINE_UNQUOTED(DEFAULT_DPI,$DEFAULT_DPI,Default DPI.)
207 AC_DEFINE_UNQUOTED(BROWSER,"$BROWSER",[Command to open a browser on a URL])
209 AM_INIT_AUTOMAKE([no-define subdir-objects tar-ustar])
211 # Suppress verbose compile lines
212 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
214 AC_CONFIG_HEADERS([config.h])
216 # put BUILDDATE in its own file so that only targets that use it get rebuilt
217 echo "#define BUILDDATE \"$GRAPHVIZ_VERSION_DATE\"" > builddate.h
219 AC_PREFIX_DEFAULT([/usr/local])
220 if test "x${prefix}" = "xNONE"; then
221 prefix=${ac_default_prefix}
225 # automatically check for other dependencies in $prefix first
226 if test "x${prefix}" != "x/usr"; then
227 CPPFLAGS="$CPPFLAGS -I${prefix}/include"
228 LDFLAGS="$LDFLAGS -L${prefix}/lib"
229 PKG_CONFIG_PATH="$prefix/lib/pkgconfig$PATHSEPARATOR$PKG_CONFIG_PATH"
230 export PKG_CONFIG_PATH
233 dnl -----------------------------------
234 # Static/Shared binaries
236 AC_ARG_ENABLE(static,
237 [AS_HELP_STRING([--enable-static],[build static executable])])
238 if test "x$enable_static" = "xyes"; then
243 use_static="No (disabled by default)"
245 AM_CONDITIONAL(ENABLE_STATIC, [test "x$enable_static" = "xyes"])
247 AC_ARG_ENABLE(shared,
248 [AS_HELP_STRING([--enable-shared],[build shared executable])])
249 if test "x$enable_shared" != "xno"; then
253 *uwin* | *cygwin* | *mingw32* )
254 AC_DEFINE_UNQUOTED(GVDLL,1, [Define for DLLs on Windows.])
259 use_shared="No (disabled)"
262 AM_CONDITIONAL(ENABLE_SHARED, [test "x$enable_shared" = "xyes"])
264 dnl -----------------------------------
265 dnl checks for various programs
275 AC_ARG_ENABLE([man-pdfs],
276 [AS_HELP_STRING([--enable-man-pdfs], [Generate PDFs of man pages (default: auto)])])
278 AS_IF([test "x$enable_man_pdfs" != "xno"], [
279 AC_CHECK_PROGS([GROFF], [groff])
280 AS_IF([test "x$enable_man_pdfs" = "xyes" && test -z "$GROFF"], [
281 AC_MSG_ERROR([You requested PDF generation from man pages, but 'groff' could not be found])
284 AC_CHECK_PROGS([PS2PDF], [ps2pdf pstopdf])
285 AS_IF([test "x$enable_man_pdfs" = "xyes" && test -z "$PS2PDF"], [
286 AC_MSG_ERROR([You requested PDF generation from man pages, but neither 'ps2pdf' nor 'pstopdf' could be found])
289 AM_CONDITIONAL([ENABLE_MAN_PDFS], [test "x$enable_man_pdfs" != "xno" && test -n "$GROFF" && test -n "$PS2PDF"])
291 # allow disabling of demos installation
293 [AS_HELP_STRING([--with-demos=DIR], [Install demos (default: $(pkgdatadir)/demo)])])
295 demodir='$(pkgdatadir)/demo'
296 AS_IF([test "$with_demos" != "xyes" && test -n "$with_demos"], [
297 dnl user provided --with-demos=/my/demo/dir
298 demodir="$with_demos"
300 AM_CONDITIONAL([INSTALL_DEMOS], [test "x$with_demos" != "xno"])
307 [AS_HELP_STRING([--with-tclsh=PROG],[use a specific tclsh])],
310 if test "x$TCLSH" = "x"; then
311 AC_PATH_PROGS(TCLSH,[tclsh8.6 tclsh8.5 tclsh8.4 tclsh8.3 tclsh],[],[/usr/bin])
315 dnl -----------------------------------
316 dnl checks for compilers
320 if test "x$ac_cv_prog_cc_c99" = "xno"; then
321 AC_MSG_ERROR([C compiler does not support C99])
324 AX_CXX_COMPILE_STDCXX_11(noext,mandatory)
329 dnl ===========================================================================
330 dnl Set GCC compiler flags
332 if [ test "${GCC}" = "yes" ]
334 # Enable common warnings flags
335 CFLAGS="${CFLAGS} -Wall"
337 # Enable common extra flags
338 CFLAGS="${CFLAGS} -Wextra"
340 # Enable specific warning flags not included by -Wall or -Wextra
341 CFLAGS="${CFLAGS} -Wmissing-include-dirs -Wswitch-default -Wfloat-equal -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs"
343 # Enable additional C99 warnings
344 save_CFLAGS="${CFLAGS}"
346 AX_CHECK_COMPILE_FLAG([-Wtrampolines],
347 [save_CFLAGS="${save_CFLAGS} -Wtrampolines"],[],[-Werror])
348 AX_CHECK_COMPILE_FLAG([-Wlogical-op],
349 [save_CFLAGS="${save_CFLAGS} -Wlogical-op"],[],[-Werror])
350 CFLAGS="${save_CFLAGS}"
351 # if [test "${ac_cv_prog_cc_c99}" != "no"]
353 # FIXME - not available on centos[56]: gcc-4.1.2, gcc-4.4.7
354 # CFLAGS="${CFLAGS} -Wdouble-promotion"
357 # Workaround for native compilers
358 # HP : http://bugs.gnome.org/db/31/3163.html
359 # DEC : Enable NaN/Inf
361 if test "${GCC}" != "yes" ; then
362 AC_CHECK_PROGS(RC,rc,false)
365 CFLAGS="${CFLAGS} -Wp,-H30000"
368 CFLAGS="${CFLAGS} -ieee"
371 CFLAGS="${CFLAGS} -fno-common"
372 LDFLAGS="${LDFLAGS} -Wl,-headerpad_max_install_names"
378 AC_CHECK_PROGS(RC,[windres ${host}-windres],false)
381 # -Wall causes relocation errors with icc
382 CFLAGS="${CFLAGS} -wd269"
383 # icc doesn't like -pipe
384 CFLAGS=`echo ${CFLAGS} | sed 's/ -pipe//'`
385 # icc doesn't like -ffast-math
386 CFLAGS=`echo ${CFLAGS} | sed 's/ -ffast-math//'`
391 CFLAGS="${CFLAGS} -mieee -Wall"
394 CFLAGS="${CFLAGS} -mieee -Wall"
397 CFLAGS="${CFLAGS} -fno-common -Wall"
398 LDFLAGS="${LDFLAGS} -Wl,-headerpad_max_install_names"
401 CFLAGS="${CFLAGS} -Wstrict-prototypes -Wpointer-arith -Wall -ffast-math"
404 CFLAGS="${CFLAGS} -Wno-unknown-pragmas -Wstrict-prototypes -Wpointer-arith -Wall -ffast-math"
410 # -ffast-math is incompatible with FP error trapping
411 # ref: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=175793
412 if `echo ${CFLAGS} | $EGREP ffast-math >/dev/null`; then
413 AC_DEFINE_UNQUOTED(NO_FPERR,1,[Define if no fpu error exception handling is required.])
416 AM_CONDITIONAL(RC_IS_RC, [test "x$RC" = "xrc"])
417 AM_CONDITIONAL(RC_IS_WINDRES, [test "x$RC" = "xwindres"])
420 AC_ARG_ENABLE([debug],
421 AS_HELP_STRING([--enable-debug],[Compile the debug version (default: disabled)]),
422 [enable_debug=$enableval],
424 AM_CONDITIONAL([DEBUG], [test $enable_debug = "yes"])
425 if test "x$enable_debug" = "xyes"; then
426 dnl add -O0 only if GCC or ICC is used
427 if test "$GCC" = "yes" || test "$ICC" = "yes"; then
428 CFLAGS="$CFLAGS -g -O0"
429 CXXFLAGS="$CXXFLAGS -g -O0"
433 dnl -----------------------------------
434 dnl Check for various typedefs and provide substitutes if they do not exist.
445 dnl -----------------------------------
446 dnl Checks for header files
450 fcntl.h search.h stropts.h termios.h \
451 sys/time.h sys/types.h sys/select.h sys/socket.h \
452 sys/stat.h sys/mman.h \
453 sys/ioctl.h sys/inotify.h)
455 # Internationalization macros
458 dnl -----------------------------------
459 dnl Checks for -lm library
462 AC_CHECK_LIB(m, main, [MATH_LIBS="-lm"])
463 AC_SUBST([MATH_LIBS])
465 # Check for functions that might need -lm
466 LIBS="$LIBS $MATH_LIBS"
467 AC_CHECK_FUNCS([sincos])
471 # -----------------------------------
473 # Checks for library functions
474 AC_CHECK_FUNCS([lrand48 drand48 srand48 setmode setenv \
476 ftruncate lseek64 stat64 select dl_iterate_phdr])
478 AC_REPLACE_FUNCS([strcasestr])
480 dnl -----------------------------------
481 dnl libtool ltdl on-demand plugin loading
485 LT_CONFIG_LTDL_DIR([libltdl])
489 [AS_HELP_STRING([--enable-ltdl],[support on-demand plugin loading])])
490 if test "x$enable_ltdl" != "xno"; then
491 AC_DEFINE(ENABLE_LTDL,1,[Define if you want on-demand plugin loading])
493 # The lt_dladvise_init symbol was added with libtool-2.2
494 if test "x$with_included_ltdl" != "xyes"; then
495 save_CFLAGS="$CFLAGS"
496 save_LDFLAGS="$LDFLAGS"
497 CFLAGS="$CFLAGS $LTDLINCL"
498 LDFLAGS="$LDFLAGS $LIBLTDL"
499 AC_CHECK_LIB([ltdl], [lt_dladvise_init], [],
500 [AC_MSG_ERROR([installed libltdl is too old])])
501 LDFLAGS="$save_LDFLAGS"
502 CFLAGS="$save_CFLAGS"
504 if test "x$DARWIN9" = "xyes"; then
505 LIBLTDL_LDFLAGS="-Wl,-unexported_symbol,_lt_*"
509 use_ltdl="No (disabled)"
511 AM_CONDITIONAL(ENABLE_LTDL, [test "x$enable_ltdl" != "xno"])
514 AC_SUBST([LIBLTDL_LDFLAGS])
517 dnl -----------------------------------
518 dnl Checks for X header files.
521 if test "x$no_x" = "xyes"; then
522 use_xlib="No (disabled or unavailable)"
523 AC_MSG_WARN([X11 not available.])
527 #no x11.pc on centos4
528 # PKG_CHECK_MODULES(X11, [x11])
529 PKG_CHECK_MODULES(XRENDER, [xrender],HAVE_XRENDER="yes" ,HAVE_XRENDER="no")
531 AM_CONDITIONAL(WITH_X, [test "x$use_xlib" = "xYes"])
532 AM_CONDITIONAL(WITH_XRENDER, [test "x$,HAVE_XRENDER" = "xyes"])
534 dnl -----------------------------------
535 dnl check for SWIG - needed for script-language bindings
538 [AS_HELP_STRING([--enable-swig=yes],[swig-generated language bindings])],
539 [],[enable_swig=yes])
541 if test "x$enable_swig" != "xyes"; then
542 use_swig="No (disabled)"
544 AC_CHECK_PROG(SWIG,swig,swig)
545 if test "x$SWIG" = "x"; then
546 use_swig="No (swig not available)"
548 SWIG_VERSION=`$SWIG -version 2>&1 | $EGREP Version | cut -d ' ' -f 3`
549 AC_SUBST([SWIG_VERSION])
550 SWIG_VERSION_MAJOR=`echo $SWIG_VERSION | cut -d '.' -f 1`
551 SWIG_VERSION_MINOR=`echo $SWIG_VERSION | cut -d '.' -f 2`
552 SWIG_VERSION_MICRO=`echo $SWIG_VERSION | cut -d '.' -f 3`
553 if test $SWIG_VERSION_MAJOR -lt 2; then
554 if test $SWIG_VERSION_MAJOR -lt 1; then
557 if test $SWIG_VERSION_MINOR -lt 3; then
560 # EL5 has swig-1.3.29 which does not define SWIGJAVA
561 if test $SWIG_VERSION_MICRO -lt 40; then
562 SWIGJAVA_CPPFLAGS=-DSWIGJAVA
563 AC_SUBST([SWIGJAVA_CPPFLAGS])
568 if test "x$SWIG" = "x"; then
569 AC_MSG_WARN([The version of swig is too old.])
570 use_swig="No (swig too old)"
576 AM_CONDITIONAL(WITH_SWIG, [test "x$SWIG" != "x"])
578 dnl -----------------------------------
579 dnl INCLUDES and LIBS for C#
582 [AS_HELP_STRING([--enable-sharp=yes],[C# language bindings])],
583 [],[enable_sharp=yes])
585 if test "x$enable_sharp" != "xyes"; then
586 use_sharp="No (disabled)"
588 if test "x$use_swig" != "xYes"; then
589 use_sharp="No (swig not available)"
591 if test `$SWIG -help 2>&1 | $EGREP -c '\-csharp *- Generate'` = 0; then
592 use_sharp="No (swig does not support -csharp option)"
594 AC_CHECK_PROG(MCS,mcs,mcs)
595 if test "x$MCS" = "x"; then
596 use_sharp="No (mcs not available)"
601 AC_SUBST([SHARP_INCLUDES])
602 AC_SUBST([SHARP_LIBS])
607 AM_CONDITIONAL(WITH_SHARP, [test "x$use_sharp" = "xYes"])
609 dnl -----------------------------------
610 dnl INCLUDES and LIBS for D (disabled by default - incomplete)
613 [AS_HELP_STRING([--enable-d=no],[d language bindings])],
616 if test "x$enable_d" != "xyes"; then
617 use_d="No (disabled by default - incomplete)"
619 if test "x$use_swig" != "xYes"; then
620 use_d="No (swig not available)"
622 if test `$SWIG -help 2>&1 | $EGREP -c '\-d* *- Generate'` = 0 ; then
623 use_d="No (swig does not support -d option)"
625 AC_CHECK_PROG(D,gdc,ldc)
626 if test "x$D" = "x"; then
627 use_d="No (D compiler not available)"
631 if test "x$D" != "x"; then
633 AC_SUBST([D_INCLUDES])
641 AM_CONDITIONAL(WITH_D, [test "x$use_d" = "xYes"])
643 dnl -----------------------------------
644 dnl INCLUDES and LIBS for GO
647 [AS_HELP_STRING([--enable-go=yes],[go language bindings])],
650 if test "x$enable_go" != "xyes"; then
651 use_go="No (disabled)"
653 if test "x$use_swig" != "xYes"; then
654 use_go="No (swig not available)"
656 if test `$SWIG -help 2>&1 | $EGREP -c '\-go* *- Generate'` = 0 ; then
657 use_go="No (swig does not support -go option)"
659 AC_CHECK_PROG(GO,go,go)
660 if test "x$GO" = "x"; then
661 use_go="No (GO compiler not available)"
665 if test "x$GO" != "x"; then
667 AC_SUBST([GO_INCLUDES])
669 AC_SUBST([INTGOSIZE])
675 AM_CONDITIONAL(WITH_GO, [test "x$use_go" = "xYes"])
677 dnl -----------------------------------
678 dnl INCLUDES and LIBS for GUILE
681 [AS_HELP_STRING([--enable-guile=yes],[guile language bindings])],
682 [],[enable_guile=yes])
684 if test "x$enable_guile" != "xyes"; then
685 use_guile="No (disabled)"
687 if test "x$use_swig" != "xYes"; then
688 use_guile="No (swig not available)"
690 if test `$SWIG -help 2>&1 | $EGREP -c '\-guile *- Generate'` = 0; then
691 use_guile="No (swig does not support -guile option)"
693 AC_CHECK_PROGS(GUILE_CONFIG,guile-config2.2 guile-config)
694 if test "x$GUILE_CONFIG" = "x"; then
695 use_guile="No (guile not available)"
697 [GUILE_VERSION=`$GUILE_CONFIG --version 2>&1 | sed -n '1 s/^.* \+\([0-9\.]\+\)$/\1/ p'`]
698 GUILE_VERSION_MAJOR=`echo $GUILE_VERSION | cut -d '.' -f 1`
699 GUILE_VERSION_MINOR=`echo $GUILE_VERSION | cut -d '.' -f 2`
700 AC_CHECK_PROGS(GUILE,guile$GUILE_VERSION_MAJOR.$GUILE_VERSION_MINOR guile$GUILE_VERSION_MAJOR guile)
701 if test 0$GUILE_VERSION_MAJOR -lt 2; then
702 if test 0$GUILE_VERSION_MAJOR -lt 1; then
705 if test 0$GUILE_VERSION_MINOR -lt 4; then
710 if test "x$GUILE_CONFIG" = "x"; then
711 use_guile="No (guile is too old)"
713 GUILE_INCLUDES=$($GUILE_CONFIG compile)
714 GUILE_LIBS=$($GUILE_CONFIG link)
715 # don't die if PKG_CHECK_MODULES not available - el4, el5
716 PKG_CHECK_MODULES([GUILE],
717 [guile-2.0 >= "$GUILE_VERSION_MAJOR.$GUILE_VERSION_MINOR"],
718 GUILE_INCLUDES="$GUILE_CFLAGS",
720 PKG_CHECK_MODULES([GUILE],
721 [guile-1.8 >= "$GUILE_VERSION_MAJOR.$GUILE_VERSION_MINOR"],
722 GUILE_INCLUDES="$GUILE_CFLAGS",
725 ac_save_CFLAGS="$CFLAGS"
726 ac_save_CPPFLAGS="$save_CPPFLAGS"
727 CFLAGS="$CFLAGS $GUILE_INCLUDES"
728 CPPFLAGS="$CPPFLAGS $GUILE_INCLUDES"
729 AC_CHECK_HEADER(libguile.h,,[
730 use_guile="No (guile header missing)"
733 CFLAGS="$ac_save_CFLAGS"
734 CPPFLAGS="$ac_save_CPPFLAGS"
735 if test "x$GUILE" != "x"; then
737 AC_SUBST([GUILE_INCLUDES])
738 AC_SUBST([GUILE_LIBS])
745 AM_CONDITIONAL(WITH_GUILE, [test "x$use_guile" = "xYes"])
747 dnl -----------------------------------
748 dnl INCLUDES and LIBS for IO (disabled until supported by swig)
751 [AS_HELP_STRING([--enable-io=no],[io language bindings])],
754 if test "x$enable_io" != "xyes"; then
755 use_io="No (disabled by default - no swig support yet)"
757 if test "x$use_swig" != "xYes"; then
758 use_io="No (swig not available)"
760 if test `$SWIG -help 2>&1 | $EGREP -c '\-io *- Generate'` = 0; then
761 use_io="No (swig does not support -io option)"
763 AC_CHECK_PROG(IO,io,io)
764 if test "x$IO" = "x"; then
765 use_io="No (io not available)"
770 AC_SUBST([IO_INCLUDES])
776 AM_CONDITIONAL(WITH_IO, [test "x$use_io" = "xYes"])
778 dnl -----------------------------------
779 dnl INCLUDES and LIBS for JAVA
782 [AS_HELP_STRING([--enable-java=yes],[java language bindings])],
783 [], [enable_java=yes])
785 if test "x$enable_java" != "xyes"; then
786 use_java="No (disabled)"
788 if test "x$use_swig" != "xYes"; then
789 use_java="No (swig not available)"
791 if test `$SWIG -help 2>&1 | $EGREP -c '\-java *- Generate'` = 0; then
792 use_java="No (swig does not support -java option)"
794 AC_CHECK_PROG(JAVA,java,java)
795 if test "x$JAVA" = "x"; then
796 use_java="No (java not available)"
798 for try_java_include in \
799 /System/Library/Frameworks/JavaVM.framework/Headers \
800 /usr/lib${LIBPOSTFIX}/jvm/java/include \
801 /usr/lib${LIBPOSTFIX}/jvm/java/include/linux \
802 /usr/lib${LIBPOSTFIX}/jvm/default-java/include \
803 /usr/lib${LIBPOSTFIX}/jvm/default-java/include/linux \
804 /usr/lib/jvm/java/include \
805 /usr/lib/jvm/java/include/linux \
806 /usr/lib/jvm/default-java/include \
807 /usr/lib/jvm/default-java/include/linux \
808 /etc/java-config-2/current-system-vm/include \
809 /etc/java-config-2/current-system-vm/include/linux \
810 /etc/java-config-2/current-system-vm/include/freebsd
812 if test -d "$try_java_include" ; then
813 JAVA_INCLUDES="$JAVA_INCLUDES -I${try_java_include}"
817 AC_ARG_WITH(javaincludedir,
818 [AS_HELP_STRING([--with-javaincludedir=DIR],[use JAVA includes from DIR])],
819 [JAVA_INCLUDES="-I$withval"])
820 AC_ARG_WITH(javalibdir,
821 [AS_HELP_STRING([--with-javalibdir=DIR],[use JAVA libraries from DIR])],
822 [JAVA_LIBS="$withval"])
823 save_CPPFLAGS=$CPPFLAGS
824 CPPFLAGS="$CPPFLAGS $JAVA_INCLUDES"
825 AC_CHECK_HEADER(jni.h,,[
826 use_java="No (missing header)"
829 CPPFLAGS="$save_CPPFLAGS"
830 if test "x$JAVA" != "x"; then
832 AC_SUBST([JAVA_INCLUDES])
833 AC_SUBST([JAVA_LIBS])
839 AM_CONDITIONAL(WITH_JAVA, [test "x$use_java" = "xYes"])
841 dnl -----------------------------------
842 dnl INCLUDES and LIBS for JAVASCRIPT (disabled by default - incomplete)
844 AC_ARG_ENABLE(javascript,
845 [AS_HELP_STRING([--enable-javascript=no],[Javascript language bindings])],
846 [], [enable_javascript=no])
848 if test "x$enable_javascript" != "xyes"; then
849 use_javascript="No (disabled by default - incomplete)"
851 if test "x$use_swig" != "xYes"; then
852 use_javascript="No (swig not available)"
854 if test `$SWIG -help 2>&1 | $EGREP -c '\-javascript* *- Generate'` = 0 ; then
855 use_javascript="No (swig does not support -javascript option)"
857 AC_CHECK_PROG(JAVASCRIPT,js,js)
858 if test "x$JAVASCRIPT" = "x"; then
859 use_javascript="No (JAVASCRIPT compiler not available)"
864 AC_SUBST([JAVASCRIPT_INCLUDES])
865 AC_SUBST([JAVASCRIPT_LIBS])
866 AC_SUBST([INTJAVASCRIPTSIZE])
871 AM_CONDITIONAL(WITH_JAVASCRIPT, [test "x$use_javascript" = "xYes"])
873 dnl -----------------------------------
874 dnl INCLUDES and LIBS for LUA
877 [AS_HELP_STRING([--enable-lua=yes],[lua language bindings])],
878 [], [enable_lua=yes])
880 if test "x$enable_lua" != "xyes"; then
881 use_lua="No (disabled)"
883 if test "x$use_swig" != "xYes"; then
884 use_lua="No (swig not available)"
886 if test `$SWIG -help 2>&1 | $EGREP -c '\-lua *- Generate'` = 0; then
887 use_lua="No (swig does not support -lua option)"
889 AC_CHECK_PROG(LUA,lua,lua)
890 if test "x$LUA" = "x"; then
891 use_lua="No (lua not available)"
893 ac_save_CPPFLAGS="$CPPFLAGS"
894 ac_save_CFLAGS="$CFLAGS"
895 ac_save_LDFLAGS="$LDFLAGS"
897 AC_CHECK_PROG(LUA,lua,lua)
903 if test -n "$lua_inc"; then
904 CFLAGS="$CFLAGS -I$lua_inc"
905 CPPFLAGS="$CPPFLAGS -I$lua_inc"
907 if test -n "$lua_lib"; then
908 LDFLAGS="$LDFLAGS -L$lua_lib"
911 if test "x$LUA_INCLUDES" = "x" -a "x$LUA_LIBS" = "x" ; then
912 if test "x$PKG_CONFIG" != "x"; then
913 AC_MSG_CHECKING(for Lua headers and libraries with pkg-config)
915 for l in "$lua_suffix" "" "53" "5.3" "52" "5.2" "51" "5.1" "50" "5.0" ; do
916 pkgconfig_lua_found=`$PKG_CONFIG --exists lua$l 2>/dev/null`
917 if test "x$?" = "x0" ; then
918 LUA_VERSION=`$PKG_CONFIG --modversion lua$l`
919 LUA_INCLUDES="$LUA_CFLAGS "`$PKG_CONFIG --cflags lua$l`
920 LUA_LIBS="$LUA_LFLAGS "`$PKG_CONFIG --libs lua$l`
921 LUA_INSTALL_DIR="/usr/lib$LIBPOSTFIX/lua/`$PKG_CONFIG --variable=V lua`"
923 pkgconfig_lualib_found=`$PKG_CONFIG --exists lualib$l 2>/dev/null`
924 if test "x$?" = "x0"; then
925 LUA_INCLUDES="$LUA_CFLAGS "`$PKG_CONFIG --cflags lualib$l`
926 LUA_LIBS="$LUA_LFLAGS "`$PKG_CONFIG --libs lualib$l`
934 if test "x$LUA_INCLUDES" = "x" -o "x$LUA_LIBS" = "x" ; then
936 AC_CHECK_PROGS(LUACONFIG, lua-config lua-config52 lua-config5.2 lua-config51 lua-config5.1 lua-config50 lua-config5.0)
937 if test "x$LUACONFIG" != "x" ; then
938 AC_MSG_CHECKING(for Lua headers and libraries with lua-config)
940 LUA_INCLUDES=`$LUACONFIG --include`
941 LUA_LIBS=`$LUACONFIG --libs`
943 LUA_INSTALL_DIR="/usr/lib$LIBPOSTFIX/lua/5.0"
947 if test "x$LUA_INCLUDES" = "x" -o "x$LUA_LIBS" = "x" ; then
948 AC_MSG_CHECKING(for Lua headers and libraries)
950 AC_CHECK_HEADER(lua.h,ac_found_lua_header="yes",ac_found_lua_header="no")
951 AC_CHECK_HEADER(lualib.h,ac_found_liblua_header="yes",ac_found_liblua_header="no")
952 if test "x$ac_found_lua_header" = "xyes" -a "x$ac_found_liblua_header" = "xyes"; then
953 LUA_INCLUDES="$CFLAGS"
955 for l in "$lua_suffix" "" "52" "5.2" "51" "5.1" "50" "5.0" ; do
956 AC_CHECK_LIB(lua$l,lua_call,ac_found_lua_lib="yes",ac_found_lua_lib="no")
957 if test "x$ac_found_lua_lib" = "xyes" ; then
958 LUA_VERSION=">=5.1.0"
960 LUA_LIBS="$LDFLAGS -llua$l -lm"
962 ac2_save_LDFLAGS="$LDFLAGS"
963 LDFLAGS="$LDFLAGS -llua$l -lm"
965 if echo "$host_os" | grep "^linux" 1>/dev/null 2>&1 ; then
966 LDFLAGS="$LDFLAGS -ldl"
969 AC_CHECK_LIB(lualib$l,luaL_openlib,ac_found_liblua_lib="yes",ac_found_liblua_lib="no")
970 if test "x$ac_found_liblua_lib" = "xyes" ; then
973 LUA_LIBS="$LUA_LFLAGS -llualib$l"
975 if echo "$host_os" | grep "^linux" 1>/dev/null 2>&1 ; then
976 LUA_LIBS="$LUA_LFLAGS -ldl"
980 LDFLAGS="$ac2_save_LDFLAGS"
986 AC_MSG_CHECKING(for Lua compiling and linking)
987 LUA_TEST=`LT=luatest.c ; echo "#include <lua.h>" > $LT; echo "#include <lualib.h>" >> $LT; echo "int main() { return 0; }" >> $LT ; $CC -Wall $LT -o $LT.out $LUA_INCLUDES $LUA_LIBS $CFLAGS $LDFLAGS 1>/dev/null 2>&1 ; echo $?; rm -f $LT $LT.out 1>/dev/null 2>&1`
988 if test "x$LUA_TEST" != "x0" ; then
991 *** Lua (>=5.0) headers and/or libraries could not be found in your system.
992 *** Try to install liblua, liblualib and liblua-dev with your software package manager.
993 *** Graphviz will be built without Lua support.])
994 use_lua="No (lua compiling/linking failed)"
997 AC_SUBST([LUA_INCLUDES])
999 AC_SUBST([LUA_INSTALL_DIR])
1000 # Not needed for Graphviz: AC_DEFINE(PLUGIN_LUA)
1002 CFLAGS="$ac_save_CFLAGS"
1003 CPPFLAGS="$ac_save_CPPFLAGS"
1004 LDFLAGS="$ac_save_LDFLAGS"
1009 AM_CONDITIONAL(WITH_LUA, [test "x$use_lua" = "xYes"])
1012 dnl -----------------------------------
1013 dnl INCLUDES and LIBS for OCAML
1015 AC_ARG_ENABLE(ocaml,
1016 [AS_HELP_STRING([--enable-ocaml=yes],[ocaml language bindings])],
1017 [], [enable_ocaml=yes])
1019 if test "x$enable_ocaml" != "xyes"; then
1020 use_ocaml="No (disabled)"
1022 if test "x$use_swig" != "xYes"; then
1023 use_ocaml="No (swig not available)"
1025 if test `$SWIG -help 2>&1 | $EGREP -c '\-ocaml *- Generate'` = 0; then
1026 use_ocaml="No (swig does not support -ocaml option)"
1028 AC_CHECK_PROG(OCAML,ocaml,ocaml)
1029 if test "x$OCAML" = "x"; then
1030 use_ocaml="No (ocaml not available)"
1032 AC_CHECK_PROG(OCAML_OPT,ocamlopt,ocamlopt)
1033 AC_CHECK_PROG(OCAML_C,ocamlc,ocamlc)
1034 if test "x$OCAML_C" != "x"; then
1035 OCAML_INCLUDES=-I`$OCAML_C -where`
1036 OCAML_LIBS=-L`$OCAML_C -where`
1038 save_CPPFLAGS=$CPPFLAGS
1039 CPPFLAGS="$CPPFLAGS $OCAML_INCLUDES"
1040 AC_CHECK_HEADER(caml/mlvalues.h,[
1042 AC_SUBST([OCAML_INCLUDES])
1043 AC_SUBST([OCAML_LIBS])
1045 use_ocaml="No (missing header)"
1046 AC_MSG_WARN([Unable to find header caml/mlvalues.h. The OCAML packages will not be built])
1048 CPPFLAGS=$save_CPPFLAGS
1053 AM_CONDITIONAL(WITH_OCAML, [test "x$use_ocaml" = "xYes"])
1054 AM_CONDITIONAL(WITH_OCAMLOPT, [test "x$OCAML_OPT" != "x" -a "x$OCAML_C" != "x"])
1056 dnl -----------------------------------
1057 dnl INCLUDES and LIBS for PERL
1060 [AS_HELP_STRING([--enable-perl=yes],[perl language bindings])],
1061 [], [enable_perl=yes])
1063 if test "x$enable_perl" != "xyes"; then
1064 use_perl="No (disabled)"
1066 if test "x$use_swig" != "xYes"; then
1067 use_perl="No (swig not available)"
1069 if test `$SWIG -perl5 2>&1 | $EGREP -c '(Unable|No target)'` -eq 1; then
1070 SWIG_PERL_OPT='-perl'
1072 SWIG_PERL_OPT='-perl5'
1074 if test `$SWIG -help 2>&1 | $EGREP -c "(-perl|-perl5) *- Generate"` = 0; then
1075 use_perl="No (swig does not support -perl or -perl5 option)"
1077 AC_CHECK_PROG(PERL,perl,perl)
1078 if test "x$PERL" = "x"; then
1079 use_perl="No (perl not available)"
1081 if test $PERL -e 'exit !($] <= 5.004)' > /dev/null 2>&1 ; then
1082 use_perl="No (perl is too old)"
1085 PERL_INCLUDES="`$PERL $srcdir/config/config_perl.pl PERL_INCLUDES`"
1086 PERL_LIBS="`$PERL $srcdir/config/config_perl.pl PERL_LIBS`"
1087 PERL_INSTALL_DIR="`$PERL $srcdir/config/config_perl.pl PERL_INSTALL_DIR`"
1088 save_CPPFLAGS=$CPPFLAGS
1089 CPPFLAGS="$CPPFLAGS $PERL_INCLUDES"
1090 AC_CHECK_HEADER(EXTERN.h,,[
1091 use_perl="No (missing header)"
1094 CPPFLAGS=$save_CPPFLAGS
1096 if test "x$PERL" != "x"; then
1098 AC_SUBST([PERL_INCLUDES])
1099 AC_SUBST([PERL_LIBS])
1100 AC_SUBST([PERL_INSTALL_DIR])
1101 AC_SUBST([SWIG_PERL_OPT])
1107 AM_CONDITIONAL(WITH_PERL, [test "x$use_perl" = "xYes"])
1109 dnl -----------------------------------
1110 dnl INCLUDES and LIBS for PHP
1113 [AS_HELP_STRING([--enable-php=yes],[php language bindings])],
1114 [], [enable_php=yes])
1116 if test "x$enable_php" != "xyes"; then
1117 use_php="No (disabled)"
1119 if test "x$use_swig" != "xYes"; then
1120 use_php="No (swig not available)"
1122 if test `$SWIG -php7 2>&1 | $EGREP -c '(Unable|No target)'` -eq 1; then
1125 SWIG_PHP_OPT='-php7'
1127 if test `$SWIG -help 2>&1 | $EGREP -c "(-php|-php7) *- Generate"` = 0 ; then
1128 use_php="No (swig does not support -php or -php7 option)"
1130 AC_CHECK_PROGS(PHP,php7.2,php7,php)
1131 if test "x$PHP" = "x"; then
1132 use_php="No (php not available)"
1134 AC_CHECK_PROGS(PHPCONFIG,${PHP}-config,php-config)
1135 if test "x$PHPCONFIG" = "x"; then
1136 use_php="No (php-config not available)"
1138 PHP_INCLUDES="`$PHPCONFIG --includes`"
1139 PHP_INSTALL_DIR="`$PHPCONFIG --extension-dir`"
1140 PHP_INSTALL_DATADIR="/usr/share/php"
1141 PHP_LIBS="`$PHPCONFIG --ldflags` `$PHPCONFIG --libs`"
1142 save_CPPFLAGS=$CPPFLAGS
1143 CPPFLAGS="$CPPFLAGS $PHP_INCLUDES"
1144 AC_CHECK_HEADER(php.h,,[
1145 use_php="No (missing header)"
1148 CPPFLAGS=$save_CPPFLAGS
1151 if test "x$PHP" != "x"; then
1153 AC_SUBST([PHP_INCLUDES])
1154 AC_SUBST([PHP_INSTALL_DIR])
1155 AC_SUBST([PHP_INSTALL_DATADIR])
1156 AC_SUBST([PHP_LIBS])
1157 AC_SUBST([SWIG_PHP_OPT])
1162 AM_CONDITIONAL(WITH_PHP, [test "x$use_php" = "xYes"])
1164 dnl -----------------------------------
1165 dnl INCLUDES and LIBS for PYTHON
1167 AC_ARG_ENABLE(python,
1168 [AS_HELP_STRING([--enable-python=yes],[python language bindings])],
1169 [], [enable_python=yes])
1171 if test "x$enable_python" != "xyes"; then
1172 use_python="No (disabled)"
1174 if test "x$use_swig" != "xYes"; then
1175 use_python="No (swig not available)"
1177 if test `$SWIG -help 2>&1 | $EGREP -c '\-python *- Generate'` = 0; then
1178 use_python="No (swig does not support -python option)"
1180 AC_CHECK_PROG(PYTHON,python,python)
1181 if test "x$PYTHON" = "x"; then
1182 use_python="No (python not available)"
1184 PYTHON_VERSION=`$PYTHON -c "import sys; print('%d.%d' % sys.version_info[[0:2]])"`
1185 if test "x$PYTHON_VERSION" = "x"; then
1188 PYTHON_VERSION_MAJOR=`echo $PYTHON_VERSION | cut -d '.' -f 1`
1189 if test $PYTHON_VERSION_MAJOR -lt 3; then
1194 if test "x$PYTHON" = "x"; then
1195 use_python="No (python is too old)"
1197 PYTHON_PREFIX=`$PYTHON -c "import sys; print(sys.prefix)"`
1198 PYTHON_INCLUDES=-I$PYTHON_PREFIX/include/python$PYTHON_VERSION
1199 PYTHON_LIBS="-undefined dynamic_lookup"
1200 PYTHON_INSTALL_DIR="`$PYTHON -c 'from distutils import sysconfig; print(sysconfig.get_python_lib(1,0))'`"
1201 save_CPPFLAGS=$CPPFLAGS
1202 CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
1203 AC_CHECK_HEADER(Python.h,,[
1204 use_python="No (missing header)"
1207 CPPFLAGS=$save_CPPFLAGS
1208 if test "x$PYTHON" != "x"; then
1210 AC_SUBST([PYTHON_INSTALL_DIR])
1211 AC_SUBST([PYTHON_INCLUDES])
1212 AC_SUBST([PYTHON_LIBS])
1218 AM_CONDITIONAL(WITH_PYTHON, [test "x$use_python" = "xYes"])
1220 dnl -----------------------------------
1221 dnl INCLUDES and LIBS for PYTHON3
1223 AC_ARG_ENABLE(python3,
1224 [AS_HELP_STRING([--enable-python3=yes],[python3 language bindings])],
1225 [], [enable_python3=yes])
1227 if test "x$enable_python3" != "xyes"; then
1228 use_python3="No (disabled)"
1230 if test "x$use_swig" != "xYes"; then
1231 use_python3="No (swig not available)"
1233 if test `$SWIG -help 2>&1 | $EGREP -c '\-python *- Generate'` = 0; then
1234 use_python="No (swig does not support -python option)"
1236 AC_CHECK_PROG(PYTHON3,python3,python3)
1237 if test "x$PYTHON3" = "x"; then
1238 use_python3="No (python3 not available)"
1240 PYTHON3_VERSION=`$PYTHON3 -c "import sys; print('%d.%d' % sys.version_info[[0:2]])"`
1241 if test "x$PYTHON3_VERSION" = "x"; then
1245 if test "x$PYTHON3" = "x"; then
1246 use_python3="No (python3 is too old)"
1249 if test "x$PKG_CONFIG" != "x"; then
1250 AC_MSG_CHECKING(for Python3 headers and libraries with pkg-config)
1252 pkgconfig_python3_found=`$PKG_CONFIG --exists python-$PYTHON3_VERSION 2>/dev/null`
1253 if test "x$?" = "x0" ; then
1254 PYTHON3_INCLUDES="$PYTHON3_CFLAGS "`$PKG_CONFIG --cflags python-$PYTHON3_VERSION`
1255 PYTHON3_LIBS="$PYTHON3_LFLAGS "`$PKG_CONFIG --libs python-$PYTHON3_VERSION`
1257 use_python3="No (python-$PYTHON3_VERSION.pc not found)"
1260 PYTHON3_INSTALL_DIR="`$PYTHON3 -c 'from distutils import sysconfig; print(sysconfig.get_python_lib(1,0))'`"
1261 save_CPPFLAGS=$CPPFLAGS
1262 CPPFLAGS="$CPPFLAGS $PYTHON3_INCLUDES"
1263 AC_CHECK_HEADER(Python.h,,[
1264 use_python3="No (missing header)"
1267 CPPFLAGS=$save_CPPFLAGS
1268 if test "x$PYTHON3" != "x"; then
1270 AC_SUBST([PYTHON3_INSTALL_DIR])
1271 AC_SUBST([PYTHON3_INCLUDES])
1272 AC_SUBST([PYTHON3_LIBS])
1278 AM_CONDITIONAL(WITH_PYTHON3, [test "x$use_python3" = "xYes"])
1280 dnl -----------------------------------
1281 dnl INCLUDES and LIBS for R
1284 [AS_HELP_STRING([--enable-r=yes],[R language bindings])],
1287 if test "x$enable_r" != "xyes"; then
1288 use_r="No (disabled)"
1290 if test "x$use_swig" != "xYes"; then
1291 use_r="No (swig not available)"
1293 if test `$SWIG -help 2>&1 | $EGREP -c '\-r *- Generate'` = 0; then
1294 use_r="No (swig does not support -r option)"
1296 PKG_CHECK_MODULES(R, [libR],[
1298 AC_SUBST([R_CFLAGS])
1301 use_r="No (R not available)"
1306 AM_CONDITIONAL(WITH_R, [test "x$use_r" = "xYes"])
1308 dnl -----------------------------------
1309 dnl INCLUDES and LIBS for RUBY
1312 [AS_HELP_STRING([--enable-ruby=yes],[ruby language bindings])],
1313 [], [enable_ruby=yes])
1315 if test "x$enable_ruby" != "xyes"; then
1316 use_ruby="No (disabled)"
1318 if test "x$use_swig" != "xYes"; then
1319 use_ruby="No (swig not available)"
1321 if test `$SWIG -help 2>&1 | $EGREP -c '\-ruby *- Generate'` = 0; then
1322 use_ruby="No (swig does not support -ruby option)"
1324 PKG_CHECK_MODULES([RUBY], [ruby],[
1325 AC_CHECK_PROG(RUBY,ruby,ruby)
1326 if test "x$RUBY" = "x"; then
1327 use_ruby="No (ruby not available)"
1329 RUBY_INSTALL_DIR="`$RUBY $srcdir/config/config_ruby.rb vendorarchdir`"
1332 PKG_CHECK_MODULES([RUBY], [ruby-${RUBY_VER}],[
1333 AC_CHECK_PROG(RUBY,ruby,ruby)
1334 if test "x$RUBY" = "x"; then
1335 use_ruby="No (ruby not available)"
1337 RUBY_INSTALL_DIR="`$RUBY $srcdir/config/config_ruby.rb vendorarchdir`"
1340 AC_CHECK_PROG(RUBY,ruby,ruby)
1341 if test "x$RUBY" = "x"; then
1342 use_ruby="No (ruby not available)"
1344 RUBY_CFLAGS="-I`$RUBY $srcdir/config/config_ruby.rb archdir`"
1345 # hack for powerpc-darwin8 (10.4)
1346 if test "x$DARWIN" = "xyes"; then
1347 RUBY_CFLAGS=`echo $RUBY_CFLAGS | sed 's/powerpc/universal/'`
1349 RUBY_LIBS="-L`$RUBY $srcdir/config/config_ruby.rb lib` `$RUBY -rrbconfig -e \"puts RbConfig::CONFIG[['LIBRUBYARG_SHARED']]\"`"
1350 RUBY_INSTALL_DIR="`$RUBY $srcdir/config/config_ruby.rb vendorarchdir`"
1351 if test "x$RUBY_INSTALL_DIR" = "x"; then
1352 RUBY_INSTALL_DIR="`$RUBY $srcdir/config/config_ruby.rb sitearchdir`"
1354 save_CPPFLAGS=$CPPFLAGS
1355 CPPFLAGS="$CPPFLAGS $RUBY_CFLAGS"
1356 AC_CHECK_HEADER(ruby.h,,[
1357 use_ruby="No (missing header)"
1360 CPPFLAGS=$save_CPPFLAGS
1364 if test "x$RUBY" != "x"; then
1366 AC_SUBST([RUBY_CFLAGS])
1367 AC_SUBST([RUBY_LIBS])
1368 AC_SUBST([RUBY_INSTALL_DIR])
1373 AM_CONDITIONAL(WITH_RUBY, [test "x$use_ruby" = "xYes"])
1375 dnl -----------------------------------
1376 dnl INCLUDES and LIBS for TCL
1379 [AS_HELP_STRING([--enable-tcl=yes],[tcl language bindings])],
1380 [], [enable_tcl=yes])
1382 if test "x$enable_tcl" != "xyes"; then
1383 use_tcl="No (disabled)"
1386 if test "x$use_tcl" = "x"; then
1387 TCL_VERSION_FOUND=`echo 'puts [[info tclversion]]' | $TCLSH`
1389 # can't assume ksh on all architectures
1390 # TCLSH_EXEC_PREFIX=${TCLSH%%/bin/tclsh.*}
1391 # so use sed instead
1392 TCLSH_EXEC_PREFIX=`echo $TCLSH|sed -e 's%/bin/.*tclsh.*$%%'`
1394 if test -f ${TCLSH_EXEC_PREFIX}/include/tcl${TCL_VERSION_FOUND}/tcl.h; then
1395 TCL_INCLUDES="-I${TCLSH_EXEC_PREFIX}/include/tcl${TCL_VERSION_FOUND}"
1396 if test -d ${TCLSH_EXEC_PREFIX}/include/tcl${TCL_VERSION_FOUND}/generic; then
1397 TCL_INCLUDES="${TCL_INCLUDES} -I${TCLSH_EXEC_PREFIX}/include/tcl${TCL_VERSION_FOUND}/generic"
1400 if test "x${TCLSH_EXEC_PREFIX}" != "x/usr" -a -f ${TCLSH_EXEC_PREFIX}/include/tcl.h; then
1401 TCL_INCLUDES=-I${TCLSH_EXEC_PREFIX}/include
1404 if test "x$TCL_INCLUDES" != "x" ; then
1405 AC_MSG_RESULT([using tcl headers from $TCL_INCLUDES])
1407 AC_SUBST([TCL_INCLUDES])
1408 save_CPPFLAGS=$CPPFLAGS
1409 CPPFLAGS="$CPPFLAGS $TCL_INCLUDES"
1410 AC_CHECK_HEADER(tcl.h,,[
1411 AC_MSG_WARN([Unable to find header tcl.h. The Tcl packages will not be built])
1412 use_tcl="No (missing header)"
1414 CPPFLAGS=$save_CPPFLAGS
1416 AC_SUBST([TCLSH_EXEC_PREFIX])
1418 if test "x$use_tcl" = "x"; then
1419 # Some systems don't have Tcl. Don't build
1420 # the Tcl products if we don't have the library.
1421 if test -f ${TCLSH_EXEC_PREFIX}/lib${LIBPOSTFIX}/tcl${TCL_VERSION_FOUND}/tclConfig.sh; then
1422 TCLCONFIG=${TCLSH_EXEC_PREFIX}/lib${LIBPOSTFIX}/tcl${TCL_VERSION_FOUND}/tclConfig.sh
1424 if test -f ${TCLSH_EXEC_PREFIX}/lib${LIBPOSTFIX}/tclConfig.sh; then
1425 TCLCONFIG=${TCLSH_EXEC_PREFIX}/lib${LIBPOSTFIX}/tclConfig.sh
1427 if test -f ${TCLSH_EXEC_PREFIX}/lib/tclConfig.sh; then
1428 TCLCONFIG=${TCLSH_EXEC_PREFIX}/lib/tclConfig.sh
1432 if test "x$TCLCONFIG" != "x"; then
1433 AC_MSG_RESULT([using $TCLCONFIG])
1437 AC_MSG_WARN([Unable to find tclConfig.sh. The Tcl packages will not be built])
1438 use_tcl="No (missing tclConfig.sh)"
1440 TCL_INSTALL_DIR=${TCLSH_EXEC_PREFIX}/lib${LIBPOSTFIX}/tcl${TCL_VERSION_FOUND}
1443 if test "x$use_tcl" = "x"; then
1444 # TCL STUBS support is required
1445 if test "x${TCL_SUPPORTS_STUBS}" = "x1"; then
1447 TCL_CFLAGS="${TCL_CFLAGS} -DUSE_TCL_STUBS"
1448 AC_DEFINE_UNQUOTED(HAVE_TCL,1,
1449 [Define if you have the tcl library])
1451 AC_MSG_WARN([Tcl does not have STUBs support, perhaps it is too old? The Tcl packages will not be built])
1452 use_tcl="No (no STUBs support)"
1456 AC_SUBST([TCLCONFIG])
1457 AC_SUBST([TCL_INSTALL_DIR])
1459 AM_CONDITIONAL(WITH_TCL, [test "x$use_tcl" = "xYes"])
1461 AC_SUBST([TCL_VERSION])
1462 AC_SUBST([TCL_MAJOR_VERSION])
1463 AC_SUBST([TCL_MINOR_VERSION])
1464 AC_SUBST([TCL_PATCH_LEVEL])
1465 AC_SUBST([TCL_CFLAGS])
1466 AC_SUBST([TCL_DEFS])
1468 # TCL modules use stubs and don't need any other tcl libraries
1470 AC_SUBST([TCL_LIBS])
1472 AC_SUBST([TCL_SHLIB_SUFFIX])
1473 AC_SUBST([TCL_SRC_DIR])
1474 AC_SUBST([TCL_STUB_LIB_SPEC])
1476 dnl -----------------------------------
1477 dnl Support for generic "extra" search paths for includes and libraries
1479 AC_ARG_WITH(extraincludedir,
1480 [AS_HELP_STRING([--with-extraincludedir=DIR],[use extra includes from DIR])],
1481 [CPPFLAGS="$CPPFLAGS -I$withval"])
1483 AC_ARG_WITH(extralibdir,
1484 [AS_HELP_STRING([--with-extralibdir=DIR],[use extra libraries from DIR])],
1485 [LDFLAGS="$LDFLAGS -L$withval"])
1487 dnl -----------------------------------
1488 dnl ...borrow test for -lsocket -lnsl from tk8.3.3/unix/configure.in
1493 AC_CHECK_FUNC(connect, tk_checkSocket=0, tk_checkSocket=1)
1494 if test "$tk_checkSocket" = 1; then
1495 AC_CHECK_LIB(socket, main, LIBS="$LIBS -lsocket", tk_checkBoth=1)
1497 if test "$tk_checkBoth" = 1; then
1499 LIBS="$LIBS -lsocket -lnsl"
1500 AC_CHECK_FUNC(accept, tk_checkNsl=0, [LIBS=$tk_oldLibs])
1502 AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(nsl, main, [LIBS="$LIBS -lnsl"])])
1504 AC_SUBST([SOCKET_LIBS])
1507 dnl -----------------------------------
1508 dnl INCLUDES and LIBS for EXPAT
1511 [AS_HELP_STRING([--with-expat=yes],[use expat])],
1512 [],[with_expat=yes])
1514 if test "x$with_expat" != "xyes"; then
1515 use_expat="No (disabled)"
1518 save_CPPFLAGS=$CPPFLAGS
1519 save_LDFLAGS=$LDFLAGS
1520 AC_PATH_PROG(EXPAT_CONFIG,expat-config)
1521 if test -n "$EXPAT_CONFIG"; then
1522 EXPAT_INCLUDES=`$EXPAT_CONFIG --cflags`
1523 EXPAT_PREFIX=`$EXPAT_CONFIG --prefix`
1524 if test "${EXPAT_PREFIX}/lib" != "/usr/lib" ; then
1525 EXPAT_LIBS="-L${EXPAT_PREFIX}/lib"
1531 AC_ARG_WITH(expatincludedir,
1532 [AS_HELP_STRING([--with-expatincludedir=DIR],[use EXPAT includes from DIR])],
1533 [EXPAT_INCLUDES="-I$withval"])
1534 CPPFLAGS="$CPPFLAGS $EXPAT_INCLUDES"
1535 EXPAT_LIBDIR="/usr/lib$LIBPOSTFIX"
1536 AC_ARG_WITH(expatlibdir,
1537 [AS_HELP_STRING([--with-expatlibdir=DIR],[use EXPAT libraries from DIR])],
1538 [EXPAT_LIBDIR="$withval"])
1539 if test "$EXPAT_LIBDIR" != "/usr/lib"; then
1540 EXPAT_LIBS="-L$EXPAT_LIBDIR"
1541 LDFLAGS="$LDFLAGS $EXPAT_LIBS"
1543 AC_CHECK_HEADERS([expat.h],
1545 [use_expat="No (missing header)"
1546 AC_MSG_WARN(Optional expat library not available - missing headers)],
1548 AC_CHECK_LIB(expat,main,
1549 [EXPAT_LIBS="$EXPAT_LIBS -lexpat"],
1550 [use_expat="No (missing library)"
1551 AC_MSG_WARN(Optional expat library not available)],
1553 LDFLAGS=$save_LDFLAGS
1554 CPPFLAGS=$save_CPPFLAGS
1556 if test "x$use_expat" = "x"; then
1558 AC_DEFINE_UNQUOTED(HAVE_EXPAT,1,
1559 [Define if you have the expat library])
1560 AC_SUBST([EXPAT_INCLUDES])
1561 AC_SUBST([EXPAT_LIBS])
1564 dnl -----------------------------------
1565 dnl INCLUDES and LIBS for DEVIL
1568 [AS_HELP_STRING([--with-devil=yes],[DevIL plugin])],
1569 [],[with_devil=yes])
1571 if test "x$with_devil" != "xyes"; then
1572 use_devil="No (disabled)"
1575 AC_ARG_WITH(devilincludedir,
1576 [AS_HELP_STRING([--with-devilincludedir=DIR],[use DevIL includes from DIR])],
1577 [DEVIL_INCLUDES="-I$withval"])
1578 AC_ARG_WITH(devillibdir,
1579 [AS_HELP_STRING([--with-devillibdir=DIR],[use DevIL libraries from DIR])],
1580 [DEVIL_LIBS="-L$withval"])
1582 save_CPPFLAGS=$CPPFLAGS
1583 save_LDFLAGS=$LDFLAGS
1584 CPPFLAGS="$CPPFLAGS $DEVIL_INCLUDES"
1585 LDFLAGS="$LDFLAGS $DEVIL_LIBS"
1586 AC_CHECK_HEADERS([IL/il.h],
1588 [use_devil="No (missing header)"
1589 AC_MSG_WARN(Optional DevIL library not available - missing headers)],
1591 AC_CHECK_LIB(IL,main,
1592 [DEVIL_LIBS="$DEVIL_LIBS -lIL -lILU"],
1593 [use_devil="No (missing library)"
1594 AC_MSG_WARN(Optional DevIL library not available)],
1596 LDFLAGS=$save_LDFLAGS
1597 CPPFLAGS=$save_CPPFLAGS
1599 if test "x$use_devil" = "x"; then
1601 AC_DEFINE_UNQUOTED(HAVE_DEVIL,1,
1602 [Define if you have the DevIL library])
1603 AC_SUBST([DEVIL_INCLUDES])
1604 AC_SUBST([DEVIL_LIBS])
1607 AM_CONDITIONAL(WITH_DEVIL, [test "x$use_devil" = "xYes"])
1609 dnl -----------------------------------
1610 dnl INCLUDES and LIBS for Z
1612 AC_ARG_WITH(zincludedir,
1613 [AS_HELP_STRING([--with-zincludedir=DIR],[use Z includes from DIR])],
1614 [Z_INCLUDES="-I$withval"])
1615 AC_ARG_WITH(zlibdir,
1616 [AS_HELP_STRING([--with-zlibdir=DIR],[use Z libraries from DIR])],
1617 [Z_LIBS="-L$withval"])
1619 save_CPPFLAGS=$CPPFLAGS
1620 save_LDFLAGS=$LDFLAGS
1621 CPPFLAGS="$CPPFLAGS $Z_INCLUDES"
1622 LDFLAGS="$LDFLAGS $Z_LIBS"
1623 AC_CHECK_HEADER(zlib.h,
1624 [AC_CHECK_LIB(z,main,
1625 [Z_LIBS="$Z_LIBS -lz"
1626 AC_DEFINE_UNQUOTED(HAVE_LIBZ,1,[Define if you have the Z library])],
1627 AC_MSG_WARN(Optional z library not available))],
1628 AC_MSG_WARN(Optional z library not available - no zlib.h))
1629 LDFLAGS="$LDFLAGS $Z_LIBS"
1630 AC_CHECK_FUNCS(deflateBound)
1631 LDFLAGS=$save_LDFLAGS
1632 CPPFLAGS=$save_CPPFLAGS
1633 AC_SUBST([Z_INCLUDES])
1636 dnl -----------------------------------
1637 dnl INCLUDES and LIBS for WEBP
1640 [AS_HELP_STRING([--with-webp=yes],[webp library])],
1641 [], [with_webp=yes])
1643 if test "x$with_webp" != "xyes"; then
1644 use_webp="No (disabled)"
1646 PKG_CHECK_MODULES(WEBP, [libwebp],[
1648 AC_DEFINE_UNQUOTED(HAVE_WEBP,1,
1649 [Define if you have the webp library])
1650 AC_SUBST([WEBP_CFLAGS])
1651 AC_SUBST([WEBP_LIBS])
1653 use_webp="No (webp library not available)"
1656 AM_CONDITIONAL(WITH_WEBP, [test "x$use_webp" = "xYes"])
1658 dnl -----------------------------------
1659 dnl INCLUDES and LIBS for POPPLER
1661 AC_ARG_WITH(poppler,
1662 [AS_HELP_STRING([--with-poppler=yes],[poppler library])],
1663 [], [with_poppler=yes])
1665 if test "x$with_poppler" != "xyes"; then
1666 use_poppler="No (disabled)"
1668 PKG_CHECK_MODULES(POPPLER, [poppler-glib],[
1670 AC_DEFINE_UNQUOTED(HAVE_POPPLER,1,
1671 [Define if you have the poppler library])
1672 AC_SUBST([POPPLER_CFLAGS])
1673 AC_SUBST([POPPLER_LIBS])
1675 use_poppler="No (poppler library not available)"
1678 AM_CONDITIONAL(WITH_POPPLER, [test "x$use_poppler" = "xYes"])
1680 dnl -----------------------------------
1681 dnl INCLUDES and LIBS for RSVG
1684 [AS_HELP_STRING([--with-rsvg=yes],[rsvg library])],
1685 [], [with_rsvg=yes])
1688 if test "x$with_rsvg" != "xyes"; then
1689 use_rsvg="No (disabled)"
1691 PKG_CHECK_MODULES(RSVG, [librsvg-2.0],[
1693 AC_DEFINE_UNQUOTED(HAVE_RSVG,1,
1694 [Define if you have the rsvg library])
1695 AC_SUBST([RSVG_CFLAGS])
1696 AC_SUBST([RSVG_LIBS])
1698 use_rsvg="No (rsvg library not available)"
1700 PKG_CHECK_MODULES([SVG_2_36], [librsvg-2.0 >= 2.36.0 cairo >= 1.0.0],[
1702 AC_DEFINE(HAVE_SVG_2_36, 1, [Have librsvg >= 2.36])
1707 AM_CONDITIONAL(WITH_RSVG, [test "x$use_rsvg" = "xYes"])
1709 dnl -----------------------------------
1710 dnl INCLUDES and LIBS for GHOSTSCRIPT
1712 AC_ARG_WITH(ghostscript,
1713 [AS_HELP_STRING([--with-ghostscript=yes],[ghostscript library])],
1714 [], [with_ghostscript=yes])
1716 if test "x$with_ghostscript" != "xyes"; then
1717 use_ghostscript="No (disabled)"
1719 if test "x$HAVE_XRENDER" != "xyes"; then
1720 use_ghostscript="No (missing Xrender)"
1722 AC_CHECK_HEADER(ghostscript/iapi.h, GS_CFLAGS="",use_ghostscript="No (missing headers)")
1723 if test "x$use_ghostscript" = "x"; then
1724 AC_CHECK_LIB(gs, main, GS_LIBS="-lgs", use_ghostscript="No (missing lib)")
1725 if test "x$use_ghostscript" = "x"; then
1726 use_ghostscript="Yes"
1727 AC_DEFINE_UNQUOTED(HAVE_GS,1,
1728 [Define if you have the gs library])
1729 AC_SUBST([GS_CFLAGS])
1735 AM_CONDITIONAL(WITH_GS, [test "x$use_ghostscript" = "xYes"])
1737 dnl -----------------------------------
1738 dnl INCLUDES and LIBS for VISIO
1741 [AS_HELP_STRING([--with-visio=yes],[visio library])],
1742 [], [with_visio=yes])
1744 if test "x$with_visio" != "xyes"; then
1745 use_visio="No (disabled)"
1748 AC_DEFINE_UNQUOTED(HAVE_VISIO,1,[Define if you have the visio library])
1749 AC_SUBST([VISIO_CFLAGS])
1750 AC_SUBST([VISIO_LIBS])
1752 AM_CONDITIONAL(WITH_VISIO, [test "x$use_visio" = "xYes"])
1754 dnl -----------------------------------
1755 dnl INCLUDES and LIBS for PANGOCAIRO
1757 AC_ARG_WITH(pangocairo,
1758 [AS_HELP_STRING([--with-pangocairo=yes],[pangocairo library])],
1759 [], [with_pangocairo=yes])
1761 if test "x$with_pangocairo" != "xyes"; then
1762 use_pangocairo="No (disabled)"
1764 # require at least the version available on centos5 (fc6 has 1.14.10)
1765 PKG_CHECK_MODULES(PANGOCAIRO, [pangocairo >= 1.14.9],[
1766 use_pangocairo="Yes"
1767 AC_DEFINE_UNQUOTED(HAVE_PANGOCAIRO,1,
1768 [Define if you have the pangocairo library])
1769 AC_SUBST([PANGOCAIRO_CFLAGS])
1770 AC_SUBST([PANGOCAIRO_LIBS])
1772 use_pangocairo="No (pangocairo library not available)"
1775 AM_CONDITIONAL(WITH_PANGOCAIRO, [test "x$use_pangocairo" = "xYes"])
1777 # see if pango uses a fontconfig/freetype2 backend
1778 if test "x$use_pangocairo" = "xYes"; then
1780 PKG_CHECK_MODULES(PANGOFT2, [pangoft2])
1781 LIBS="$LIBS $PANGOCAIRO_LIBS $PANGOFT2_LIBS"
1782 AC_CHECK_FUNCS([pango_fc_font_lock_face pango_fc_font_unlock_face pango_font_map_create_context cairo_surface_set_mime_data])
1786 dnl -----------------------------------
1787 dnl INCLUDES and LIBS for LASI
1790 [AS_HELP_STRING([--with-lasi=yes],[lasi library])],
1791 [], [with_lasi=yes])
1793 if test "x$with_lasi" != "xyes"; then
1794 use_lasi="No (disabled)"
1796 if test "x$use_pangocairo" != "xYes"; then
1797 use_lasi="No (missing pangocairo support)"
1799 PKG_CHECK_MODULES(LASI, [lasi],[
1801 AC_DEFINE_UNQUOTED(HAVE_LASI,1,
1802 [Define if you have the lasi library])
1803 AC_SUBST([LASI_CFLAGS])
1804 AC_SUBST([LASI_LIBS])
1806 use_lasi="No (lasi library not available)"
1810 AM_CONDITIONAL(WITH_LASI, [test "x$use_lasi" = "xYes"])
1812 dnl -----------------------------------
1813 dnl INCLUDES and LIBS for FREETYPE2
1815 AC_ARG_WITH(freetype2,
1816 [AS_HELP_STRING([--with-freetype2=yes],[freetype2 library])],
1817 [], [with_freetype2=yes])
1819 if test "x$with_freetype2" != "xyes"; then
1820 use_freetype="No (disabled)"
1822 PKG_CHECK_MODULES(FREETYPE2, [freetype2],[
1825 AC_MSG_WARN(pkg-config did not find a freetype2.pc. Looking for freetype-config.)
1829 # pkgconfig for freetype2 did not exist in redhat[78]
1830 if test "x$use_freetype" = "x"; then
1831 if test "x$FREETYPE_DIR" = "xyes"; then
1832 AC_PATH_PROG(FREETYPE_CONFIG,freetype-config)
1834 AC_PATH_PROG(FREETYPE_CONFIG,freetype-config,,[$FREETYPE_DIR/bin:$PATH])
1837 if test -n "$FREETYPE_CONFIG"; then
1838 if test "x$FREETYPE_DIR" != "xyes"; then
1839 FREETYPE2_CFLAGS="`$FREETYPE_CONFIG --cflags` -I$FREETYPE_DIR/include"
1841 FREETYPE2_CFLAGS=`$FREETYPE_CONFIG --cflags`
1843 FREETYPE2_LIBS=`$FREETYPE_CONFIG --libs`
1846 AC_MSG_WARN(freetype library not available)
1847 use_freetype="No (missing freetype-config)"
1851 if test "x$use_freetype" = "xYes"; then
1852 AC_DEFINE_UNQUOTED(HAVE_FREETYPE2,1,[Define if you have the freetype2 library])
1853 AC_SUBST([FREETYPE2_CFLAGS])
1854 AC_SUBST([FREETYPE2_LIBS])
1856 AM_CONDITIONAL(WITH_FREETYPE2, [test "x$ue_freetype" = "xYes"])
1858 dnl -----------------------------------
1859 dnl INCLUDES and LIBS for FONTCONFIG
1861 AC_ARG_WITH(fontconfig,
1862 [AS_HELP_STRING([--with-fontconfig=yes],[use fontconfig library])],
1863 [], [with_fontconfig=yes])
1865 if test "x$with_fontconfig" != "xyes"; then
1866 use_fontconfig="No (disabled)"
1868 PKG_CHECK_MODULES(FONTCONFIG, [fontconfig],[
1869 use_fontconfig="Yes"
1871 AC_MSG_WARN(pkg-config did not find a fontconfig.pc. Looking for fontconfig-config.)
1875 # just in case pkgconfig for fontconfig does not exist
1876 if test "x$use_fontconfig" = "x"; then
1877 if test "x$FONTCONFIG_DIR" = "xyes"; then
1878 AC_PATH_PROG(FONTCONFIG_CONFIG,fontconfig-config)
1880 AC_PATH_PROG(FONTCONFIG_CONFIG,fontconfig-config,,[$FONTCONFIG_DIR/bin:$PATH])
1883 if test -n "$FONTCONFIG_CONFIG"; then
1884 if test "x$FONTCONFIG_DIR" != "xyes"; then
1885 FONTCONFIG_CFLAGS="`$FONTCONFIG_CONFIG --cflags` -I$FONTCONFIG_DIR/include"
1887 FONTCONFIG_CFLAGS=`$FONTCONFIG_CONFIG --cflags`
1889 FONTCONFIG_LIBS=`$FONTCONFIG_CONFIG --libs`
1890 use_fontconfig="Yes"
1892 use_fontconfig="No (missing fontconfig-config)"
1893 AC_MSG_WARN(fontconfig library not available)
1897 if test "x$use_fontconfig" = "xYes"; then
1898 AC_DEFINE_UNQUOTED(HAVE_FONTCONFIG,1,[Define if you have the fontconfig library])
1899 AC_SUBST([FONTCONFIG_CFLAGS])
1900 AC_SUBST([FONTCONFIG_LIBS])
1902 AM_CONDITIONAL(WITH_FONTCONFIG, [test "x$use_fontconfig" = "xYes"])
1904 dnl -----------------------------------
1905 dnl INCLUDES and LIBS for GDK
1908 [AS_HELP_STRING([--with-gdk=yes],[gdklibrary])],
1911 if test "x$with_gdk" != "xyes"; then
1912 use_gdk="No (disabled)"
1914 PKG_CHECK_MODULES(GDK, [gdk-2.0],[
1916 AC_SUBST([GDK_CFLAGS])
1917 AC_SUBST([GDK_LIBS])
1919 LIBS="$LIBS $GDK_LIBS"
1920 AC_CHECK_FUNCS([g_object_unref g_type_init])
1923 use_gdk="No (gdk library not available)"
1926 AM_CONDITIONAL(WITH_GDK, [test "x$use_gdk" = "xYes"])
1928 dnl -----------------------------------
1929 dnl INCLUDES and LIBS for GDK_PIXBUF.
1931 AC_ARG_WITH(gdk-pixbuf,
1932 [AS_HELP_STRING([--with-gdk-pixbuf=yes],[gdk-pixbuf library])],
1933 [], [with_gdk_pixbuf=yes])
1935 if test "x$with_gdk_pixbuf" != "xyes"; then
1936 use_gdk_pixbuf="No (disabled)"
1938 PKG_CHECK_MODULES(GDK_PIXBUF, [gdk-pixbuf-2.0],[
1939 use_gdk_pixbuf="Yes"
1940 AC_SUBST([GDK_PIXBUF_CFLAGS])
1941 AC_SUBST([GDK_PIXBUF_LIBS])
1943 use_gdk_pixbuf="No (gdk_pixbuf library not available)"
1946 AM_CONDITIONAL(WITH_GDK_PIXBUF, [test "x$use_gdk_pixbuf" = "xYes"])
1948 dnl -----------------------------------
1949 dnl INCLUDES and LIBS for GTK.
1952 [AS_HELP_STRING([--with-gtk=yes],[gtk+ library])],
1955 if test "x$with_gtk" != "xyes"; then
1956 use_gtk="No (disabled)"
1958 PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.7.0],[
1960 AC_DEFINE_UNQUOTED(HAVE_GTK,1,
1961 [Define if you have the gtk library])
1962 AC_SUBST([GTK_CFLAGS])
1963 AC_SUBST([GTK_LIBS])
1965 use_gtk="No (gtk library not available)"
1968 AM_CONDITIONAL(WITH_GTK, [test "x$use_gtk" = "xYes"])
1970 dnl -----------------------------------
1971 dnl INCLUDES and LIBS for GTKGL.
1974 [AS_HELP_STRING([--with-gtkgl=yes],[gtkgl library])],
1975 [], [with_gtkgl=yes])
1977 if test "x$with_gtkgl" != "xyes"; then
1978 use_gtkgl="No (disabled)"
1980 PKG_CHECK_MODULES(GTKGL, [gtkgl-2.0],[
1982 AC_DEFINE_UNQUOTED(HAVE_GTKGL,1,
1983 [Define if you have the gtkgl library])
1984 AC_SUBST([GTKGL_CFLAGS])
1985 AC_SUBST([GTKGL_LIBS])
1987 use_gtkgl="No (gtkgl library not available)"
1990 AM_CONDITIONAL(WITH_GTKGL, [test "x$use_gtkgl" = "xYes"])
1992 dnl -----------------------------------
1993 dnl INCLUDES and LIBS for GTKGLEXT.
1995 AC_ARG_WITH(gtkglext,
1996 [AS_HELP_STRING([--with-gtkglext=yes],[gtkglext library])],
1997 [], [with_gtkglext=yes])
1999 if test "x$with_gtkglext" != "xyes"; then
2000 use_gtkglext="No (disabled)"
2002 PKG_CHECK_MODULES(GTKGLEXT, [gtkglext-1.0],[
2004 AC_SUBST([GTKGLEXT_CFLAGS])
2005 AC_SUBST([GTKGLEXT_LIBS])
2007 use_gtkglext="No (gtkglext library not available)"
2010 AM_CONDITIONAL(WITH_GTKGLEXT, [test "x$use_gtkglext" = "xYes"])
2012 dnl -----------------------------------
2013 dnl INCLUDES and LIBS for GTS.
2016 [AS_HELP_STRING([--with-gts=yes],[gts library])],
2019 if test "x$with_gts" != "xyes"; then
2020 use_gts="No (disabled)"
2022 PKG_CHECK_MODULES(GTS, [gts],[
2024 AC_DEFINE_UNQUOTED(HAVE_GTS,1,
2025 [Define if you have the gts library])
2026 AC_SUBST([GTS_CFLAGS])
2027 AC_SUBST([GTS_LIBS])
2029 use_gts="No (gts library not available)"
2032 AM_CONDITIONAL(WITH_GTS, [test "x$use_gts" = "xYes"])
2034 dnl -----------------------------------
2035 dnl INCLUDES and LIBS for ANN.
2038 [AS_HELP_STRING([--with-ann=yes],[ANN library])],
2041 if test "x$with_ann" != "xyes"; then
2042 use_ann="No (disabled)"
2044 PKG_CHECK_MODULES(ANN, [ann],[
2046 AC_DEFINE_UNQUOTED(HAVE_ANN,1,
2047 [Define if you have the ann library])
2048 AC_SUBST([ANN_CFLAGS])
2049 AC_SUBST([ANN_LIBS])
2051 use_ann="No (no ann.pc found)"
2054 AM_CONDITIONAL(WITH_ANN, [test x"${use_ann%% *}" = "xYes"])
2056 dnl -----------------------------------
2057 dnl INCLUDES and LIBS for GLADE.
2060 [AS_HELP_STRING([--with-glade=yes],[glade library])],
2061 [], [with_glade=yes])
2063 if test "x$with_glade" != "xyes"; then
2064 use_glade="No (disabled)"
2066 PKG_CHECK_MODULES(GLADE, [libglade-2.0],[
2068 AC_DEFINE_UNQUOTED(HAVE_GLADE,1,
2069 [Define if you have the glade library])
2070 AC_SUBST([GLADE_CFLAGS])
2071 AC_SUBST([GLADE_LIBS])
2073 use_glade="No (glade library not available)"
2076 AM_CONDITIONAL(WITH_GLADE, [test "x$use_glade" = "xYes"])
2078 dnl -----------------------------------
2079 dnl INCLUDES and LIBS for QT
2082 [AS_HELP_STRING([--with-qt=yes], [Qt features])])
2084 AS_IF([test "x$with_qt" != "xno"], [
2085 # required for linking with QT5
2086 CXXFLAGS="${CXXFLAGS} -fPIE -fPIC"
2087 AC_CHECK_PROGS([QMAKE], [qmake-qt5 qmake5 qmake], [false])
2088 AS_IF([test "$QMAKE" != "false"], [
2089 PKG_CHECK_MODULES([QTCORE], [Qt5Core], [
2090 PKG_CHECK_MODULES([QTGUI], [Qt5Widgets Qt5PrintSupport], [
2093 use_qt="No (QtGui not available)"
2096 use_qt="No (QtCore not available)"
2099 use_qt="No (qmake not found)"
2102 AS_IF([test "x$with_qt" = "xyes" && test "x$use_qt" != "xYes"], [
2103 AC_MSG_ERROR([You requested Qt, but dependencies could not be found: ${use_qt}])
2106 use_qt="No (disabled)"
2108 AM_CONDITIONAL([WITH_QT], [test "x$use_qt" = "xYes"])
2110 dnl -----------------------------------
2111 dnl INCLUDES and LIBS for QUARTZ
2114 [AS_HELP_STRING([--with-quartz=no],[Quartz framework (Mac OS X)])],
2115 [], [with_quartz=no])
2117 if test "x$with_quartz" != "xyes"; then
2118 use_quartz="No (disabled by default - Mac only)"
2120 if test -d "/System/Library/Frameworks/ApplicationServices.framework"; then
2122 AC_DEFINE_UNQUOTED(HAVE_QUARTZ,1,[Define if you have the Quartz framework for Mac OS X])
2124 QUARTZ_LIBS='-framework ApplicationServices'
2125 AC_SUBST([QUARTZ_CFLAGS])
2126 AC_SUBST([QUARTZ_LIBS])
2128 use_quartz="No (missing ApplicationServices.framework)"
2131 AM_CONDITIONAL(WITH_QUARTZ, [test "x$use_quartz" = "xYes"])
2133 dnl -----------------------------------
2134 dnl INCLUDES and LIBS for PLATFORMSDK
2136 AC_ARG_WITH(platformsdkincludedir,
2137 [AS_HELP_STRING([--with-platformsdkincludedir=DIR],[use Platform SDK (Windows) includes from DIR])],
2138 [PLATFORMSDKINCLUDE=$withval; PLATFORMSDKINCLUDE_ESCAPED=${PLATFORMSDKINCLUDE//'\\'/\\\\}; PLATFORMSDKINCLUDE_ESCAPED=${PLATFORMSDKINCLUDE_ESCAPED// /\\ }])
2140 AC_ARG_WITH(platformsdklibdir,
2141 [AS_HELP_STRING([--with-platformsdklibdir=DIR],[use Platform SDK (Windows) libraries from DIR])],
2142 [PLATFORMSDKLIB=$withval])
2144 AC_SUBST([PLATFORMSDKINCLUDE])
2145 AC_SUBST([PLATFORMSDKINCLUDE_ESCAPED])
2146 AC_SUBST([PLATFORMSDKLIB])
2148 dnl -----------------------------------
2149 dnl INCLUDES and LIBS for GDI+
2151 AC_ARG_WITH(gdiplus,
2152 [AS_HELP_STRING([--with-gdiplus=no],[GDI+ framework (Windows)])],
2153 [], [with_gdiplus=no])
2155 if test "x$with_gdiplus" != "xyes"; then
2156 use_gdiplus="No (disabled by default - Windows only)"
2158 if test -f "$PLATFORMSDKINCLUDE\GdiPlus.h" -a -f "$PLATFORMSDKLIB\GdiPlus.lib"; then
2160 AC_DEFINE_UNQUOTED(HAVE_GDIPLUS,1,[Define if you have the GDI+ framework for Windows])
2161 GDIPLUS_HEADS=`cd "$PLATFORMSDKINCLUDE" && echo GdiPlus*.h`
2164 AC_SUBST([GDIPLUS_HEADS])
2165 AC_SUBST([GDIPLUS_CFLAGS])
2166 AC_SUBST([GDIPLUS_LIBS])
2168 use_gdiplus="No (missing headers)"
2169 AC_MSG_WARN(--with-gdiplus requires valid --with-platformsdkincludedir and --with-platformsdklibdir.)
2172 AM_CONDITIONAL(WITH_GDIPLUS, [test "x$use_gdiplus" = "xYes"])
2174 dnl -----------------------------------
2175 dnl INCLUDES and LIBS for GD
2178 [AS_HELP_STRING([--with-libgd=yes],[use gd library])],
2179 [], [with_libgd=yes])
2181 if test "x$with_libgd" != "xyes"; then
2182 use_gd="No (disabled)"
2185 if test "x$use_gd" = "x"; then
2186 PKG_CHECK_MODULES([GDLIB], [gdlib >= 2.0.33],[
2188 # FIXME - why no features in the gdlib.pc?
2189 GD_FEATURES="GD_PNG GD_JPEG GD_XPM GD_FONTCONFIG GD_FREETYPE GD_GIF"
2191 AC_PATH_PROG(GDLIB_CONFIG,gdlib-config)
2192 if test -n "$GDLIB_CONFIG"; then
2194 GDLIB_CFLAGS=`$GDLIB_CONFIG --includes`
2195 GDLIB_LIBS=`$GDLIB_CONFIG --libs`
2196 GDLIB_VERSION=`$GDLIB_CONFIG --version 2>/dev/null`
2197 GD_LDFLAGS=`$GDLIB_CONFIG --ldflags | sed 's/-xarch=[^ ]* //'`
2198 GD_FEATURES=`$GDLIB_CONFIG --features`
2200 # GD version check >= 2.0.33 -- centos-5.8 has gd-2.0.33
2201 GDLIB_VERSION_MAJOR=`echo $GDLIB_VERSION | cut -d '.' -f 1`
2202 GDLIB_VERSION_MINOR=`echo $GDLIB_VERSION | cut -d '.' -f 2`
2203 GDLIB_VERSION_MICRO=`echo $GDLIB_VERSION | cut -d '.' -f 3`
2204 REQ_GDLIB_VERSION_MAJOR=2
2205 REQ_GDLIB_VERSION_MINOR=0
2206 REQ_GDLIB_VERSION_MICRO=33
2207 if test $GDLIB_VERSION_MAJOR -lt $REQ_GDLIB_VERSION_MAJOR; then
2208 use_gd="No (major version too old)"
2210 if test $GDLIB_VERSION_MAJOR -eq $REQ_GDLIB_VERSION_MAJOR; then
2211 if test $GDLIB_VERSION_MINOR -lt $REQ_GDLIB_VERSION_MINOR; then
2212 use_gd="No (minor version too old)"
2214 if test $GDLIB_VERSION_MINOR -eq $REQ_GDLIB_VERSION_MINOR; then
2215 if test $GDLIB_VERSION_MICRO -lt $REQ_GDLIB_VERSION_MICRO; then
2216 use_gd="No (revision too old)"
2222 if test "x$use_gd" != "x"; then
2223 AC_MSG_WARN(GD library version $GDLIB_VERSION_MAJOR.$GDLIB_VERSION_MINOR.$GDLIB_VERSION_MICRO < $REQ_GDLIB_VERSION_MAJOR.$REQ_GDLIB_VERSION_MINOR.$REQ_GDLIB_VERSION_MICRO)
2226 AC_MSG_WARN(GD neither gdlib pkgconfig nor gdlib-config was found)
2229 if test "x$have_gdlib" != "x"; then
2230 AC_DEFINE_UNQUOTED(HAVE_GDLIB,1,[Define if you have the gdlib library])
2231 for f in $GD_FEATURES ; do
2232 if test "$f" = "GD_PNG"; then
2233 AC_DEFINE_UNQUOTED(HAVE_GD_PNG,1,[Define if the GD library supports PNG])
2235 if test "$f" = "GD_JPEG"; then
2236 AC_DEFINE_UNQUOTED(HAVE_GD_JPEG,1,[Define if the GD library supports JPEG])
2238 if test "$f" = "GD_XPM"; then
2239 AC_DEFINE_UNQUOTED(HAVE_GD_XPM,1,[Define if the GD library supports XPM])
2241 if test "$f" = "GD_FONTCONFIG"; then
2242 AC_DEFINE_UNQUOTED(HAVE_GD_FONTCONFIG,1,[Define if the GD library supports FONTCONFIG])
2243 have_gd_fontconfig=1
2245 if test "$f" = "GD_FREETYPE"; then
2246 AC_DEFINE_UNQUOTED(HAVE_GD_FREETYPE,1,[Define if the GD library supports FREETYPE])
2249 if test "$f" = "GD_GIF"; then
2250 AC_DEFINE_UNQUOTED(HAVE_GD_GIF,1,[Define if the GD library supports GIF])
2254 if test "x$have_gd_fontconfig" = "x"; then
2255 AC_MSG_WARN(Your libgd was not built with fontconfig support. This may result in problems displaying fonts.)
2257 if test "x$have_gd_freetype" = "x"; then
2258 AC_MSG_WARN(Your libgd was not built with freetype support. This may result in problems resolving fonts.)
2262 # prevent explicit use of -I/usr/include as it breaks mingw cross-compiles
2263 if test "x$GDLIB_CFLAGS" = "x-I/usr/include"; then
2266 # prevent explicit use of -L/usr/lib or -L/usr/lib64, unnecessary clutter
2267 if test "x$GD_LDFLAGS" = "x-L/usr/lib"; then
2270 if test "x$GD_LDFLAGS" = "x-L/usr/lib64"; then
2274 if test "x$use_gd" = "x"; then
2275 # see if we can use the external gd lib
2276 save_CPPFLAGS=$CPPFLAGS
2277 save_LDFLAGS=$LDFLAGS
2278 AC_ARG_WITH(gdincludedir,
2279 [AS_HELP_STRING([--with-gdincludedir=DIR],[use GD includes from DIR])],
2280 GDLIB_CFLAGS="-I$withval")
2281 CPPFLAGS="$CPPFLAGS $GDLIB_CFLAGS"
2282 AC_ARG_WITH(gdlibdir,
2283 [AS_HELP_STRING([--with-gdlibdir=DIR],[use GD libraries from DIR])],
2284 [GD_LDFLAGS="-L$withval"])
2285 GDLIB_LIBS="$GD_LDFLAGS -lgd $GDLIB_LIBS"
2286 LDFLAGS="$LDFLAGS $GDLIB_LIBS"
2287 AC_CHECK_HEADER(gd.h,,[
2288 AC_MSG_WARN(Optional GD library not available - no gd.h)
2289 use_gd="No (gd headers not found)"
2291 if test "x$use_gd" = "x"; then
2292 AC_CHECK_LIB(gd,main,[
2293 AC_DEFINE_UNQUOTED(HAVE_LIBGD,1,[Define if you have the GD library])
2296 AC_MSG_WARN(Optional GD library not available)
2297 use_gd="No (library not found)"
2300 LDFLAGS=$save_LDFLAGS
2301 CPPFLAGS=$save_CPPFLAGS
2303 AC_SUBST([GDLIB_CFLAGS])
2304 AC_SUBST([GDLIB_LIBS])
2306 if test "x$use_gd" != "xYes"; then
2309 AM_CONDITIONAL(WITH_LIBGD, [test "x$with_libgd" = "xyes"])
2311 dnl -----------------------------------
2312 dnl INCLUDES and LIBS for GLUT
2315 [AS_HELP_STRING([--with-glut=yes],[GLUT library])],
2316 [], [with_glut=yes])
2318 if test "x$with_glut" != "xyes"; then
2319 use_glut="No (disabled)"
2321 save_CPPFLAGS=$CPPFLAGS
2322 save_LDFLAGS=$LDFLAGS
2323 AC_ARG_WITH(glutincludedir,
2324 [AS_HELP_STRING([--with-glutincludedir=DIR],[use GLUT includes from DIR])],
2325 [GLUT_CFLAGS="-I$withval"])
2326 CPPFLAGS="$CPPFLAGS $GLUT_CFLAGS"
2327 AC_ARG_WITH(glutlibdir,
2328 [AS_HELP_STRING([--with-glutlibdir=DIR],[use GLUT libraries from DIR])],
2329 [GLUT_LIBS="-L$withval"])
2330 LDFLAGS="$LDFLAGS $GLUT_LIBS"
2332 AC_CHECK_HEADER(GL/glut.h,
2333 AC_CHECK_LIB(glut,main,
2334 [GLUT_LIBS="$GLUT_LIBS -lglut"
2336 AC_DEFINE_UNQUOTED(HAVE_GLUT,1,[Define if you have the GLUT library])],
2337 use_glut="No (missing libglut)"
2338 AC_MSG_WARN(Optional glut library not available),
2340 use_glut="No (missing GL/glut.h)"
2341 AC_MSG_WARN(Optional glut library not available - no GL/glut.h))
2344 LDFLAGS=$save_LDFLAGS
2345 CPPFLAGS=$save_CPPFLAGS
2346 AC_SUBST([GLUT_CFLAGS])
2347 AC_SUBST([GLUT_LIBS])
2349 # -----------------------------------
2351 if test -f "$TCL_SRC_DIR/generic/tclInt.h"; then
2352 TCLINT_INCLUDES="-I$TCL_SRC_DIR/generic"
2354 if test -f "/usr/include/tclInt.h"; then
2357 if test -f "/usr/local/include/tclInt.h"; then
2358 TCLINT_INCLUDES="-I/usr/local/include"
2360 TCLINT_INCLUDES='-I$(top_srcdir)/tclpkg/tclstubs'
2364 AC_SUBST([TCLINT_INCLUDES])
2366 # ------------------------------------
2369 if test -f "lib/sfdpgen/triangle.c"; then
2370 if test -f "lib/sfdpgen/triangle.h"; then
2371 AC_DEFINE_UNQUOTED(HAVE_TRIANGLE,1,[Define if triangle.[ch] are available.])
2375 # ----------------------------------
2376 # tcl/tk pkgIndex.tcl generation
2380 TCL_PKGINDEX_SWIG=""
2382 if test "$use_tcl" = "Yes"; then
2383 TCL_PKGINDEX="tcldot/pkgIndex.tcl tclpathplan/pkgIndex.tcl"
2384 if test "x$with_libgd" = "xyes"; then
2385 TCL_PKGINDEX_GD="gdtclft/pkgIndex.tcl"
2387 if test "x$SWIG" != "x"; then
2388 TCL_PKGINDEX_SWIG="gv/pkgIndex.tcl"
2391 AC_SUBST([TCL_PKGINDEX])
2392 AC_SUBST([TCL_PKGINDEX_GD])
2393 AC_SUBST([TCL_PKGINDEX_SWIG])
2395 dnl -----------------------------------
2399 [AS_HELP_STRING([--with-sfdp=yes],[sfdp layout engine])],
2400 [], [with_sfdp=yes])
2402 if test "x$with_sfdp" != "xyes"; then
2403 use_sfdp="No (disabled)"
2406 AC_DEFINE_UNQUOTED(SFDP,1,[Define if you want SFDP])
2408 AM_CONDITIONAL(WITH_SFDP, [test "x$use_sfdp" = "xYes"])
2410 dnl -----------------------------------
2414 [AS_HELP_STRING([--with-smyrna=yes],[SMYRNA large graph viewer])],
2415 [], [with_smyrna=yes])
2417 if test "x$with_smyrna" != "xyes"; then
2418 use_smyrna="No (disabled)"
2420 if test "x$use_gtk" != "xYes"; then
2421 AC_MSG_WARN(SMYRNA requires GTK)
2424 if test "x$use_gtkglext" != "xYes"; then
2425 AC_MSG_WARN(SMYRNA requires GTKGLEXT)
2426 requires="$requires gtkglext"
2428 if test "x$use_glade" != "xYes"; then
2429 AC_MSG_WARN(SMYRNA requires GLADE)
2430 requires="$requires glade"
2432 if test "x$use_gts" != "xYes"; then
2433 AC_MSG_WARN(SMYRNA requires GTS)
2434 requires="$requires gts"
2436 if test "x$use_glut" != "xYes"; then
2437 AC_MSG_WARN(SMYRNA requires GLUT)
2438 requires="$requires glut"
2440 if test "x$requires" != "x"; then
2441 use_smyrna="No (requires:$requires)"
2446 AM_CONDITIONAL(WITH_SMYRNA, [test "x$use_smyrna" = "xYes"])
2448 dnl -----------------------------------
2452 [AS_HELP_STRING([--with-ortho=yes],[ORTHO features in neato layout engine])],
2453 [], [with_ortho=yes])
2455 if test "x$with_ortho" != "xyes"; then
2456 use_ortho="No (disabled)"
2459 AC_DEFINE_UNQUOTED(ORTHO,1,[Define if you want ORTHO])
2461 AM_CONDITIONAL(WITH_ORTHO, [test "x$use_ortho" = "xYes"])
2463 dnl -----------------------------------
2466 AC_ARG_WITH(digcola,
2467 [AS_HELP_STRING([--with-digcola=yes],[DIGCOLA features in neato layout engine])],
2468 [], [with_digcola=yes])
2470 if test "x$with_digcola" != "xyes"; then
2471 use_digcola="No (disabled)"
2474 AC_DEFINE_UNQUOTED(DIGCOLA,1,[Define if you want DIGCOLA])
2477 dnl -----------------------------------
2478 dnl IPSEPCOLA /* enabled by default. C++ issues on some platforms should be resolved by now */
2479 AC_ARG_WITH(ipsepcola,
2480 [AS_HELP_STRING([--with-ipsepcola=yes],[IPSEPCOLA features in neato layout engine])],
2481 [], [with_ipsepcola=yes])
2483 if test "x$with_ipsepcola" != "xyes"; then
2484 use_ipsepcola="No (disabled)"
2486 if test "x$use_digcola" != "xYes"; then
2487 use_ipsepcola="No (requires: digcola)"
2490 AC_DEFINE_UNQUOTED(IPSEPCOLA,1,[Define if you want IPSEPCOLA])
2491 IPSEPCOLA_INCLUDES='-I$(top_srcdir)/lib/vpsc'
2492 IPSEPCOLA_LIBS='$(top_builddir)/lib/vpsc/libvpsc_C.la'
2493 AC_SUBST([IPSEPCOLA_INCLUDES])
2494 AC_SUBST([IPSEPCOLA_LIBS])
2497 AM_CONDITIONAL(WITH_IPSEPCOLA, [test "x$use_ipsepcola" = "xYes"])
2499 # -----------------------------------
2500 AC_MSG_CHECKING(if FILE struct contains _cnt)
2501 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
2505 ]])],[AC_MSG_RESULT(yes)
2506 AC_DEFINE_UNQUOTED(HAVE_FILE_CNT,1,Define if FILE structure provides _cnt)
2507 ],[AC_MSG_RESULT(no)
2510 # -----------------------------------
2512 AC_MSG_CHECKING(if FILE struct contains _r)
2513 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
2517 ]])],[AC_MSG_RESULT(yes)
2518 AC_DEFINE_UNQUOTED(HAVE_FILE_R,1,Define if FILE structure provides _r)
2519 ],[AC_MSG_RESULT(no)
2522 # -----------------------------------
2524 AC_MSG_CHECKING(if FILE struct contains _next)
2525 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
2529 ]])],[AC_MSG_RESULT(yes)
2530 AC_DEFINE_UNQUOTED(HAVE_FILE_NEXT,1,Define if FILE structure provides _next)
2531 ],[AC_MSG_RESULT(no)
2534 # -----------------------------------
2536 AC_MSG_CHECKING(if FILE struct contains _IO_read_end)
2537 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
2541 ]])],[AC_MSG_RESULT(yes)
2542 AC_DEFINE_UNQUOTED(HAVE_FILE_IO_READ_END,1,Define if FILE structure provides _IO_read_end)
2543 ],[AC_MSG_RESULT(no)
2546 # -----------------------------------
2548 AC_MSG_CHECKING(if intptr_t is declared)
2549 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
2552 ]])],[AC_MSG_RESULT(yes)
2553 AC_DEFINE_UNQUOTED(HAVE_INTPTR_T,1,Define if intptr_t is declared)
2554 ],[AC_MSG_RESULT(no)
2557 # -----------------------------------------------------------------------
2559 # This is a historical artifact ... there are no other choices these days
2560 # This #define is never used in our sources,
2561 # but apparently may still be in use by others
2562 AC_DEFINE_UNQUOTED(WITH_CGRAPH,1,[Historical artifact - always true])
2563 AM_CONDITIONAL(WITH_CGRAPH, [true])
2565 # -----------------------------------------------------------------------
2567 # Checking for unit testing framework Criterion
2568 # This framework is used for the unit tests
2574 AC_DEFINE_UNQUOTED(HAVE_CRITERION,1,[Criterion unit testing framework is installed and available for use.])
2577 use_criterion="No (Criterion unit testing framework not installed)"
2578 AC_MSG_WARN(Criterion unit testing framework not installed)
2582 AM_CONDITIONAL(HAVE_CRITERION, test "$use_criterion" = "Yes")
2584 # -----------------------------------------------------------------------
2586 # Generate Makefiles
2587 # tests/regression_tests/vuln/Makefile was removed
2588 AC_CONFIG_FILES(Makefile
2594 contrib/prune/Makefile
2595 contrib/diffimg/Makefile
2597 graphs/directed/Makefile
2598 graphs/undirected/Makefile
2603 lib/cgraph/libcgraph.pc
2605 lib/pathplan/Makefile
2606 lib/pathplan/libpathplan.pc
2609 lib/sfio/Sfio_f/Makefile
2610 lib/vmalloc/Makefile
2612 lib/neatogen/Makefile
2617 lib/sfdpgen/Makefile
2618 lib/sfdpgen/libsfdp.pc
2620 lib/edgepaint/Makefile
2621 lib/edgepaint/liblab_gamut.pc
2624 lib/circogen/Makefile
2625 lib/twopigen/Makefile
2626 lib/patchwork/Makefile
2632 lib/ingraphs/Makefile
2638 lib/topfish/Makefile
2641 macosx/build/graphviz.pmdoc/01local.xml
2642 macosx/build/graphviz.pmdoc/02graphviz.xml
2643 windows/build/graphviz.wxs
2644 windows/Properties/AssemblyInfo.cs
2646 plugin/core/Makefile
2647 plugin/devil/Makefile
2650 plugin/gdiplus/Makefile
2653 plugin/lasi/Makefile
2654 plugin/pango/Makefile
2655 plugin/poppler/Makefile
2656 plugin/quartz/Makefile
2657 plugin/rsvg/Makefile
2658 plugin/visio/Makefile
2659 plugin/webp/Makefile
2660 plugin/xlib/Makefile
2661 plugin/dot_layout/Makefile
2662 plugin/neato_layout/Makefile
2667 cmd/gvpr/lib/Makefile
2671 cmd/edgepaint/Makefile
2673 cmd/gvedit/gvedit.pro
2674 cmd/gvedit/ui/Makefile
2675 cmd/gvedit/images/Makefile
2677 tclpkg/tclstubs/Makefile
2678 tclpkg/tclhandle/Makefile
2679 tclpkg/gdtclft/Makefile
2680 tclpkg/gdtclft/demo/Makefile
2681 tclpkg/tcldot/Makefile
2682 tclpkg/tcldot/demo/Makefile
2683 tclpkg/tclpathplan/Makefile
2684 tclpkg/tclpathplan/demo/Makefile
2685 tclpkg/tclpathplan/demo/pathplan_data/Makefile
2687 tclpkg/gv/demo/Makefile
2689 tests/graphs/Makefile
2690 tests/linux.x86/Makefile
2692 tests/unit_tests/Makefile
2693 tests/unit_tests/lib/Makefile
2694 tests/unit_tests/lib/common/Makefile
2695 tests/regression_tests/Makefile
2696 tests/regression_tests/shapes/Makefile
2697 tests/regression_tests/shapes/reference/Makefile
2698 tests/regression_tests/vuln/Makefile
2699 tests/regression_tests/vuln/input/Makefile
2700 tests/regression_tests/vuln/reference/Makefile
2702 share/examples/Makefile
2704 redhat/graphviz.spec.fedora
2705 redhat/graphviz.spec.rhel
2711 dnl ===========================================================================
2713 if test "x$use_tcl" != "xYes"; then
2714 use_tcldot="No (tcl not available)"
2715 use_gdtclft="No (tcl not available)"
2716 use_tclpathplan="No (tcl not available)"
2717 use_gv_tcl="No (tcl not available)"
2720 use_tclpathplan="Yes"
2721 if test "x$use_swig" != "xYes"; then
2722 use_gv_tcl="No (swig not available)"
2726 if test "x$use_gd" != "xYes"; then
2727 if test "x$use_gd" = "xYes (internal)"; then
2730 use_gdtclft="No (gd not available)"
2738 echo "----------------------------------------------------------------"
2740 echo "graphviz-$VERSION will be compiled with the following:"
2743 echo " cgraph: Yes (always enabled)"
2744 echo " digcola: $use_digcola"
2745 echo " expat: $use_expat"
2746 echo " fontconfig: $use_fontconfig"
2747 echo " freetype: $use_freetype"
2748 echo " glut: $use_glut"
2749 echo " ann: $use_ann"
2750 echo " gts: $use_gts"
2751 echo " ipsepcola: $use_ipsepcola"
2752 echo " ltdl: $use_ltdl"
2753 echo " ortho: $use_ortho"
2754 echo " sfdp: $use_sfdp"
2755 echo " swig: $use_swig ( $SWIG_VERSION )"
2756 echo " shared: $use_shared"
2757 echo " static: $use_static"
2759 echo " x: $use_xlib"
2762 echo " dot: Yes (always enabled)"
2763 echo " neato: Yes (always enabled)"
2764 echo " fdp: Yes (always enabled)"
2765 echo " circo: Yes (always enabled)"
2766 echo " twopi: Yes (always enabled)"
2767 echo " gvpr: Yes (always enabled)"
2768 echo " gvmap: Yes (always enabled)"
2769 echo " smyrna: $use_smyrna"
2770 echo " gvedit: $use_qt"
2772 echo "plugin libraries:"
2773 echo " dot_layout: Yes (always enabled)"
2774 echo " neato_layout: Yes (always enabled)"
2775 echo " core: Yes (always enabled)"
2776 echo " devil: $use_devil"
2778 echo " gdiplus: $use_gdiplus"
2779 echo " gdk: $use_gdk"
2780 echo " gdk_pixbuf: $use_gdk_pixbuf"
2781 echo " ghostscript: $use_ghostscript"
2782 echo " gtk: $use_gtk"
2783 echo " lasi: $use_lasi"
2784 echo " pangocairo: $use_pangocairo"
2785 echo " poppler: $use_poppler"
2786 echo " quartz: $use_quartz"
2787 echo " rsvg: $use_rsvg"
2788 echo " visio: $use_visio"
2789 echo " webp: $use_webp"
2790 echo " xlib: $use_xlib"
2792 echo "language extensions:"
2793 echo " gv_sharp: $use_sharp"
2794 echo " gv_d: $use_d"
2795 echo " gv_go: $use_go"
2796 echo " gv_guile: $use_guile"
2797 echo " gv_io: $use_io"
2798 echo " gv_java: $use_java"
2799 echo " gv_javascript: $use_javascript"
2800 echo " gv_lua: $use_lua"
2801 echo " gv_ocaml: $use_ocaml"
2802 echo " gv_perl: $use_perl"
2803 echo " gv_php: $use_php"
2804 echo " gv_python: $use_python"
2805 echo " gv_python3: $use_python3"
2806 echo " gv_R: $use_r"
2807 echo " gv_ruby: $use_ruby"
2808 echo " gv_tcl: $use_gv_tcl"
2810 echo " tcldot: $use_tcldot"
2811 echo " tclpathplan: $use_tclpathplan"
2812 echo " gdtclft: $use_gdtclft"
2814 echo "Testing utilities:"
2815 echo " criterion: $use_criterion"