On Sat, 17 Jan 2009, Shunichi Fuji wrote:
http://source.winehq.org/git/wine.git/?a=commit;h=3fe5d80512ec5dbfbb2ee7dbb4... configure: Check for ESound, FreeType, GPhoto2 and SANE even if their 'xxx-config' tool is missing.
[...] if test "x$with_sane" != "xno" then ac_save_CPPFLAGS="$CPPFLAGS" + ac_sane_libs="-lsane"
We don't need -lsane here because we're using WINE_CHECK_SONAME() which will add it itself (see LIBS="-l$1 $5... on line 42 or aclocal.m4) and because we're not exporting ac_sane_libs. Having it twice would not hurt but it's less correct.
By the way, sane.ds will do a dlopen("libsane.so") to load SANE. That was justified when the dlopen() was done by twain_32.dll, but is it still justified now? Maybe sane.ds should simply link to libsane? That would also 'solve' the 'issue of the extra libraries' that we may have to load before loading libsane (though my understanding is that if libsane requires extra libs and does not link with them that's very much a libsane bug). If we change that then it would be a different matter.
if test "x$with_gphoto" != "xno" then ac_save_CPPFLAGS="$CPPFLAGS" + ac_gphoto2_libs="-lgphoto2" AC_CHECK_PROG(gphoto2_devel,gphoto2-config,gphoto2-config,no)
This one is right because we export ac_gphoto2_libs in GPHOTO2LIBS. However, I think it would be clearer to do it in the else branch of the test for teh xxx-config tool. So something like this:
if test "$gphoto2_devel" != "no" -a "$gphoto2port_devel" != "no" then ... else ac_gphoto2_libs="-lgphoto2" fi ...
dnl **** Check for FreeType 2 **** if test "x$with_freetype" != "xno" then + ac_freetype_libs="-lfreetype" AC_CHECK_PROGS(ft_devel,[freetype-config freetype2-config],no) if test "$ft_devel" != "no" then
This one looks correct, but again I think it would be clearer to have it in the else branch (even if it's one extra line):
if test "$ft_devel" != "no" then ... else ac_freetype_libs="-lfreetype" fi
if test "x$with_esd" != xno then save_CFLAGS="$CFLAGS" + ac_esd_libs="-lesd" AC_PATH_PROG(ESDCONFIG, esd-config, no) if test "x$ESDCONFIG" != "xno" then
Same here.
On Sun, 18 Jan 2009 18:33:44 +0100 (CET) Francois Gouget fgouget@free.fr wrote: [...]
However, I think it would be clearer to do it in the else branch of the test for teh xxx-config tool. So something like this:
if test "$gphoto2_devel" != "no" -a "$gphoto2port_devel" != "no" then ... else ac_gphoto2_libs="-lgphoto2" fi ...From b06d8981ff587e8195942f872bf9fb0b54eacd4f Mon Sep 17 00:00:00 2001
thank you for reviewing.
yeah, sane things had a bit difference. but i don't know how handle about wine's sources and structure ...
i'd like to make more clear like that about other 3 libs.