updated on Wed Jan 25 12:16:47 UTC 2012
[aur-mirror.git] / dreamchess / add-lpthread.diff
blobaeb13e20c910eb3392dbe1679b40d4f05ab6769e
1 --- dreamchess-0.2.0/config.h.in.orig 2007-11-16 13:42:30.000000000 +0100
2 +++ dreamchess-0.2.0/config.h.in 2008-02-16 03:22:28.000000000 +0100
3 @@ -24,9 +24,6 @@
4 /* Define to 1 if you have the <inttypes.h> header file. */
5 #undef HAVE_INTTYPES_H
7 -/* Define to 1 if you have the `mxml' library (-lmxml). */
8 -#undef HAVE_LIBMXML
10 /* Define to 1 if you have the `shlwapi' library (-lshlwapi). */
11 #undef HAVE_LIBSHLWAPI
13 --- dreamchess-0.2.0/configure.orig 2007-11-16 13:42:29.000000000 +0100
14 +++ dreamchess-0.2.0/configure 2008-02-16 03:22:28.000000000 +0100
15 @@ -665,7 +665,6 @@
16 INSTALL_PROGRAM
17 INSTALL_SCRIPT
18 INSTALL_DATA
19 -am__isrc
20 CYGPATH_W
21 PACKAGE
22 VERSION
23 @@ -1931,8 +1930,7 @@
24 test "$program_prefix$program_suffix$program_transform_name" = \
25 NONENONEs,x,x, &&
26 program_prefix=${target_alias}-
27 -am__api_version='1.10'
29 +am__api_version="1.9"
30 # Find a good install program. We prefer a C program (faster),
31 # so one script is as good as another. But avoid the broken or
32 # incompatible versions:
33 @@ -2084,53 +2082,38 @@
34 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
37 -{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
38 -echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; }
39 -if test -z "$MKDIR_P"; then
40 - if test "${ac_cv_path_mkdir+set}" = set; then
41 - echo $ECHO_N "(cached) $ECHO_C" >&6
42 -else
43 - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44 -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
45 -do
46 - IFS=$as_save_IFS
47 - test -z "$as_dir" && as_dir=.
48 - for ac_prog in mkdir gmkdir; do
49 - for ac_exec_ext in '' $ac_executable_extensions; do
50 - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
51 - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
52 - 'mkdir (GNU coreutils) '* | \
53 - 'mkdir (coreutils) '* | \
54 - 'mkdir (fileutils) '4.1*)
55 - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
56 - break 3;;
57 - esac
58 - done
59 - done
60 -done
61 -IFS=$as_save_IFS
63 -fi
65 - if test "${ac_cv_path_mkdir+set}" = set; then
66 - MKDIR_P="$ac_cv_path_mkdir -p"
67 +if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
68 + # We used to keeping the `.' as first argument, in order to
69 + # allow $(mkdir_p) to be used without argument. As in
70 + # $(mkdir_p) $(somedir)
71 + # where $(somedir) is conditionally defined. However this is wrong
72 + # for two reasons:
73 + # 1. if the package is installed by a user who cannot write `.'
74 + # make install will fail,
75 + # 2. the above comment should most certainly read
76 + # $(mkdir_p) $(DESTDIR)$(somedir)
77 + # so it does not work when $(somedir) is undefined and
78 + # $(DESTDIR) is not.
79 + # To support the latter case, we have to write
80 + # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
81 + # so the `.' trick is pointless.
82 + mkdir_p='mkdir -p --'
83 +else
84 + # On NextStep and OpenStep, the `mkdir' command does not
85 + # recognize any option. It will interpret all options as
86 + # directories to create, and then abort because `.' already
87 + # exists.
88 + for d in ./-p ./--version;
89 + do
90 + test -d $d && rmdir $d
91 + done
92 + # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
93 + if test -f "$ac_aux_dir/mkinstalldirs"; then
94 + mkdir_p='$(mkinstalldirs)'
95 else
96 - # As a last resort, use the slow shell script. Don't cache a
97 - # value for MKDIR_P within a source directory, because that will
98 - # break other packages using the cache if that directory is
99 - # removed, or if the value is a relative name.
100 - test -d ./--version && rmdir ./--version
101 - MKDIR_P="$ac_install_sh -d"
102 + mkdir_p='$(install_sh) -d'
105 -{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5
106 -echo "${ECHO_T}$MKDIR_P" >&6; }
108 -mkdir_p="$MKDIR_P"
109 -case $mkdir_p in
110 - [\\/$]* | ?:[\\/]*) ;;
111 - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
112 -esac
114 for ac_prog in gawk mawk nawk awk
116 @@ -2213,16 +2196,12 @@
118 rmdir .tst 2>/dev/null
120 -if test "`cd $srcdir && pwd`" != "`pwd`"; then
121 - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
122 - # is not polluted with repeated "-I."
123 - am__isrc=' -I$(srcdir)'
124 - # test to see if srcdir already configured
125 - if test -f $srcdir/config.status; then
126 - { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
127 +# test to see if srcdir already configured
128 +if test "`cd $srcdir && pwd`" != "`pwd`" &&
129 + test -f $srcdir/config.status; then
130 + { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
131 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
132 { (exit 1); exit 1; }; }
133 - fi
136 # test whether we have cygpath
137 @@ -2265,7 +2244,7 @@
139 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
141 -install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
142 +install_sh=${install_sh-"$am_aux_dir/install-sh"}
144 # Installed binaries are usually stripped using `strip' when the user
145 # run `make install-strip'. However `strip' might not be the right
146 @@ -2369,7 +2348,7 @@
150 -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
151 +INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
153 # We need awk for the "check" target. The system "awk" is bad on
154 # some platforms.
155 @@ -3359,7 +3338,9 @@
156 am_depcomp="$ac_aux_dir/depcomp"
157 AMDEPBACKSLASH='\'
159 - if test "x$enable_dependency_tracking" != xno; then
162 +if test "x$enable_dependency_tracking" != xno; then
163 AMDEP_TRUE=
164 AMDEP_FALSE='#'
165 else
166 @@ -3369,6 +3350,7 @@
171 depcc="$CC" am_compiler_list=
173 { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
174 @@ -3436,7 +3418,6 @@
175 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
176 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
177 >/dev/null 2>conftest.err &&
178 - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
179 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
180 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
181 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
182 @@ -3466,7 +3447,9 @@
183 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
184 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
186 - if
190 test "x$enable_dependency_tracking" != xno \
191 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
192 am__fastdepCC_TRUE=
193 @@ -4067,20 +4050,21 @@
196 if test x$sdl_exec_prefix != x ; then
197 - sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"
198 - if test x${SDL_CONFIG+set} != xset ; then
199 - SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
200 - fi
201 + sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"
202 + if test x${SDL_CONFIG+set} != xset ; then
203 + SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
204 + fi
206 if test x$sdl_prefix != x ; then
207 - sdl_args="$sdl_args --prefix=$sdl_prefix"
208 - if test x${SDL_CONFIG+set} != xset ; then
209 - SDL_CONFIG=$sdl_prefix/bin/sdl-config
210 - fi
211 + sdl_args="$sdl_args --prefix=$sdl_prefix"
212 + if test x${SDL_CONFIG+set} != xset ; then
213 + SDL_CONFIG=$sdl_prefix/bin/sdl-config
214 + fi
218 - PATH="$prefix/bin:$prefix/usr/bin:$PATH"
219 + if test "x$prefix" != xNONE; then
220 + PATH="$prefix/bin:$prefix/usr/bin:$PATH"
221 + fi
222 # Extract the first word of "sdl-config", so it can be a program name with args.
223 set dummy sdl-config; ac_word=$2
224 { echo "$as_me:$LINENO: checking for $ac_word" >&5
225 @@ -4140,8 +4124,10 @@
226 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
227 if test "x$enable_sdltest" = "xyes" ; then
228 ac_save_CFLAGS="$CFLAGS"
229 + ac_save_CXXFLAGS="$CXXFLAGS"
230 ac_save_LIBS="$LIBS"
231 CFLAGS="$CFLAGS $SDL_CFLAGS"
232 + CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
233 LIBS="$LIBS $SDL_LIBS"
234 rm -f conf.sdltest
235 if test "$cross_compiling" = yes; then
236 @@ -4246,6 +4232,7 @@
239 CFLAGS="$ac_save_CFLAGS"
240 + CXXFLAGS="$ac_save_CXXFLAGS"
241 LIBS="$ac_save_LIBS"
244 @@ -4267,6 +4254,7 @@
245 else
246 echo "*** Could not run SDL test program, checking why..."
247 CFLAGS="$CFLAGS $SDL_CFLAGS"
248 + CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
249 LIBS="$LIBS $SDL_LIBS"
250 cat >conftest.$ac_ext <<_ACEOF
251 /* confdefs.h. */
252 @@ -4331,6 +4319,7 @@
253 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
254 conftest$ac_exeext conftest.$ac_ext
255 CFLAGS="$ac_save_CFLAGS"
256 + CXXFLAGS="$ac_save_CXXFLAGS"
257 LIBS="$ac_save_LIBS"
260 @@ -5683,7 +5672,9 @@
261 SDL_LIBS="${SDL_IMAGE_LIBS} ${SDL_LIBS}"
264 - if test x"$with_ui_sdlgl" = xyes; then
267 +if test x"$with_ui_sdlgl" = xyes; then
268 UI_SDLGL_TRUE=
269 UI_SDLGL_FALSE='#'
270 else
271 @@ -6839,6 +6830,70 @@
275 +{ echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
276 +echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
277 +if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
278 + echo $ECHO_N "(cached) $ECHO_C" >&6
279 +else
280 + ac_check_lib_save_LIBS=$LIBS
281 +LIBS="-lpthread $LIBS"
282 +cat >conftest.$ac_ext <<_ACEOF
283 +/* confdefs.h. */
284 +_ACEOF
285 +cat confdefs.h >>conftest.$ac_ext
286 +cat >>conftest.$ac_ext <<_ACEOF
287 +/* end confdefs.h. */
289 +/* Override any GCC internal prototype to avoid an error.
290 + Use char because int might match the return type of a GCC
291 + builtin and then its argument prototype would still apply. */
292 +#ifdef __cplusplus
293 +extern "C"
294 +#endif
295 +char pthread_create ();
296 +int
297 +main ()
299 +return pthread_create ();
301 + return 0;
303 +_ACEOF
304 +rm -f conftest.$ac_objext conftest$ac_exeext
305 +if { (ac_try="$ac_link"
306 +case "(($ac_try" in
307 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
308 + *) ac_try_echo=$ac_try;;
309 +esac
310 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
311 + (eval "$ac_link") 2>conftest.er1
312 + ac_status=$?
313 + grep -v '^ *+' conftest.er1 >conftest.err
314 + rm -f conftest.er1
315 + cat conftest.err >&5
316 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
317 + (exit $ac_status); } && {
318 + test -z "$ac_c_werror_flag" ||
319 + test ! -s conftest.err
320 + } && test -s conftest$ac_exeext &&
321 + $as_test_x conftest$ac_exeext; then
322 + ac_cv_lib_pthread_pthread_create=yes
323 +else
324 + echo "$as_me: failed program was:" >&5
325 +sed 's/^/| /' conftest.$ac_ext >&5
327 + ac_cv_lib_pthread_pthread_create=no
330 +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
331 + conftest$ac_exeext conftest.$ac_ext
332 +LIBS=$ac_check_lib_save_LIBS
334 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
335 +echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6; }
336 +if test $ac_cv_lib_pthread_pthread_create = yes; then
337 + PTHREAD_LIB="-lpthread"
340 { echo "$as_me:$LINENO: checking for mxmlLoadFile in -lmxml" >&5
341 echo $ECHO_N "checking for mxmlLoadFile in -lmxml... $ECHO_C" >&6; }
342 @@ -6846,7 +6901,7 @@
343 echo $ECHO_N "(cached) $ECHO_C" >&6
344 else
345 ac_check_lib_save_LIBS=$LIBS
346 -LIBS="-lmxml $LIBS"
347 +LIBS="-lmxml ${PTHREAD_LIB} $LIBS"
348 cat >conftest.$ac_ext <<_ACEOF
349 /* confdefs.h. */
350 _ACEOF
351 @@ -6902,12 +6957,7 @@
352 { echo "$as_me:$LINENO: result: $ac_cv_lib_mxml_mxmlLoadFile" >&5
353 echo "${ECHO_T}$ac_cv_lib_mxml_mxmlLoadFile" >&6; }
354 if test $ac_cv_lib_mxml_mxmlLoadFile = yes; then
355 - cat >>confdefs.h <<_ACEOF
356 -#define HAVE_LIBMXML 1
357 -_ACEOF
359 - LIBS="-lmxml $LIBS"
361 + MXML_LIB="lmxml"
362 else
363 { { echo "$as_me:$LINENO: error: Cannot find Mini-XML library." >&5
364 echo "$as_me: error: Cannot find Mini-XML library." >&2;}
365 @@ -6915,7 +6965,9 @@
369 - if test x"$beos_rc" = x"yes"; then
372 +if test x"$beos_rc" = x"yes"; then
373 BEOS_RC_TRUE=
374 BEOS_RC_FALSE='#'
375 else
376 @@ -8007,7 +8059,6 @@
377 ac_pwd='$ac_pwd'
378 srcdir='$srcdir'
379 INSTALL='$INSTALL'
380 -MKDIR_P='$MKDIR_P'
381 _ACEOF
383 cat >>$CONFIG_STATUS <<\_ACEOF
384 @@ -8247,7 +8298,6 @@
385 INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
386 INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
387 INSTALL_DATA!$INSTALL_DATA$ac_delim
388 -am__isrc!$am__isrc$ac_delim
389 CYGPATH_W!$CYGPATH_W$ac_delim
390 PACKAGE!$PACKAGE$ac_delim
391 VERSION!$VERSION$ac_delim
392 @@ -8292,6 +8342,7 @@
393 SDL_CFLAGS!$SDL_CFLAGS$ac_delim
394 SDL_LIBS!$SDL_LIBS$ac_delim
395 UI_LIBS!$UI_LIBS$ac_delim
396 +UI_SDLGL_TRUE!$UI_SDLGL_TRUE$ac_delim
397 _ACEOF
399 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
400 @@ -8333,7 +8384,6 @@
401 ac_delim='%!_!# '
402 for ac_last_try in false false false false false :; do
403 cat >conf$$subs.sed <<_ACEOF
404 -UI_SDLGL_TRUE!$UI_SDLGL_TRUE$ac_delim
405 UI_SDLGL_FALSE!$UI_SDLGL_FALSE$ac_delim
406 DREAMER_SDL_CFLAGS!$DREAMER_SDL_CFLAGS$ac_delim
407 PIPE_LIB!$PIPE_LIB$ac_delim
408 @@ -8356,7 +8406,7 @@
409 LTLIBOBJS!$LTLIBOBJS$ac_delim
410 _ACEOF
412 - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 21; then
413 + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 20; then
414 break
415 elif $ac_last_try; then
416 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
417 @@ -8583,11 +8633,6 @@
418 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
419 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
420 esac
421 - ac_MKDIR_P=$MKDIR_P
422 - case $MKDIR_P in
423 - [\\/$]* | ?:[\\/]* ) ;;
424 - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
425 - esac
426 _ACEOF
428 cat >>$CONFIG_STATUS <<\_ACEOF
429 @@ -8641,7 +8686,6 @@
430 s&@abs_builddir@&$ac_abs_builddir&;t t
431 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
432 s&@INSTALL@&$ac_INSTALL&;t t
433 -s&@MKDIR_P@&$ac_MKDIR_P&;t t
434 $ac_datarootdir_hack
435 " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
437 @@ -8806,9 +8850,8 @@
438 # some people rename them; so instead we look at the file content.
439 # Grep'ing the first line is not enough: some people post-process
440 # each Makefile.in and add a new line on top of each file to say so.
441 - # Grep'ing the whole file is not good either: AIX grep has a line
442 - # limit of 2048, but all sed's we know have understand at least 4000.
443 - if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
444 + # So let's grep whole file.
445 + if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
446 dirpart=`$as_dirname -- "$mf" ||
447 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
448 X"$mf" : 'X\(//\)[^/]' \| \
449 --- dreamchess-0.2.0.orig/configure.ac.orig 2007-11-15 23:08:22.000000000 +0100
450 +++ dreamchess-0.2.0/configure.ac 2008-02-16 03:22:11.000000000 +0100
451 @@ -293,7 +293,8 @@
454 AC_CHECK_HEADER([mxml.h], [], [AC_MSG_ERROR([Cannot find Mini-XML header file.])])
455 -AC_CHECK_LIB(mxml, mxmlLoadFile, [], [AC_MSG_ERROR([Cannot find Mini-XML library.])])
456 +AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread")
457 +AC_CHECK_LIB(mxml, mxmlLoadFile, [MXML_LIB="lmxml"], [AC_MSG_ERROR([Cannot find Mini-XML library.])], [${PTHREAD_LIB}])
459 AM_CONDITIONAL(BEOS_RC, test x"$beos_rc" = x"yes")
460 AC_SUBST(DREAMCHESS_LIBS)