configure.ac 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. # -*- Autoconf -*-
  2. # Process this file with autoconf to produce a configure script.
  3. AC_PREREQ([2.63])
  4. AC_INIT([xgtk-plugin], [0.1], [[email protected]])
  5. AC_CONFIG_SRCDIR([src/gvplugin_xgtk.c])
  6. AC_CONFIG_AUX_DIR([config])
  7. AC_CONFIG_HEADERS([config.h])
  8. AC_CONFIG_MACRO_DIR([m4])
  9. AM_INIT_AUTOMAKE
  10. # Checks for programs.
  11. AC_PROG_CC
  12. AC_PROG_LIBTOOL
  13. PKG_PROG_PKG_CONFIG
  14. # Checks for libraries.
  15. dnl -----------------------------------
  16. dnl INCLUDES and LIBS for GVC.
  17. AC_ARG_WITH(gvc,
  18. [AS_HELP_STRING([--with-gvc=yes],[gvc library])],
  19. [], [with_gvc=yes])
  20. if test "x$with_gvc" != "xyes"; then
  21. use_gvc="No (disabled)"
  22. else
  23. PKG_CHECK_MODULES(GVC, [libgvc],[
  24. use_gvc="Yes"
  25. AC_DEFINE_UNQUOTED(HAVE_GVC,1,
  26. [Define if you have the gvc library])
  27. AC_SUBST(GVC_CFLAGS)
  28. AC_SUBST(GVC_LIBS)
  29. ],[
  30. use_gvc="No (gvc library not available)"
  31. ])
  32. fi
  33. AM_CONDITIONAL(WITH_GVC, [test "x$use_gvc" = "xYes"])
  34. if test "x$use_gvc" = "xYes"; then
  35. GVPLUGIN_VERSION_INFO=`pkg-config libgvc --variable=plugins`:0:0
  36. AC_SUBST(GVPLUGIN_VERSION_INFO)
  37. GVPLUGIN_DIR=`pkg-config libgvc --variable=libdir`/graphviz
  38. AC_SUBST(GVPLUGIN_DIR)
  39. fi
  40. dnl -----------------------------------
  41. dnl INCLUDES and LIBS for GTK.
  42. AC_ARG_WITH(gtk,
  43. [AS_HELP_STRING([--with-gtk=yes],[gtk+ library])],
  44. [], [with_gtk=yes])
  45. if test "x$with_gtk" != "xyes"; then
  46. use_gtk="No (disabled)"
  47. else
  48. PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.7.0],[
  49. use_gtk="Yes"
  50. AC_DEFINE_UNQUOTED(HAVE_GTK,1,
  51. [Define if you have the gtk library])
  52. AC_SUBST(GTK_CFLAGS)
  53. AC_SUBST(GTK_LIBS)
  54. ],[
  55. use_gtk="No (gtk library not available)"
  56. ])
  57. fi
  58. AM_CONDITIONAL(WITH_GTK, [test "x$use_gtk" = "xYes"])
  59. # Checks for header files.
  60. AC_PATH_X
  61. AC_CHECK_HEADERS([inttypes.h libintl.h stdint.h string.h])
  62. # Checks for typedefs, structures, and compiler characteristics.
  63. # Checks for library functions.
  64. AC_CONFIG_FILES([Makefile src/Makefile xgtk-plugin.spec])
  65. AC_OUTPUT