Theme engine using TQt for GTK+ 3.x
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

configure.ac 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. AC_PREREQ(2.63)
  2. # Package
  3. AC_INIT([tdegtk],[1.0.1],[https://bugs.trinitydesktop.org],[tdegtk])
  4. AC_CONFIG_SRCDIR([tdegtk/tdegtk.h])
  5. AC_CONFIG_MACRO_DIR([build])
  6. AC_CONFIG_AUX_DIR([build])
  7. AC_CONFIG_HEADERS([config.h])
  8. AM_INIT_AUTOMAKE([1.9 foreign dist-bzip2])
  9. m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
  10. NANO=`echo AC_PACKAGE_VERSION | cut -d'.' -f4`
  11. if test x"$NANO" = x || test "x$NANO" = "x0" ; then
  12. TDEGTK_TRUNK="no"
  13. PACKAGE_VERSION_NANO="0"
  14. else
  15. TDEGTK_TRUNK="yes"
  16. PACKAGE_VERSION_NANO="$NANO"
  17. fi
  18. AC_SUBST(TDEGTK_TRUNK)
  19. AC_SUBST(PACKAGE_VERSION_NANO)
  20. AC_USE_SYSTEM_EXTENSIONS
  21. AC_PROG_CC
  22. AM_PROG_CC_C_O
  23. AC_PROG_CXX
  24. LT_INIT
  25. AC_C_CONST
  26. AC_C_INLINE
  27. # Build dependencies
  28. AC_PATH_PROG([GLIB_MKENUMS], [glib-mkenums])
  29. AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal])
  30. PKG_PROG_PKG_CONFIG
  31. AC_SUBST(glib_req, 2.26.0)
  32. AC_SUBST(gtk_req, 3.1.10)
  33. AC_SUBST(cairo_req, 1.10)
  34. PKG_CHECK_MODULES(DEPS, glib-2.0 >= $glib_req gtk+-3.0 >= $gtk_req cairo >= $cairo_req)
  35. AC_SUBST(DEPS_CFLAGS)
  36. AC_SUBST(DEPS_LIBS)
  37. # Debug flags
  38. if test x$TDEGTK_TRUNK = xyes; then
  39. DEFAULT_DEBUG="yes"
  40. else
  41. DEFAULT_DEBUG="no"
  42. fi
  43. AC_SUBST(DEFAULT_DEBUG)
  44. AC_ARG_ENABLE([debug],
  45. [AS_HELP_STRING([--enable-debug=@<:@no/yes/full@:>@],[Control debug level @<:@default=debug_default@:>@])],
  46. [], [enable_debug=$DEFAULT_DEBUG])
  47. AS_CASE([$enable_debug],
  48. [yes],
  49. [
  50. test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
  51. DEBUG_CFLAGS="-D_DEBUG"
  52. ],
  53. [no],
  54. [DEBUG_CFLAGS="-DNDEBUG"],
  55. [AC_MSG_ERROR([Unknown argument for --enable-debug])]
  56. )
  57. AC_SUBST(DEBUG_CFLAGS)
  58. # Maintainer flags
  59. if test x$TDEGTK_TRUNK = xyes; then
  60. DEFAULT_MAINTAINER_FLAGS="yes"
  61. else
  62. DEFAULT_MAINTAINER_FLAGS="no"
  63. fi
  64. AC_SUBST(DEFAULT_MAINTAINER_FLAGS)
  65. AC_ARG_ENABLE([maintainer-flags],
  66. [AS_HELP_STRING([--enable-maintainer-flags=@<:@no/yes@:>@],[Use strict compiler flags @<:@default=maintainer_flags_default@:>@])],
  67. [],
  68. [enable_maintainer_flags=$DEFAULT_MAINTAINER_FLAGS])
  69. AS_IF([test "x$enable_maintainer_flags" = "xyes" && test "x$GCC" = "xyes"],
  70. [
  71. AS_COMPILER_FLAGS([MAINTAINER_CFLAGS],
  72. ["-fno-common -Wall -Wextra -Werror -Wempty-body
  73. -Wno-missing-field-initializers -Wstrict-aliasing=2
  74. -Wno-unused-parameter -Wdeclaration-after-statement
  75. -Wpointer-arith -Wcast-align -Wwrite-strings
  76. -Wformat-security -Wformat-nonliteral -Winit-self
  77. -Wmissing-declarations -Wnested-externs -Wundef
  78. -Wold-style-definition -Wswitch-default
  79. -Wredundant-decls"])
  80. ]
  81. )
  82. AC_SUBST(MAINTAINER_CFLAGS)
  83. # Variables
  84. TDEGTK_LIBADD="\$(DEPS_LIBS)"
  85. AC_SUBST(TDEGTK_LIBADD)
  86. TDEGTK_CFLAGS="-I\$(top_srcdir) -DTDEGTK_COMPILATION \$(DEPS_CFLAGS) \$(DEBUG_CFLAGS) \$(MAINTAINER_CFLAGS)"
  87. AC_SUBST(TDEGTK_CFLAGS)
  88. TDEGTK_LDFLAGS="-module -avoid-version -no-undefined"
  89. AC_SUBST(TDEGTK_LDFLAGS)
  90. GTK_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-3.0`
  91. AC_SUBST(GTK_VERSION)
  92. # Files
  93. AC_CONFIG_FILES([
  94. Makefile
  95. build/Makefile
  96. po/Makefile
  97. tdegtk/Makefile
  98. tests/Makefile
  99. rc/Makefile
  100. ])
  101. AC_OUTPUT
  102. # Summary
  103. echo ""
  104. echo " tdegtk $PACKAGE_VERSION"
  105. echo " ========================="
  106. echo ""
  107. echo " Debug: ${enable_debug}"
  108. echo " Prefix: ${prefix}"
  109. echo ""
  110. echo " Compiler flags: ${CPPFLAGS} ${DEBUG_CFLAGS} ${MAINTAINER_CFLAGS}"
  111. echo ""