build.patch 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421
  1. Upstream-Status: Backport [http://git.gnome.org/browse/unique/commit/?h=unique-1.1&id=f75ca2d7aad7d27686acca6090c1c569a79d7e63]
  2. Signed-off-By: Ross Burton <ross.burton@intel.com>
  3. From f75ca2d7aad7d27686acca6090c1c569a79d7e63 Mon Sep 17 00:00:00 2001
  4. From: Emmanuele Bassi <ebassi@gnome.org>
  5. Date: Sat, 08 May 2010 11:17:21 +0000
  6. Subject: build: Update the build environment
  7. Require autoconf 2.63, automake 1.11 and libtool 2.2.6 to remove Shave.
  8. Also bump up the requirement for gobject-introspection to 0.6.7.
  9. ---
  10. diff --git a/build/autotools/Makefile.am b/build/autotools/Makefile.am
  11. index 5f35b85..b78428f 100644
  12. --- a/build/autotools/Makefile.am
  13. +++ b/build/autotools/Makefile.am
  14. @@ -1,7 +1,4 @@
  15. EXTRA_DIST = \
  16. - shave-libtool.in \
  17. - shave.in \
  18. - shave.m4 \
  19. as-compiler-flag.m4 \
  20. introspection.m4 \
  21. Makefile.am.enums \
  22. diff --git a/build/autotools/Makefile.am.silent b/build/autotools/Makefile.am.silent
  23. index 249f6af..8576846 100644
  24. --- a/build/autotools/Makefile.am.silent
  25. +++ b/build/autotools/Makefile.am.silent
  26. @@ -1,10 +1,5 @@
  27. # custom rules for quiet builds
  28. -if USE_SHAVE
  29. -QUIET_GEN = $(Q:@=@echo ' GEN '$@;)
  30. -QUIET_LN = $(Q:@=@echo ' LN '$@;)
  31. -QUIET_RM = $(Q:@=@echo ' RM '$@;)
  32. -else
  33. QUIET_GEN = $(AM_V_GEN)
  34. QUIET_LN = $(QUIET_LN_$(V))
  35. @@ -14,4 +9,3 @@ QUIET_LN_0 = @echo ' LN '$@;
  36. QUIET_RM = $(QUIET_RM_$(V))
  37. QUIET_RM_ = $(QUIET_RM_$(AM_DEFAULT_VERBOSITY))
  38. QUIET_RM_0 = @echo ' RM '$@;
  39. -endif # USE_SHAVE
  40. diff --git a/build/autotools/introspection.m4 b/build/autotools/introspection.m4
  41. index f9ce49c..589721c 100644
  42. --- a/build/autotools/introspection.m4
  43. +++ b/build/autotools/introspection.m4
  44. @@ -59,12 +59,18 @@ m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
  45. INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
  46. INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
  47. INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
  48. + INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
  49. + INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
  50. + INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
  51. fi
  52. AC_SUBST(INTROSPECTION_SCANNER)
  53. AC_SUBST(INTROSPECTION_COMPILER)
  54. AC_SUBST(INTROSPECTION_GENERATE)
  55. AC_SUBST(INTROSPECTION_GIRDIR)
  56. AC_SUBST(INTROSPECTION_TYPELIBDIR)
  57. + AC_SUBST(INTROSPECTION_CFLAGS)
  58. + AC_SUBST(INTROSPECTION_LIBS)
  59. + AC_SUBST(INTROSPECTION_MAKEFILE)
  60. AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
  61. ])
  62. diff --git a/build/autotools/shave-libtool.in b/build/autotools/shave-libtool.in
  63. deleted file mode 100644
  64. index 1f3a720..0000000
  65. --- a/build/autotools/shave-libtool.in
  66. +++ b/dev/null
  67. @@ -1,69 +0,0 @@
  68. -#!/bin/sh
  69. -
  70. -# we need sed
  71. -SED=@SED@
  72. -if test -z "$SED" ; then
  73. -SED=sed
  74. -fi
  75. -
  76. -lt_unmangle ()
  77. -{
  78. - last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_\-\.]*_la-##'`
  79. -}
  80. -
  81. -# the real libtool to use
  82. -LIBTOOL="$1"
  83. -shift
  84. -
  85. -# if 1, don't print anything, the underlaying wrapper will do it
  86. -pass_though=0
  87. -
  88. -# scan the arguments, keep the right ones for libtool, and discover the mode
  89. -preserved_args=
  90. -while test "$#" -gt 0; do
  91. - opt="$1"
  92. - shift
  93. -
  94. - case $opt in
  95. - --mode=*)
  96. - mode=`echo $opt | $SED -e 's/[-_a-zA-Z0-9]*=//'`
  97. - preserved_args="$preserved_args $opt"
  98. - ;;
  99. - -o)
  100. - lt_output="$1"
  101. - preserved_args="$preserved_args $opt"
  102. - ;;
  103. - *)
  104. - preserved_args="$preserved_args $opt"
  105. - ;;
  106. - esac
  107. -done
  108. -
  109. -case "$mode" in
  110. -compile)
  111. - # shave will be called and print the actual CC/CXX/LINK line
  112. - preserved_args="$preserved_args --shave-mode=$mode"
  113. - pass_though=1
  114. - ;;
  115. -link)
  116. - preserved_args="$preserved_args --shave-mode=$mode"
  117. - Q=" LINK "
  118. - ;;
  119. -*)
  120. - # let's u
  121. - # echo "*** libtool: Unimplemented mode: $mode, fill a bug report"
  122. - ;;
  123. -esac
  124. -
  125. -lt_unmangle "$lt_output"
  126. -output=$last_result
  127. -
  128. -if test -z $V; then
  129. - if test $pass_though -eq 0; then
  130. - echo "$Q$output"
  131. - fi
  132. - $LIBTOOL --silent $preserved_args
  133. -else
  134. - echo $LIBTOOL $preserved_args
  135. - $LIBTOOL $preserved_args
  136. -fi
  137. diff --git a/build/autotools/shave.in b/build/autotools/shave.in
  138. deleted file mode 100644
  139. index 5c16f27..0000000
  140. --- a/build/autotools/shave.in
  141. +++ b/dev/null
  142. @@ -1,79 +0,0 @@
  143. -#!/bin/sh
  144. -
  145. -# we need sed
  146. -SED=@SED@
  147. -if test -z "$SED" ; then
  148. -SED=sed
  149. -fi
  150. -
  151. -lt_unmangle ()
  152. -{
  153. - last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_\-\.]*_la-##'`
  154. -}
  155. -
  156. -# the tool to wrap (cc, cxx, ar, ranlib, ..)
  157. -tool="$1"
  158. -shift
  159. -
  160. -# the reel tool (to call)
  161. -REEL_TOOL="$1"
  162. -shift
  163. -
  164. -pass_through=0
  165. -preserved_args=
  166. -while test "$#" -gt 0; do
  167. - opt="$1"
  168. - shift
  169. -
  170. - case $opt in
  171. - --shave-mode=*)
  172. - mode=`echo $opt | $SED -e 's/[-_a-zA-Z0-9]*=//'`
  173. - ;;
  174. - -o)
  175. - lt_output="$1"
  176. - preserved_args="$preserved_args $opt"
  177. - ;;
  178. - *)
  179. - preserved_args="$preserved_args $opt"
  180. - ;;
  181. - esac
  182. -done
  183. -
  184. -# mode=link is handled in the libtool wrapper
  185. -case "$mode,$tool" in
  186. -link,*)
  187. - pass_through=1
  188. - ;;
  189. -*,cxx)
  190. - Q=" CXX "
  191. - ;;
  192. -*,cc)
  193. - Q=" CC "
  194. - ;;
  195. -*,fc)
  196. - Q=" FC "
  197. - ;;
  198. -*,f77)
  199. - Q=" F77 "
  200. - ;;
  201. -*,objc)
  202. - Q=" OBJC "
  203. - ;;
  204. -*,*)
  205. - # should not happen
  206. - Q=" CC "
  207. - ;;
  208. -esac
  209. -
  210. -lt_unmangle "$lt_output"
  211. -output=$last_result
  212. -
  213. -if test -z $V; then
  214. - if test $pass_through -eq 0; then
  215. - echo "$Q$output"
  216. - fi
  217. - $REEL_TOOL $preserved_args
  218. -else
  219. - echo $REEL_TOOL $preserved_args
  220. - $REEL_TOOL $preserved_args
  221. -fi
  222. diff --git a/build/autotools/shave.m4 b/build/autotools/shave.m4
  223. deleted file mode 100644
  224. index 0a3509e..0000000
  225. --- a/build/autotools/shave.m4
  226. +++ b/dev/null
  227. @@ -1,77 +0,0 @@
  228. -dnl Make automake/libtool output more friendly to humans
  229. -dnl Damien Lespiau <damien.lespiau@gmail.com>
  230. -dnl
  231. -dnl SHAVE_INIT([shavedir],[default_mode])
  232. -dnl
  233. -dnl shavedir: the directory where the shave scripts are, it defaults to
  234. -dnl $(top_builddir)
  235. -dnl default_mode: (enable|disable) default shave mode. This parameter
  236. -dnl controls shave's behaviour when no option has been
  237. -dnl given to configure. It defaults to disable.
  238. -dnl
  239. -dnl * SHAVE_INIT should be called late in your configure.(ac|in) file (just
  240. -dnl before AC_CONFIG_FILE/AC_OUTPUT is perfect. This macro rewrites CC and
  241. -dnl LIBTOOL, you don't want the configure tests to have these variables
  242. -dnl re-defined.
  243. -dnl * This macro requires GNU make's -s option.
  244. -
  245. -AC_DEFUN([_SHAVE_ARG_ENABLE],
  246. -[
  247. - AC_ARG_ENABLE([shave],
  248. - AS_HELP_STRING(
  249. - [--enable-shave],
  250. - [use shave to make the build pretty [[default=$1]]]),,
  251. - [enable_shave=$1]
  252. - )
  253. -])
  254. -
  255. -AC_DEFUN([SHAVE_INIT],
  256. -[
  257. - dnl you can tweak the default value of enable_shave
  258. - m4_if([$2], [enable], [_SHAVE_ARG_ENABLE(yes)], [_SHAVE_ARG_ENABLE(no)])
  259. -
  260. - if test x"$enable_shave" = xyes; then
  261. - dnl where can we find the shave scripts?
  262. - m4_if([$1],,
  263. - [shavedir="$ac_pwd"],
  264. - [shavedir="$ac_pwd/$1"])
  265. - AC_SUBST(shavedir)
  266. -
  267. - dnl make is now quiet
  268. - AC_SUBST([MAKEFLAGS], [-s])
  269. - AC_SUBST([AM_MAKEFLAGS], ['`test -z $V && echo -s`'])
  270. -
  271. - dnl we need sed
  272. - AC_CHECK_PROG(SED,sed,sed,false)
  273. -
  274. - dnl substitute libtool
  275. - SHAVE_SAVED_LIBTOOL=$LIBTOOL
  276. - LIBTOOL="${SHELL} ${shavedir}/shave-libtool '${SHAVE_SAVED_LIBTOOL}'"
  277. - AC_SUBST(LIBTOOL)
  278. -
  279. - dnl substitute cc/cxx
  280. - SHAVE_SAVED_CC=$CC
  281. - SHAVE_SAVED_CXX=$CXX
  282. - SHAVE_SAVED_FC=$FC
  283. - SHAVE_SAVED_F77=$F77
  284. - SHAVE_SAVED_OBJC=$OBJC
  285. - CC="${SHELL} ${shavedir}/shave cc ${SHAVE_SAVED_CC}"
  286. - CXX="${SHELL} ${shavedir}/shave cxx ${SHAVE_SAVED_CXX}"
  287. - FC="${SHELL} ${shavedir}/shave fc ${SHAVE_SAVED_FC}"
  288. - F77="${SHELL} ${shavedir}/shave f77 ${SHAVE_SAVED_F77}"
  289. - OBJC="${SHELL} ${shavedir}/shave objc ${SHAVE_SAVED_OBJC}"
  290. - AC_SUBST(CC)
  291. - AC_SUBST(CXX)
  292. - AC_SUBST(FC)
  293. - AC_SUBST(F77)
  294. - AC_SUBST(OBJC)
  295. -
  296. - V=@
  297. - else
  298. - V=1
  299. - fi
  300. - Q='$(V:1=)'
  301. - AC_SUBST(V)
  302. - AC_SUBST(Q)
  303. -])
  304. -
  305. diff --git a/configure.ac b/configure.ac
  306. index a3ed3ee..bc3163a 100644
  307. --- a/configure.ac
  308. +++ b/configure.ac
  309. @@ -14,7 +14,7 @@ m4_define([unique_api_version], [1.0])
  310. # This is the X.Y used in the protocol negotiation
  311. m4_define([unique_protocol_version], [1.0])
  312. -AC_PREREQ([2.59])
  313. +AC_PREREQ([2.63])
  314. AC_INIT([unique], [unique_version],
  315. [http://bugzilla.gnome.org/enter_bug.cgi?product=libunique],
  316. @@ -23,9 +23,21 @@ AC_INIT([unique], [unique_version],
  317. AC_CONFIG_SRCDIR([unique/unique.h])
  318. AC_CONFIG_MACRO_DIR([build/autotools])
  319. -AM_INIT_AUTOMAKE([1.10])
  320. +AM_INIT_AUTOMAKE([1.11 no-define -Wno-portability dist-bzip2])
  321. AM_CONFIG_HEADER([config.h])
  322. +AM_SILENT_RULES([yes])
  323. +
  324. +AC_PROG_CC_C_O
  325. +
  326. +AM_PATH_GLIB_2_0
  327. +
  328. +LT_PREREQ([2.2.6])
  329. +LT_INIT([disable-static])
  330. +
  331. +# Honor aclocal flags
  332. +ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
  333. +
  334. # version symbols
  335. UNIQUE_MAJOR_VERSION=unique_major_version
  336. UNIQUE_MINOR_VERSION=unique_minor_version
  337. @@ -49,21 +61,6 @@ UNIQUE_LT_CURRENT_MINUS_AGE=m4_eval(lt_current - lt_age)
  338. AC_SUBST(UNIQUE_LT_VERSION_INFO)
  339. AC_SUBST(UNIQUE_LT_CURRENT_MINUS_AGE)
  340. -AC_ISC_POSIX
  341. -AC_PROG_CC
  342. -AC_PROG_INSTALL
  343. -AC_PROG_MAKE_SET
  344. -AC_C_CONST
  345. -AC_PROG_LIBTOOL
  346. -AC_PATH_PROG(GLIB_MKENUMS, [glib-mkenums])
  347. -AC_PATH_PROG(GLIB_GENMARSHAL, [glib-genmarshal])
  348. -
  349. -AM_SANITY_CHECK
  350. -AM_PROG_CC_STDC
  351. -
  352. -# Honor aclocal flags
  353. -ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
  354. -
  355. m4_define([glib_required], [2.12.0])
  356. m4_define([gtk_required], [2.11.0])
  357. m4_define([dbus_required], [0.70])
  358. @@ -122,7 +119,6 @@ AM_CONDITIONAL([HAVE_DBUS], [test "x$have_dbus" = "xyes"])
  359. dnl Bacon backend
  360. dnl This is the fallback backend, so we *need* these headers and functions
  361. dnl even if we end up using D-Bus
  362. -dnl D-Bus backend dependencies
  363. m4_define([have_bacon_default], [yes])
  364. AC_ARG_ENABLE([bacon],
  365. [AC_HELP_STRING([--enable-bacon=@<:@yes/no@:>@],
  366. @@ -178,9 +174,9 @@ AC_ARG_ENABLE([maintainer-flags],
  367. AS_IF([test "x$enable_maintainer_flags" = "xyes" && test "x$GCC" = "xyes"],
  368. [
  369. AS_COMPILER_FLAGS([MAINTAINER_CFLAGS],
  370. - ["-Werror -Wall -Wshadow -Wcast-align
  371. - -Wno-uninitialized -Wempty-body -Wformat-security
  372. - -Winit-self"])
  373. + ["-Wall -Wshadow -Wcast-align
  374. + -Wno-uninitialized -Wempty-body
  375. + -Wformat-security -Winit-self"])
  376. ]
  377. )
  378. @@ -230,27 +226,10 @@ AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],
  379. AM_GLIB_DEFINE_LOCALEDIR(UNIQUE_LOCALEDIR)
  380. # introspection
  381. -GOBJECT_INTROSPECTION_CHECK([0.6.3])
  382. +GOBJECT_INTROSPECTION_CHECK([0.6.7])
  383. # gtk-doc
  384. -GTK_DOC_CHECK([1.11])
  385. -
  386. -# nice builds
  387. -m4_ifdef([AM_SILENT_RULES],
  388. - [
  389. - AM_SILENT_RULES([yes])
  390. - use_shave=no
  391. - ],
  392. - [
  393. - SHAVE_INIT([build/autotools], [enable])
  394. - AC_CONFIG_FILES([
  395. - build/autotools/shave-libtool
  396. - build/autotools/shave
  397. - ])
  398. - use_shave=yes
  399. - ])
  400. -
  401. -AM_CONDITIONAL([USE_SHAVE], [test "x$use_shave" = "xyes"])
  402. +GTK_DOC_CHECK([1.13])
  403. AC_CONFIG_FILES([
  404. Makefile
  405. --
  406. cgit v0.9.0.2