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.
 
 
 
 
 

245 lines
8.5 KiB

  1. dnl $Id: configure.in.in 26568 2008-01-14 01:09:43Z jannis $
  2. dnl
  3. dnl Copyright (c) 2004 - 2008 The Xfce development team
  4. dnl
  5. dnl 2005-2007 Jasper Huijsmans <jasper@xfce.org>
  6. dnl 2006-2008 Nick Schermer <nick@xfce.org>
  7. dnl
  8. dnl ***************************
  9. dnl *** Version information ***
  10. dnl ***************************
  11. m4_define([libxfce4panel_verinfo], [3:0:1])
  12. m4_define([xfce4_panel_version_major], [4])
  13. m4_define([xfce4_panel_version_minor], [7])
  14. m4_define([xfce4_panel_version_micro], [0])
  15. m4_define([xfce4_panel_version_nano], []) dnl leave this empty to have no nano version
  16. m4_define([xfce4_panel_version_build], [@REVISION@])
  17. m4_define([xfce4_panel_version_tag], [git])
  18. m4_define([xfce4_panel_version], [xfce4_panel_version_major().xfce4_panel_version_minor().xfce4_panel_version_micro()ifelse(xfce4_panel_version_nano(), [], [], [.xfce4_panel_version_nano()])ifelse(xfce4_panel_version_tag(), [git], [xfce4_panel_version_tag()-xfce4_panel_version_build()], [xfce4_panel_version_tag()])])
  19. dnl *******************************************
  20. dnl *** Debugging support for SVN snapshots ***
  21. dnl *******************************************
  22. m4_define([panel_debug_default], [ifelse(xfce4_panel_version_tag(), [svn], [yes], [minimum])])
  23. dnl ***************************
  24. dnl *** Initialize autoconf ***
  25. dnl ***************************
  26. AC_COPYRIGHT([Copyright (c) 2002 - 2008
  27. The Xfce development team. All rights reserved.
  28. Written for Xfce by Jasper Huijsmans <jasper@xfce.org>
  29. and Nick Schermer <nick@xfce.org>.])
  30. AC_INIT([xfce4-panel], [xfce4_panel_version], [http://bugzilla.xfce.org/], [xfce4-panel])
  31. AC_PREREQ([2.50])
  32. AC_REVISION([$Id$])
  33. dnl ***************************
  34. dnl *** Initialize automake ***
  35. dnl ***************************
  36. AM_CONFIG_HEADER([config.h])
  37. AM_INIT_AUTOMAKE([1.8 dist-bzip2 tar-ustar])
  38. AM_MAINTAINER_MODE()
  39. dnl *******************************
  40. dnl *** Check for UNIX variants ***
  41. dnl *******************************
  42. AC_AIX()
  43. AC_ISC_POSIX()
  44. dnl ********************************
  45. dnl *** Check for basic programs ***
  46. dnl ********************************
  47. AC_PROG_CC()
  48. AM_PROG_CC_C_O()
  49. AC_PROG_LD()
  50. AC_PROG_INSTALL()
  51. AC_PROG_INTLTOOL()
  52. dnl **************************
  53. dnl *** Initialize libtool ***
  54. dnl **************************
  55. AC_DISABLE_STATIC()
  56. AC_PROG_LIBTOOL()
  57. dnl ****************************
  58. dnl *** Intltool-update hack ***
  59. dnl ****************************
  60. AC_CONFIG_COMMANDS([intltool-update],
  61. [(sed -e 's/^\("desktop.*".*\)/\1\n"rc(?:\\\\.in)+|"\./' intltool-update > intltool-update-tmp &&
  62. mv intltool-update-tmp intltool-update && chmod 755 intltool-update)])
  63. dnl **************************************
  64. dnl *** Substitute version information ***
  65. dnl **************************************
  66. LIBXFCE4PANEL_VERINFO=libxfce4panel_verinfo()
  67. AC_SUBST([LIBXFCE4PANEL_VERINFO])
  68. dnl **********************************
  69. dnl *** Check for standard headers ***
  70. dnl **********************************
  71. AC_HEADER_STDC()
  72. AC_CHECK_HEADERS([stdlib.h unistd.h locale.h stdio.h errno.h time.h string.h \
  73. math.h sys/types.h sys/wait.h memory.h signal.h sys/prctl.h])
  74. dnl ******************************
  75. dnl *** Check for i18n support ***
  76. dnl ******************************
  77. XDT_I18N([@LINGUAS@])
  78. dnl *******************************
  79. dnl *** Check for X11 installed ***
  80. dnl *******************************
  81. XDT_CHECK_LIBX11_REQUIRE()
  82. dnl ***********************************
  83. dnl *** Check for required packages ***
  84. dnl ***********************************
  85. XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.5.92])
  86. XDT_CHECK_PACKAGE([LIBXFCE4MENU], [libxfce4menu-0.1], [4.5.92])
  87. XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.5.0])
  88. XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.5.92])
  89. XDT_CHECK_PACKAGE([EXO], [exo-0.3], [0.3.90])
  90. XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.12.0])
  91. XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.14.0])
  92. XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.14.0])
  93. XDT_CHECK_PACKAGE([GMODULE], [gmodule-2.0], [2.14.0])
  94. XDT_CHECK_PACKAGE([DBUS], [dbus-glib-1], [0.34])
  95. XDT_CHECK_PACKAGE([CAIRO], [cairo], [1.0.0])
  96. XDT_CHECK_PACKAGE([LIBWNCK], [libwnck-1.0], [2.12])
  97. dnl *************************
  98. dnl *** Check for gtk-doc ***
  99. dnl *************************
  100. GTK_DOC_CHECK([1.0])
  101. dnl *********************************************************
  102. dnl *** Disable deprecated components and single includes ***
  103. dnl *********************************************************
  104. dnl #PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DXFCE_DISABLE_DEPRECATED"
  105. dnl #PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DG_DISABLE_DEPRECATED -DG_DISABLE_SINGLE_INCLUDES"
  106. dnl #PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DGTK_DISABLE_DEPRECATED -DGTK_DISABLE_SINGLE_INCLUDES"
  107. dnl #PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES"
  108. dnl #PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DPANGO_DISABLE_DEPRECATED -DPANGO_DISABLE_SINGLE_INCLUDES"
  109. dnl ***********************************
  110. dnl *** Check for debugging support ***
  111. dnl ***********************************
  112. AC_ARG_ENABLE([debug],
  113. AC_HELP_STRING([--enable-debug=@<:@no/minimum/yes/full@:>@], [Turn on debugging @<:@default=panel_debug_default@:>@]),
  114. [], [enable_debug=panel_debug_default])
  115. AC_MSG_CHECKING([whether to enable debugging support])
  116. if test x"$enable_debug" = x"full" -o x"$enable_debug" = x"yes"; then
  117. dnl Print the result
  118. AC_MSG_RESULT([$enable_debug])
  119. dnl Make sure we detect possible errors (if supported)
  120. save_CFLAGS="$CFLAGS"
  121. CFLAGS="$CFLAGS -Wall -Werror"
  122. AC_MSG_CHECKING([whether $CC accepts -Wall -Werror])
  123. AC_COMPILE_IFELSE(AC_LANG_SOURCE([int x;]), [
  124. AC_MSG_RESULT([yes])
  125. PLATFORM_CFLAGS="$PLATFORM_CFLAGS -Wall -Werror"
  126. ], [
  127. AC_MSG_RESULT([no])
  128. ])
  129. CFLAGS="$save_CFLAGS"
  130. dnl Paranoia for --enable-debug=full
  131. if test x"$enable_debug" = x"full"; then
  132. dnl Enable extensive debugging
  133. PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DG_ENABLE_DEBUG"
  134. dnl Use -O0 -g3 if the compiler supports it
  135. save_CFLAGS="$CFLAGS"
  136. CFLAGS="$CFLAGS -O0 -g3"
  137. AC_MSG_CHECKING([whether $CC accepts -O0 -g3])
  138. AC_COMPILE_IFELSE(AC_LANG_SOURCE([int x;]), [
  139. AC_MSG_RESULT([yes])
  140. PLATFORM_CFLAGS="$PLATFORM_CFLAGS -O0 -g3"
  141. ], [
  142. AC_MSG_RESULT([no])
  143. ])
  144. CFLAGS="$save_CFLAGS"
  145. fi
  146. else
  147. dnl Print the result
  148. AC_MSG_RESULT([$enable_debug])
  149. dnl Disable debugging (release build)
  150. PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DNDEBUG"
  151. dnl Disable object cast checks
  152. PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DG_DISABLE_CAST_CHECKS"
  153. dnl Disable all checks for --enable-debug=no
  154. if test x"$enable_debug" = x"no"; then
  155. PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS"
  156. fi
  157. fi
  158. dnl ****************************************
  159. dnl *** Check for ELF visibility support ***
  160. dnl ****************************************
  161. AC_ARG_ENABLE([visibility], AC_HELP_STRING([--disable-visibility], [Do not use ELF visibility attributes]), [], [enable_visibility=yes])
  162. have_gnuc_visibility=no
  163. if test x"$enable_visibility" != x"no"; then
  164. dnl Check whether the compiler supports the visibility attribute
  165. save_CFLAGS="$CFLAGS"
  166. CFLAGS="$CFLAGS -Wall -Werror"
  167. AC_MSG_CHECKING([whether $CC supports the GNUC visibility attribute])
  168. AC_COMPILE_IFELSE(AC_LANG_SOURCE(
  169. [
  170. void __attribute__ ((visibility("default"))) test_default (void) {}
  171. void __attribute__ ((visibility("hidden"))) test_hidden (void) {}
  172. int main (int argc, char **argv) { test_default (); test_hidden (); return 0; }
  173. ]),
  174. [
  175. have_gnuc_visibility=yes
  176. AC_MSG_RESULT([yes])
  177. ],
  178. [
  179. AC_MSG_RESULT([no])
  180. ])
  181. CFLAGS="$save_CFLAGS"
  182. fi
  183. if test x"$have_gnuc_visibility" = x"yes"; then
  184. PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DHAVE_GNUC_VISIBILITY"
  185. PLATFORM_CFLAGS="$PLATFORM_CFLAGS -fvisibility=hidden"
  186. fi
  187. AM_CONDITIONAL([HAVE_GNUC_VISIBILITY], [test x"$have_gnuc_visibility" = x"yes"])
  188. dnl *********************************
  189. dnl *** Substitute platform flags ***
  190. dnl *********************************
  191. AC_MSG_CHECKING([PLATFORM_CPPFLAGS])
  192. AC_MSG_RESULT([$PLATFORM_CPPFLAGS])
  193. AC_SUBST([PLATFORM_CPPFLAGS])
  194. AC_MSG_CHECKING([PLATFORM_CFLAGS])
  195. AC_MSG_RESULT([$PLATFORM_CFLAGS])
  196. AC_SUBST([PLATFORM_CFLAGS])
  197. AC_MSG_CHECKING([PLATFORM_LDFLAGS])
  198. AC_MSG_RESULT([$PLATFORM_LDFLAGS])
  199. AC_SUBST([PLATFORM_LDFLAGS])
  200. AC_OUTPUT([
  201. Makefile
  202. common/Makefile
  203. libxfce4panel/Makefile
  204. libxfce4panel/libxfce4panel-1.0.pc
  205. panel/Makefile
  206. wrapper/Makefile
  207. plugins/Makefile
  208. plugins/actions/Makefile
  209. plugins/clock/Makefile
  210. plugins/launcher/Makefile
  211. plugins/pager/Makefile
  212. plugins/separator/Makefile
  213. plugins/showdesktop/Makefile
  214. plugins/systray/Makefile
  215. plugins/tasklist/Makefile
  216. plugins/windowmenu/Makefile
  217. po/Makefile.in
  218. ])