kopia lustrzana https://gitlab.com/sane-project/backends
Add test for gphoto2 binary used by gphoto2 backend
rodzic
6a5048f486
commit
1023582ff5
12
acinclude.m4
12
acinclude.m4
|
@ -7,6 +7,7 @@ dnl SANE_CHECK_JPEG
|
||||||
dnl JAPHAR_GREP_CFLAGS(flag, cmd_if_missing, cmd_if_present)
|
dnl JAPHAR_GREP_CFLAGS(flag, cmd_if_missing, cmd_if_present)
|
||||||
dnl SANE_LINKER_RPATH
|
dnl SANE_LINKER_RPATH
|
||||||
dnl SANE_CHECK_U_TYPES
|
dnl SANE_CHECK_U_TYPES
|
||||||
|
dnl SANE_CHECK_GPHOTO2
|
||||||
dnl
|
dnl
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -94,7 +95,8 @@ AC_DEFUN(SANE_CHECK_PTAL,
|
||||||
])
|
])
|
||||||
|
|
||||||
#
|
#
|
||||||
# Checks for jpeg library >= v6B (61), needed for DC210 and DC240 backends.
|
# Checks for jpeg library >= v6B (61), needed for DC210, DC240, and
|
||||||
|
# GPHOTO2 backends.
|
||||||
AC_DEFUN(SANE_CHECK_JPEG,
|
AC_DEFUN(SANE_CHECK_JPEG,
|
||||||
[
|
[
|
||||||
AC_CHECK_LIB(jpeg,jpeg_start_decompress,
|
AC_CHECK_LIB(jpeg,jpeg_start_decompress,
|
||||||
|
@ -186,3 +188,11 @@ AC_CHECK_TYPE(u_char, unsigned char)
|
||||||
AC_CHECK_TYPE(u_int, unsigned int)
|
AC_CHECK_TYPE(u_int, unsigned int)
|
||||||
AC_CHECK_TYPE(u_long, unsigned long)
|
AC_CHECK_TYPE(u_long, unsigned long)
|
||||||
])
|
])
|
||||||
|
|
||||||
|
#
|
||||||
|
# Checks for gphoto2 - needed by the gphoto2 backend.
|
||||||
|
AC_DEFUN(SANE_CHECK_GPHOTO2,
|
||||||
|
[
|
||||||
|
AC_CHECK_PROG(GPHOTO2_BIN, gphoto2, gphoto2)
|
||||||
|
])
|
||||||
|
|
||||||
|
|
|
@ -106,7 +106,8 @@ AC_DEFUN(SANE_CHECK_PTAL,
|
||||||
])
|
])
|
||||||
|
|
||||||
#
|
#
|
||||||
# Checks for jpeg library >= v6B (61), needed for DC210 and DC240 backends.
|
# Checks for jpeg library >= v6B (61), needed for DC210, DC240, and
|
||||||
|
# GPHOTO2 backends.
|
||||||
AC_DEFUN(SANE_CHECK_JPEG,
|
AC_DEFUN(SANE_CHECK_JPEG,
|
||||||
[
|
[
|
||||||
AC_CHECK_LIB(jpeg,jpeg_start_decompress,
|
AC_CHECK_LIB(jpeg,jpeg_start_decompress,
|
||||||
|
@ -199,6 +200,14 @@ AC_CHECK_TYPE(u_int, unsigned int)
|
||||||
AC_CHECK_TYPE(u_long, unsigned long)
|
AC_CHECK_TYPE(u_long, unsigned long)
|
||||||
])
|
])
|
||||||
|
|
||||||
|
#
|
||||||
|
# Checks for gphoto2 - needed by the gphoto2 backend.
|
||||||
|
AC_DEFUN(SANE_CHECK_GPHOTO2,
|
||||||
|
[
|
||||||
|
AC_CHECK_PROG(GPHOTO2_BIN, gphoto2, gphoto2)
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# serial 40 AC_PROG_LIBTOOL
|
# serial 40 AC_PROG_LIBTOOL
|
||||||
AC_DEFUN(AC_PROG_LIBTOOL,
|
AC_DEFUN(AC_PROG_LIBTOOL,
|
||||||
|
@ -213,7 +222,7 @@ LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
|
||||||
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
|
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
|
||||||
DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
|
DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
|
||||||
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
|
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
|
||||||
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
|
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
|
||||||
|| AC_MSG_ERROR([libtool configure failed])
|
|| AC_MSG_ERROR([libtool configure failed])
|
||||||
|
|
||||||
# Reload cache, that may have been modified by ltconfig
|
# Reload cache, that may have been modified by ltconfig
|
||||||
|
@ -245,8 +254,18 @@ AC_REQUIRE([AC_PROG_NM])dnl
|
||||||
AC_REQUIRE([AC_PROG_LN_S])dnl
|
AC_REQUIRE([AC_PROG_LN_S])dnl
|
||||||
dnl
|
dnl
|
||||||
|
|
||||||
|
case "$target" in
|
||||||
|
NONE) lt_target="$host" ;;
|
||||||
|
*) lt_target="$target" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
# Check for any special flags to pass to ltconfig.
|
# Check for any special flags to pass to ltconfig.
|
||||||
libtool_flags="--cache-file=$cache_file"
|
#
|
||||||
|
# the following will cause an existing older ltconfig to fail, so
|
||||||
|
# we ignore this at the expense of the cache file... Checking this
|
||||||
|
# will just take longer ... bummer!
|
||||||
|
#libtool_flags="--cache-file=$cache_file"
|
||||||
|
#
|
||||||
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
|
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
|
||||||
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
|
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
|
||||||
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
|
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
|
||||||
|
@ -263,7 +282,7 @@ test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
|
||||||
|
|
||||||
# Some flags need to be propagated to the compiler or linker for good
|
# Some flags need to be propagated to the compiler or linker for good
|
||||||
# libtool support.
|
# libtool support.
|
||||||
case "$host" in
|
case "$lt_target" in
|
||||||
*-*-irix6*)
|
*-*-irix6*)
|
||||||
# Find out which ABI we are using.
|
# Find out which ABI we are using.
|
||||||
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
|
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
|
||||||
|
@ -288,10 +307,7 @@ case "$host" in
|
||||||
SAVE_CFLAGS="$CFLAGS"
|
SAVE_CFLAGS="$CFLAGS"
|
||||||
CFLAGS="$CFLAGS -belf"
|
CFLAGS="$CFLAGS -belf"
|
||||||
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
|
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
|
||||||
[AC_LANG_SAVE
|
[AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
|
||||||
AC_LANG_C
|
|
||||||
AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
|
|
||||||
AC_LANG_RESTORE])
|
|
||||||
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
|
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
|
||||||
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
|
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
|
||||||
CFLAGS="$SAVE_CFLAGS"
|
CFLAGS="$SAVE_CFLAGS"
|
||||||
|
@ -482,7 +498,6 @@ else
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
fi
|
fi
|
||||||
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
|
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
|
||||||
AC_SUBST(LD)
|
|
||||||
AC_PROG_LD_GNU
|
AC_PROG_LD_GNU
|
||||||
])
|
])
|
||||||
|
|
||||||
|
@ -528,14 +543,13 @@ else
|
||||||
fi])
|
fi])
|
||||||
NM="$ac_cv_path_NM"
|
NM="$ac_cv_path_NM"
|
||||||
AC_MSG_RESULT([$NM])
|
AC_MSG_RESULT([$NM])
|
||||||
AC_SUBST(NM)
|
|
||||||
])
|
])
|
||||||
|
|
||||||
# AC_CHECK_LIBM - check for math library
|
# AC_CHECK_LIBM - check for math library
|
||||||
AC_DEFUN(AC_CHECK_LIBM,
|
AC_DEFUN(AC_CHECK_LIBM,
|
||||||
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||||
LIBM=
|
LIBM=
|
||||||
case "$host" in
|
case "$lt_target" in
|
||||||
*-*-beos* | *-*-cygwin*)
|
*-*-beos* | *-*-cygwin*)
|
||||||
# These system don't have libm
|
# These system don't have libm
|
||||||
;;
|
;;
|
||||||
|
@ -550,31 +564,35 @@ esac
|
||||||
])
|
])
|
||||||
|
|
||||||
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
|
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
|
||||||
# the libltdl convenience library, adds --enable-ltdl-convenience to
|
# the libltdl convenience library and INCLTDL to the include flags for
|
||||||
# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
|
# the libltdl header and adds --enable-ltdl-convenience to the
|
||||||
# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
|
# configure arguments. Note that LIBLTDL and INCLTDL are not
|
||||||
# to be `${top_builddir}/libltdl'. Make sure you start DIR with
|
# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
|
||||||
# '${top_builddir}/' (note the single quotes!) if your package is not
|
# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
|
||||||
# flat, and, if you're not using automake, define top_builddir as
|
# with '${top_builddir}/' and INCLTDL will be prefixed with
|
||||||
# appropriate in the Makefiles.
|
# '${top_srcdir}/' (note the single quotes!). If your package is not
|
||||||
|
# flat and you're not using automake, define top_builddir and
|
||||||
|
# top_srcdir appropriately in the Makefiles.
|
||||||
AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||||
case "$enable_ltdl_convenience" in
|
case "$enable_ltdl_convenience" in
|
||||||
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
|
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
|
||||||
"") enable_ltdl_convenience=yes
|
"") enable_ltdl_convenience=yes
|
||||||
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
|
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
|
||||||
esac
|
esac
|
||||||
LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
|
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
|
||||||
INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
|
INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
|
||||||
])
|
])
|
||||||
|
|
||||||
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
|
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
|
||||||
# the libltdl installable library, and adds --enable-ltdl-install to
|
# the libltdl installable library and INCLTDL to the include flags for
|
||||||
# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
|
# the libltdl header and adds --enable-ltdl-install to the configure
|
||||||
# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
|
# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
|
||||||
# to be `${top_builddir}/libltdl'. Make sure you start DIR with
|
# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
|
||||||
# '${top_builddir}/' (note the single quotes!) if your package is not
|
# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
|
||||||
# flat, and, if you're not using automake, define top_builddir as
|
# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
|
||||||
# appropriate in the Makefiles.
|
# with '${top_srcdir}/' (note the single quotes!). If your package is
|
||||||
|
# not flat and you're not using automake, define top_builddir and
|
||||||
|
# top_srcdir appropriately in the Makefiles.
|
||||||
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
|
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
|
||||||
AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||||
AC_CHECK_LIB(ltdl, main,
|
AC_CHECK_LIB(ltdl, main,
|
||||||
|
@ -587,8 +605,8 @@ AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||||
])
|
])
|
||||||
if test x"$enable_ltdl_install" = x"yes"; then
|
if test x"$enable_ltdl_install" = x"yes"; then
|
||||||
ac_configure_args="$ac_configure_args --enable-ltdl-install"
|
ac_configure_args="$ac_configure_args --enable-ltdl-install"
|
||||||
LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
|
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
|
||||||
INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
|
INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
|
||||||
else
|
else
|
||||||
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
|
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
|
||||||
LIBLTDL="-lltdl"
|
LIBLTDL="-lltdl"
|
||||||
|
|
Ładowanie…
Reference in New Issue