configure: Check for ESound, FreeType, GPhoto2 and SANE even if their 'xxx-config' tool is missing.

This commit is contained in:
Francois Gouget 2009-01-14 14:16:06 +01:00 committed by Alexandre Julliard
parent 053d521ca7
commit 3fe5d80512
2 changed files with 243 additions and 81 deletions

167
configure vendored
View File

@ -13738,6 +13738,9 @@ esac
fi
if test "x$with_sane" != "xno"
then
ac_save_CPPFLAGS="$CPPFLAGS"
# Extract the first word of "sane-config", so it can be a program name with args.
set dummy sane-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
@ -13776,12 +13779,12 @@ $as_echo "no" >&6; }
fi
if test "$sane_devel" != "no" -a "x$with_sane" != "xno"
if test "$sane_devel" != "no"
then
ac_sane_incl="`$sane_devel --cflags`"
ac_sane_libs="`$sane_devel --ldflags`"
ac_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $ac_sane_incl"
fi
if test "${ac_cv_header_sane_sane_h+set}" = set; then
{ $as_echo "$as_me:$LINENO: checking for sane/sane.h" >&5
$as_echo_n "checking for sane/sane.h... " >&6; }
@ -14016,6 +14019,9 @@ esac
fi
if test "x$with_gphoto" != "xno"
then
ac_save_CPPFLAGS="$CPPFLAGS"
# Extract the first word of "gphoto2-config", so it can be a program name with args.
set dummy gphoto2-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
@ -14092,7 +14098,7 @@ $as_echo "no" >&6; }
fi
if test "$gphoto2_devel" != "no" -a "$gphoto2port_devel" != "no" -a "x$with_gphoto" != "xno"
if test "$gphoto2_devel" != "no" -a "$gphoto2port_devel" != "no"
then
ac_gphoto2_incl="`$gphoto2_devel --cflags` `$gphoto2port_devel --cflags`"
ac_gphoto2_libs=""
@ -14103,8 +14109,8 @@ then
-L*|-l*) ac_gphoto2_libs="$ac_gphoto2_libs $i";;
esac
done
ac_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $ac_gphoto2_incl"
fi
if test "${ac_cv_header_gphoto2_camera_h+set}" = set; then
{ $as_echo "$as_me:$LINENO: checking for gphoto2-camera.h" >&5
$as_echo_n "checking for gphoto2-camera.h... " >&6; }
@ -14490,6 +14496,8 @@ esac
fi
if test "x$with_freetype" != "xno"
then
for ac_prog in freetype-config freetype2-config
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
@ -14531,12 +14539,13 @@ fi
test -n "$ft_devel" && break
done
test -n "$ft_devel" || ft_devel="false"
test -n "$ft_devel" || ft_devel="no"
if test "$ft_devel" != "false" -a "x$with_freetype" != "xno"
if test "$ft_devel" != "no"
then
ac_freetype_libs=`$ft_devel --libs`
ac_freetype_incl=`$ft_devel --cflags`
ac_freetype_libs=`$ft_devel --libs`
fi
{ $as_echo "$as_me:$LINENO: checking for -lfreetype" >&5
$as_echo_n "checking for -lfreetype... " >&6; }
if test "${ac_cv_lib_soname_freetype+set}" = set; then
@ -15373,6 +15382,9 @@ done
LIBS="$ac_wine_check_funcs_save_LIBS"
if test "x$with_esd" != xno
then
save_CFLAGS="$CFLAGS"
# Extract the first word of "esd-config", so it can be a program name with args.
set dummy esd-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
@ -15400,6 +15412,7 @@ done
done
IFS=$as_save_IFS
test -z "$ac_cv_path_ESDCONFIG" && ac_cv_path_ESDCONFIG="no"
;;
esac
fi
@ -15413,7 +15426,7 @@ $as_echo "no" >&6; }
fi
if test "x$with_esd" != xno -a "x$ESDCONFIG" != x -a "x$ESDCONFIG" != x'"$ESDCONFIG"';
if test "x$ESDCONFIG" != "xno"
then
ac_esd_incl=""
for i in `$ESDCONFIG --cflags`
@ -15423,8 +15436,141 @@ then
esac
done
ac_esd_libs=`$ESDCONFIG --libs`
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $ac_esd_incl"
fi
if test "${ac_cv_header_esd_h+set}" = set; then
{ $as_echo "$as_me:$LINENO: checking for esd.h" >&5
$as_echo_n "checking for esd.h... " >&6; }
if test "${ac_cv_header_esd_h+set}" = set; then
$as_echo_n "(cached) " >&6
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_esd_h" >&5
$as_echo "$ac_cv_header_esd_h" >&6; }
else
# Is the header compilable?
{ $as_echo "$as_me:$LINENO: checking esd.h usability" >&5
$as_echo_n "checking esd.h usability... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
#include <esd.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
$as_echo "$ac_header_compiler" >&6; }
# Is the header present?
{ $as_echo "$as_me:$LINENO: checking esd.h presence" >&5
$as_echo_n "checking esd.h presence... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <esd.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then
ac_header_preproc=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
{ $as_echo "$as_me:$LINENO: WARNING: esd.h: accepted by the compiler, rejected by the preprocessor!" >&5
$as_echo "$as_me: WARNING: esd.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ $as_echo "$as_me:$LINENO: WARNING: esd.h: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: esd.h: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
{ $as_echo "$as_me:$LINENO: WARNING: esd.h: present but cannot be compiled" >&5
$as_echo "$as_me: WARNING: esd.h: present but cannot be compiled" >&2;}
{ $as_echo "$as_me:$LINENO: WARNING: esd.h: check for missing prerequisite headers?" >&5
$as_echo "$as_me: WARNING: esd.h: check for missing prerequisite headers?" >&2;}
{ $as_echo "$as_me:$LINENO: WARNING: esd.h: see the Autoconf documentation" >&5
$as_echo "$as_me: WARNING: esd.h: see the Autoconf documentation" >&2;}
{ $as_echo "$as_me:$LINENO: WARNING: esd.h: section \"Present But Cannot Be Compiled\"" >&5
$as_echo "$as_me: WARNING: esd.h: section \"Present But Cannot Be Compiled\"" >&2;}
{ $as_echo "$as_me:$LINENO: WARNING: esd.h: proceeding with the preprocessor's result" >&5
$as_echo "$as_me: WARNING: esd.h: proceeding with the preprocessor's result" >&2;}
{ $as_echo "$as_me:$LINENO: WARNING: esd.h: in the future, the compiler will take precedence" >&5
$as_echo "$as_me: WARNING: esd.h: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
## ------------------------------------ ##
## Report this to wine-devel@winehq.org ##
## ------------------------------------ ##
_ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
{ $as_echo "$as_me:$LINENO: checking for esd.h" >&5
$as_echo_n "checking for esd.h... " >&6; }
if test "${ac_cv_header_esd_h+set}" = set; then
$as_echo_n "(cached) " >&6
else
ac_cv_header_esd_h=$ac_header_preproc
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_esd_h" >&5
$as_echo "$ac_cv_header_esd_h" >&6; }
fi
if test "x$ac_cv_header_esd_h" = x""yes; then
{ $as_echo "$as_me:$LINENO: checking for esd_open_sound in -lesd" >&5
$as_echo_n "checking for esd_open_sound in -lesd... " >&6; }
if test "${ac_cv_lib_esd_esd_open_sound+set}" = set; then
@ -15502,6 +15648,9 @@ _ACEOF
fi
fi
CFLAGS="$save_CFLAGS"
fi

View File

@ -974,13 +974,16 @@ WINE_NOTICE_WITH(curses,[test "x$ac_cv_lib_soname_curses$ac_cv_lib_soname_ncurse
[lib(n)curses ${notice_platform}development files not found, curses won't be supported.])
dnl **** Check for SANE ****
if test "x$with_sane" != "xno"
then
ac_save_CPPFLAGS="$CPPFLAGS"
AC_CHECK_PROG(sane_devel,sane-config,sane-config,no)
if test "$sane_devel" != "no" -a "x$with_sane" != "xno"
if test "$sane_devel" != "no"
then
ac_sane_incl="`$sane_devel --cflags`"
ac_sane_libs="`$sane_devel --ldflags`"
ac_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $ac_sane_incl"
fi
AC_CHECK_HEADER(sane/sane.h,
[WINE_CHECK_SONAME(sane,sane_init,[AC_SUBST(SANEINCL,"$ac_sane_incl")],,[$ac_sane_libs])])
CPPFLAGS="$ac_save_CPPFLAGS"
@ -989,9 +992,12 @@ WINE_NOTICE_WITH(sane,[test "x$ac_cv_lib_soname_sane" = "x"],
[libsane ${notice_platform}development files not found, scanners won't be supported.])
dnl **** Check for libgphoto2 ****
if test "x$with_gphoto" != "xno"
then
ac_save_CPPFLAGS="$CPPFLAGS"
AC_CHECK_PROG(gphoto2_devel,gphoto2-config,gphoto2-config,no)
AC_CHECK_PROG(gphoto2port_devel,gphoto2-port-config,gphoto2-port-config,no)
if test "$gphoto2_devel" != "no" -a "$gphoto2port_devel" != "no" -a "x$with_gphoto" != "xno"
if test "$gphoto2_devel" != "no" -a "$gphoto2port_devel" != "no"
then
ac_gphoto2_incl="`$gphoto2_devel --cflags` `$gphoto2port_devel --cflags`"
ac_gphoto2_libs=""
@ -1002,8 +1008,8 @@ then
-L*|-l*) ac_gphoto2_libs="$ac_gphoto2_libs $i";;
esac
done
ac_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $ac_gphoto2_incl"
fi
AC_CHECK_HEADER(gphoto2-camera.h,
[AC_CHECK_LIB(gphoto2,gp_camera_new,
[AC_DEFINE(HAVE_GPHOTO2, 1, [Define if we have libgphoto2 development environment])
@ -1043,11 +1049,14 @@ WINE_NOTICE_WITH(cms,[test "$ac_cv_lib_lcms_cmsOpenProfileFromFile" != "yes"],
[liblcms ${notice_platform}development files not found, Color Management won't be supported.])
dnl **** Check for FreeType 2 ****
AC_CHECK_PROGS(ft_devel,[freetype-config freetype2-config],false)
if test "$ft_devel" != "false" -a "x$with_freetype" != "xno"
if test "x$with_freetype" != "xno"
then
AC_CHECK_PROGS(ft_devel,[freetype-config freetype2-config],no)
if test "$ft_devel" != "no"
then
ac_freetype_libs=`$ft_devel --libs`
ac_freetype_incl=`$ft_devel --cflags`
ac_freetype_libs=`$ft_devel --libs`
fi
WINE_CHECK_SONAME(freetype,FT_Init_FreeType,[ft_lib=yes],[ft_lib=no],[$ac_freetype_libs])
if test "$ft_lib" = "yes"
then
@ -1113,8 +1122,11 @@ WINE_CHECK_LIB_FUNCS(\
[$LIBPTHREAD])
dnl **** Check for EsounD ****
AC_PATH_PROG(ESDCONFIG, esd-config)
if test "x$with_esd" != xno -a "x$ESDCONFIG" != x -a "x$ESDCONFIG" != x'"$ESDCONFIG"';
if test "x$with_esd" != xno
then
save_CFLAGS="$CFLAGS"
AC_PATH_PROG(ESDCONFIG, esd-config, no)
if test "x$ESDCONFIG" != "xno"
then
ac_esd_incl=""
for i in `$ESDCONFIG --cflags`
@ -1124,13 +1136,14 @@ then
esac
done
ac_esd_libs=`$ESDCONFIG --libs`
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $ac_esd_incl"
AC_CHECK_LIB(esd,esd_open_sound,
fi
AC_CHECK_HEADER(esd.h,
[AC_CHECK_LIB(esd,esd_open_sound,
[AC_SUBST(ESDINCL, "$ac_esd_incl")
AC_SUBST(ESDLIBS, "$ac_esd_libs")
AC_DEFINE(HAVE_ESD, 1, [Define if you have EsounD sound server])],,
[$ac_esd_libs])
[$ac_esd_libs])])
CFLAGS="$save_CFLAGS"
fi