kopia lustrzana https://gitlab.com/sane-project/backends
In addition to using pkg-config to find the gphoto2 library flags,
we should check to see whether it's actually possible to link a program using those flags.merge-requests/1/head
rodzic
75a39c06d7
commit
cfe712c392
|
@ -1,3 +1,9 @@
|
|||
2004-05-30 Peter Fales <peter@fales-lorenz.net>
|
||||
* acinclude.m4, aclocal.m4, configure.in, configure
|
||||
In addition to using pkg-config to find the gphoto2 library flags,
|
||||
we should check to see whether it's actually possible to link
|
||||
a program using those flags.
|
||||
|
||||
2004-06-18 Henning Meier-Geinitz <henning@meier-geinitz.de>
|
||||
|
||||
* doc/gt68xx/gt68xx.TODO: New file. Lots of bugs and missing
|
||||
|
|
|
@ -364,8 +364,13 @@ AC_DEFUN([SANE_CHECK_GPHOTO2],
|
|||
CPPFLAGS="${CPPFLAGS} `pkg-config --cflags libgphoto2`"
|
||||
GPHOTO2_LIBS="`pkg-config --libs libgphoto2`"
|
||||
SANE_EXTRACT_LDFLAGS(LDFLAGS, GPHOTO2_LIBS)
|
||||
|
||||
saved_LIBS="${LIBS}"
|
||||
LIBS="${LIBS} ${GPHOTO2_LIBS}"
|
||||
HAVE_GPHOTO2=true
|
||||
# Make sure we an really use the library
|
||||
AC_CHECK_FUNCS(gp_camera_init,HAVE_GPHOTO2=true,
|
||||
[ LIBS="${saved_LIBS}"
|
||||
HAVE_GPHOTO2=false ])
|
||||
else
|
||||
HAVE_GPHOTO2=false
|
||||
fi
|
||||
|
|
|
@ -377,8 +377,13 @@ AC_DEFUN([SANE_CHECK_GPHOTO2],
|
|||
CPPFLAGS="${CPPFLAGS} `pkg-config --cflags libgphoto2`"
|
||||
GPHOTO2_LIBS="`pkg-config --libs libgphoto2`"
|
||||
SANE_EXTRACT_LDFLAGS(LDFLAGS, GPHOTO2_LIBS)
|
||||
|
||||
saved_LIBS="${LIBS}"
|
||||
LIBS="${LIBS} ${GPHOTO2_LIBS}"
|
||||
HAVE_GPHOTO2=true
|
||||
# Make sure we an really use the library
|
||||
AC_CHECK_FUNCS(gp_camera_init,HAVE_GPHOTO2=true,
|
||||
[ LIBS="${saved_LIBS}"
|
||||
HAVE_GPHOTO2=false ])
|
||||
else
|
||||
HAVE_GPHOTO2=false
|
||||
fi
|
||||
|
|
|
@ -6215,8 +6215,115 @@ GPHOTO2_LIBS="${tmp_LIBS}"
|
|||
unset tmp_LIBS
|
||||
unset param
|
||||
|
||||
|
||||
saved_LIBS="${LIBS}"
|
||||
LIBS="${LIBS} ${GPHOTO2_LIBS}"
|
||||
HAVE_GPHOTO2=true
|
||||
# Make sure we an really use the library
|
||||
|
||||
for ac_func in gp_camera_init
|
||||
do
|
||||
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||||
echo "$as_me:$LINENO: checking for $ac_func" >&5
|
||||
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
|
||||
if eval "test \"\${$as_ac_var+set}\" = set"; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
|
||||
For example, HP-UX 11i <limits.h> declares gettimeofday. */
|
||||
#define $ac_func innocuous_$ac_func
|
||||
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func (); below.
|
||||
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|
||||
<limits.h> exists even on freestanding compilers. */
|
||||
|
||||
#ifdef __STDC__
|
||||
# include <limits.h>
|
||||
#else
|
||||
# include <assert.h>
|
||||
#endif
|
||||
|
||||
#undef $ac_func
|
||||
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
builtin and then its argument prototype would still apply. */
|
||||
char $ac_func ();
|
||||
/* The GNU C library defines this for functions which it implements
|
||||
to always fail with ENOSYS. Some functions are actually named
|
||||
something starting with __ and the normal name is an alias. */
|
||||
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
|
||||
choke me
|
||||
#else
|
||||
char (*f) () = $ac_func;
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return f != $ac_func;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||||
(eval $ac_link) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } &&
|
||||
{ ac_try='test -s conftest$ac_exeext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
eval "$as_ac_var=yes"
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
eval "$as_ac_var=no"
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
|
||||
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
|
||||
if test `eval echo '${'$as_ac_var'}'` = yes; then
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
|
||||
_ACEOF
|
||||
HAVE_GPHOTO2=true
|
||||
else
|
||||
LIBS="${saved_LIBS}"
|
||||
HAVE_GPHOTO2=false
|
||||
fi
|
||||
done
|
||||
|
||||
else
|
||||
HAVE_GPHOTO2=false
|
||||
fi
|
||||
|
@ -10183,7 +10290,7 @@ ia64-*-hpux*)
|
|||
;;
|
||||
*-*-irix6*)
|
||||
# Find out which ABI we are using.
|
||||
echo '#line 10186 "configure"' > conftest.$ac_ext
|
||||
echo '#line 10293 "configure"' > conftest.$ac_ext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -11415,7 +11522,7 @@ fi
|
|||
|
||||
|
||||
# Provide some information about the compiler.
|
||||
echo "$as_me:11418:" \
|
||||
echo "$as_me:11525:" \
|
||||
"checking for Fortran 77 compiler version" >&5
|
||||
ac_compiler=`set X $ac_compile; echo $2`
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
|
||||
|
@ -12442,11 +12549,11 @@ else
|
|||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:12445: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:12552: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:12449: \$? = $ac_status" >&5
|
||||
echo "$as_me:12556: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings
|
||||
|
@ -12674,11 +12781,11 @@ else
|
|||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:12677: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:12784: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:12681: \$? = $ac_status" >&5
|
||||
echo "$as_me:12788: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings
|
||||
|
@ -12741,11 +12848,11 @@ else
|
|||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:12744: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:12851: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:12748: \$? = $ac_status" >&5
|
||||
echo "$as_me:12855: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
||||
then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
|
@ -14859,7 +14966,7 @@ else
|
|||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 14862 "configure"
|
||||
#line 14969 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
|
@ -14957,7 +15064,7 @@ else
|
|||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 14960 "configure"
|
||||
#line 15067 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
|
@ -17109,11 +17216,11 @@ else
|
|||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:17112: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:17219: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:17116: \$? = $ac_status" >&5
|
||||
echo "$as_me:17223: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings
|
||||
|
@ -17176,11 +17283,11 @@ else
|
|||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:17179: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:17286: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:17183: \$? = $ac_status" >&5
|
||||
echo "$as_me:17290: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
||||
then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
|
@ -18505,7 +18612,7 @@ else
|
|||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 18508 "configure"
|
||||
#line 18615 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
|
@ -18603,7 +18710,7 @@ else
|
|||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 18606 "configure"
|
||||
#line 18713 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
|
@ -19425,11 +19532,11 @@ else
|
|||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:19428: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:19535: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:19432: \$? = $ac_status" >&5
|
||||
echo "$as_me:19539: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings
|
||||
|
@ -19492,11 +19599,11 @@ else
|
|||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:19495: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:19602: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:19499: \$? = $ac_status" >&5
|
||||
echo "$as_me:19606: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
||||
then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
|
@ -21454,11 +21561,11 @@ else
|
|||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:21457: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:21564: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:21461: \$? = $ac_status" >&5
|
||||
echo "$as_me:21568: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings
|
||||
|
@ -21686,11 +21793,11 @@ else
|
|||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:21689: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:21796: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:21693: \$? = $ac_status" >&5
|
||||
echo "$as_me:21800: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings
|
||||
|
@ -21753,11 +21860,11 @@ else
|
|||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:21756: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:21863: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:21760: \$? = $ac_status" >&5
|
||||
echo "$as_me:21867: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
||||
then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
|
@ -23871,7 +23978,7 @@ else
|
|||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 23874 "configure"
|
||||
#line 23981 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
|
@ -23969,7 +24076,7 @@ else
|
|||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 23972 "configure"
|
||||
#line 24079 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
|
@ -25033,7 +25140,7 @@ echo "$as_me: Manually selected backends: ${BACKENDS}" >&6;}
|
|||
|
||||
if test "${HAVE_GPHOTO2}" != "true" \
|
||||
-o "${sane_cv_use_libjpeg}" != "yes"; then
|
||||
echo "*** disabling GPHOTO2 backend (not requested, or failed to find gphoto2-config or JPEG library) (${HAVE_GPHOTO2})"
|
||||
echo "*** disabling GPHOTO2 backend (not requested, or failed to find required libraries)"
|
||||
else
|
||||
BACKENDS="${BACKENDS} gphoto2"
|
||||
fi
|
||||
|
|
|
@ -312,7 +312,7 @@ else
|
|||
|
||||
if test "${HAVE_GPHOTO2}" != "true" \
|
||||
-o "${sane_cv_use_libjpeg}" != "yes"; then
|
||||
echo "*** disabling GPHOTO2 backend (not requested, or failed to find gphoto2-config or JPEG library) (${HAVE_GPHOTO2})"
|
||||
echo "*** disabling GPHOTO2 backend (not requested, or failed to find required libraries)"
|
||||
else
|
||||
BACKENDS="${BACKENDS} gphoto2"
|
||||
fi
|
||||
|
|
Ładowanie…
Reference in New Issue