Hi, I am running into a problem, each time I rerun tools/wineinstall: wineinstall calls configure; configure finds a valid config.cache. On detction of the aRTS sound server it does the following: if test "${ac_cv_c_artsserver+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # check for aRTS ...
so if configure is called repeatedly, the else clause is not executed. But only in this else clause, ARTSC_CFLAGS and ARTSC_LIBS are set, which results in an uncompilable wine alsa driver because ARTSLIBS and ARTSINCL is set to those vars.
Something similar happens in the detection of the asm keywords to be used in the stabs generation.
I am not an autoconf guru, so I have no clue how to fix this.
Regards
Dominik
On Sat, Jan 17, 2004 at 04:49:09PM +0100, Dominik Strasser wrote:
Hi, I am running into a problem, each time I rerun tools/wineinstall: wineinstall calls configure; configure finds a valid config.cache. On detction of the aRTS sound server it does the following: if test "${ac_cv_c_artsserver+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # check for aRTS ...
so if configure is called repeatedly, the else clause is not executed. But only in this else clause, ARTSC_CFLAGS and ARTSC_LIBS are set, which results in an uncompilable wine alsa driver because ARTSLIBS and ARTSINCL is set to those vars.
Something similar happens in the detection of the asm keywords to be used in the stabs generation.
This is fine, the calculated string is saved in the cache.
However the ICU detection was broken too.
I am not an autoconf guru, so I have no clue how to fix this.
I am a bit of one, so here is a patch.
Ciao, Marcus
Changelog: Removed AC_CACHE_CHECK around checks with side effects.
Index: configure.ac =================================================================== RCS file: /home/wine/wine/configure.ac,v retrieving revision 1.230 diff -u -r1.230 configure.ac --- configure.ac 15 Jan 2004 04:56:18 -0000 1.230 +++ configure.ac 17 Jan 2004 19:39:27 -0000 @@ -413,24 +413,24 @@ AC_SUBST(SANEINCL)
dnl **** Check for the ICU library **** -AC_CHECK_HEADERS(unicode/ubidi.h) -if test "$ac_cv_header_unicode_ubidi_h" = "yes" -then - AC_CACHE_CHECK([whether we can statically link the ICU libraries], ac_cv_lib_icu, - [saved_libs="$LIBS" - ICU_LIB_DIR="${ICU_LIB_DIR-/usr/lib}" - ICUUC_LIB="${ICUUC_LIB-$ICU_LIB_DIR/libicuuc.a}" - ICUDATA_LIB="${ICUDATA_LIB-$ICU_LIB_DIR/libicudata.a}" - LIBS="$LIBS $ICUUC_LIB $ICUDATA_LIB -lstdc++ -lgcc_s" - AC_TRY_LINK([#include <unicode/ubidi.h>],[ubidi_open()], - [ac_cv_lib_icu="yes"],[ac_cv_lib_icu="no"]) - LIBS="$saved_libs"]) - if test "$ac_cv_lib_icu" = "yes" - then - AC_DEFINE(HAVE_ICU,1,[Define to 1 if the ICU libraries are installed]) - AC_SUBST(ICULIBS,"$ICUUC_LIB $ICUDATA_LIB -lstdc++ -lgcc_s") - fi -fi +AC_CHECK_HEADER(unicode/ubidi.h,[ + saved_libs="$LIBS" + + ICU_LIB_DIR="${ICU_LIB_DIR-/usr/lib}" + ICUUC_LIB="${ICUUC_LIB-$ICU_LIB_DIR/libicuuc.a}" + ICUDATA_LIB="${ICUDATA_LIB-$ICU_LIB_DIR/libicudata.a}" + LIBS="$LIBS $ICUUC_LIB $ICUDATA_LIB -lstdc++ -lgcc_s" + AC_TRY_LINK([ + #include <unicode/ubidi.h> + ],[ + ubidi_open() + ], [ + AC_DEFINE(HAVE_ICU,1,[Define to 1 if the ICU libraries are installed]) + AC_SUBST(ICULIBS,"$ICUUC_LIB $ICUDATA_LIB -lstdc++ -lgcc_s") + ] + ) + LIBS="$saved_libs" +])
dnl **** Check for FreeType 2 **** AC_CHECK_LIB(freetype,FT_Init_FreeType,ft_lib=yes,ft_lib=no,$X_LIBS) @@ -605,33 +605,24 @@
dnl **** Check for aRts Sound Server **** AC_PATH_PROG(ARTSCCONFIG, artsc-config) -AC_CACHE_CHECK([for aRts Sound server], - ac_cv_c_artsserver, - if test x$ARTSCCONFIG = x -o x$ARTSCCONFIG = x'"$ARTSCCONFIG"'; - then - ac_cv_c_artsserver=no - else - ARTSC_CFLAGS=`$ARTSCCONFIG --cflags` - ARTSC_LIBS=`$ARTSCCONFIG --libs` - ac_cv_c_artsserver=no - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $ARTSC_CFLAGS" - AC_TRY_COMPILE([ - #include <artsc.h> - ],[ - arts_stream_t stream; - ],[ - ac_cv_c_artsserver=yes - ]) - CFLAGS="$save_CFLAGS" - fi) - -if test "$ac_cv_c_artsserver" = "yes" +if test x$ARTSCCONFIG != x -a x$ARTSCCONFIG != x'"$ARTSCCONFIG"'; then - AC_SUBST(ARTSLIBS, $ARTSC_LIBS) - AC_SUBST(ARTSINCL, $ARTSC_CFLAGS) + ARTSC_CFLAGS=`$ARTSCCONFIG --cflags` + ARTSC_LIBS=`$ARTSCCONFIG --libs` + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $ARTSC_CFLAGS" + AC_TRY_COMPILE([ + #include <artsc.h> + ],[ + arts_stream_t stream; + ],[ + AC_SUBST(ARTSLIBS, $ARTSC_LIBS) + AC_SUBST(ARTSINCL, $ARTSC_CFLAGS)
- AC_DEFINE(HAVE_ARTS, 1, [Define if you have ARTS sound server]) + AC_DEFINE(HAVE_ARTS, 1, [Define if you have ARTS sound server]) + ] + ) + CFLAGS="$save_CFLAGS" fi
dnl **** Check for ALSA ****