2000-12-23 Henning Meier-Geinitz <hmg@gmx.de>

* aclocal.m4 configure: Fixed some bugs concerning link checks for libsane.
	* src/xscanimage.c: Use g_free for memory acquired by g_new.
	* TODO: Removed entries about g_free and ac_local.m4.
DEVEL_2_0_BRANCH-1
Henning Geinitz 2000-12-23 13:21:42 +00:00
rodzic a3d70d0c3f
commit 4fba812fe3
2 zmienionych plików z 48 dodań i 38 usunięć

Wyświetl plik

@ -1,3 +1,9 @@
2000-12-23 Henning Meier-Geinitz <hmg@gmx.de>
* aclocal.m4 configure: Fixed some bugs concerning link checks for libsane.
* src/xscanimage.c: Use g_free for memory acquired by g_new.
* TODO: Removed entries about g_free and ac_local.m4.
************************ Release of sane-frontends 1.0.4 ********************** ************************ Release of sane-frontends 1.0.4 **********************
2000-12-17 Henning Meier-Geinitz <hmg@gmx.de> 2000-12-17 Henning Meier-Geinitz <hmg@gmx.de>

80
configure vendored
Wyświetl plik

@ -1480,7 +1480,7 @@ else
int main() { int main() {
/* Ultrix mips cc rejects this. */ /* Ultrix mips cc rejects this. */
typedef int charset[2]; const charset x; typedef int charset[2]; const charset x = {0,0};
/* SunOS 4.1.1 cc rejects this. */ /* SunOS 4.1.1 cc rejects this. */
char const *const *ccp; char const *const *ccp;
char **p; char **p;
@ -1555,7 +1555,7 @@ for ac_kw in inline __inline__ __inline; do
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
} $ac_kw foo() { } int $ac_kw foo() {
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
@ -1883,7 +1883,7 @@ else
#include "confdefs.h" #include "confdefs.h"
#include <alloca.h> #include <alloca.h>
int main() { int main() {
char *p = alloca(2 * sizeof(int)); void *p = alloca(2 * sizeof(int));
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
@ -2238,12 +2238,15 @@ else
#include <sys/types.h> #include <sys/types.h>
#include <fcntl.h> #include <fcntl.h>
#include <sys/mman.h> #include <sys/mman.h>
#include <stdlib.h>
#include <sys/stat.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
/* This mess was copied from the GNU getpagesize.h. */ /* This mess was copied from the GNU getpagesize.h. */
#ifndef HAVE_GETPAGESIZE #ifndef HAVE_GETPAGESIZE
# ifdef HAVE_UNISTD_H
# include <unistd.h>
# endif
/* Assume that all systems that can run configure have sys/param.h. */ /* Assume that all systems that can run configure have sys/param.h. */
# ifndef HAVE_SYS_PARAM_H # ifndef HAVE_SYS_PARAM_H
@ -2298,7 +2301,7 @@ main()
/* /*
* First, make a file with some known garbage in it. * First, make a file with some known garbage in it.
*/ */
data = malloc(pagesize); data = (char*)malloc(pagesize);
if (!data) if (!data)
exit(1); exit(1);
for (i = 0; i < pagesize; ++i) for (i = 0; i < pagesize; ++i)
@ -2319,7 +2322,7 @@ main()
fd = open("conftestmmap", O_RDWR); fd = open("conftestmmap", O_RDWR);
if (fd < 0) if (fd < 0)
exit(1); exit(1);
data2 = malloc(2 * pagesize); data2 = (char*)malloc(2 * pagesize);
if (!data2) if (!data2)
exit(1); exit(1);
data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
@ -2337,7 +2340,7 @@ main()
*/ */
for (i = 0; i < pagesize; ++i) for (i = 0; i < pagesize; ++i)
*(data2 + i) = *(data2 + i) + 1; *(data2 + i) = *(data2 + i) + 1;
data3 = malloc(pagesize); data3 = (char*)malloc(pagesize);
if (!data3) if (!data3)
exit(1); exit(1);
if (read(fd, data3, pagesize) != pagesize) if (read(fd, data3, pagesize) != pagesize)
@ -2351,7 +2354,7 @@ main()
} }
EOF EOF
if { (eval echo configure:2355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null if { (eval echo configure:2358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then then
ac_cv_func_mmap_fixed_mapped=yes ac_cv_func_mmap_fixed_mapped=yes
else else
@ -2376,12 +2379,12 @@ fi
for ac_func in atexit mkdir sigprocmask strdup strndup strftime strstr strsep strtod snprintf usleep strcasecmp strncasecmp for ac_func in atexit mkdir sigprocmask strdup strndup strftime strstr strsep strtod snprintf usleep strcasecmp strncasecmp
do do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:2380: checking for $ac_func" >&5 echo "configure:2383: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2385 "configure" #line 2388 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */ which can conflict with char $ac_func(); below. */
@ -2404,7 +2407,7 @@ $ac_func();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_$ac_func=yes" eval "ac_cv_func_$ac_func=yes"
else else
@ -2471,7 +2474,7 @@ fi
# Extract the first word of "sane-config", so it can be a program name with args. # Extract the first word of "sane-config", so it can be a program name with args.
set dummy sane-config; ac_word=$2 set dummy sane-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2475: checking for $ac_word" >&5 echo "configure:2478: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_SANE_CONFIG'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_SANE_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -2506,7 +2509,7 @@ fi
min_sane_version=1.0.0 min_sane_version=1.0.0
echo $ac_n "checking for SANE - version >= $min_sane_version""... $ac_c" 1>&6 echo $ac_n "checking for SANE - version >= $min_sane_version""... $ac_c" 1>&6
echo "configure:2510: checking for SANE - version >= $min_sane_version" >&5 echo "configure:2513: checking for SANE - version >= $min_sane_version" >&5
no_sane="" no_sane=""
if test "$SANE_CONFIG" = "no" ; then if test "$SANE_CONFIG" = "no" ; then
no_sane=yes no_sane=yes
@ -2534,7 +2537,7 @@ echo "configure:2510: checking for SANE - version >= $min_sane_version" >&5
echo $ac_n "cross compiling; assumed OK... $ac_c" echo $ac_n "cross compiling; assumed OK... $ac_c"
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2538 "configure" #line 2541 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sane/sane.h> #include <sane/sane.h>
@ -2586,7 +2589,7 @@ main ()
} }
EOF EOF
if { (eval echo configure:2590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null if { (eval echo configure:2593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then then
: :
else else
@ -2622,35 +2625,36 @@ fi
LIBS="$LIBS $SANE_LIBS" LIBS="$LIBS $SANE_LIBS"
LDFLAGS="$LDFLAGS $SANE_LDFLAGS" LDFLAGS="$LDFLAGS $SANE_LDFLAGS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2626 "configure" #line 2629 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sane/sane.h> #include <sane/sane.h>
#include <stdio.h> #include <stdio.h>
int main() { int main() {
return ((sane_major_version) || (sane_minor_version) || (sane_micro_version)); return (SANE_CURRENT_MAJOR);
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
echo "*** The test program compiled, but did not run. This usually means" echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding SANE or finding the wrong" echo "*** that the run-time linker is not finding SANE or finding the wrong"
echo "*** version of SANE. If it is not finding SANE, you'll need to set your" echo "*** version of SANE. If it is not finding SANE, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** to the installed location. Also, make sure you have run ldconfig if that"
echo "*** is required on your system" echo "*** is required on your system."
echo "***" echo "***"
echo "*** If you have an old version installed, it is best to remove it, although" echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
echo "***" echo "***"
echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means SANE was incorrectly installed"
echo "*** or that you have moved SANE since it was installed. In the latter case, you"
echo "*** may want to edit the sane-config script: $SANE_CONFIG"
else else
echo "configure: failed program was:" >&5 echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5 cat conftest.$ac_ext >&5
rm -rf conftest*
echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means SANE was incorrectly installed"
echo "*** or that you have moved SANE since it was installed. In the latter case, you"
echo "*** may want to edit the sane-config script: $SANE_CONFIG"
fi fi
rm -f conftest* rm -f conftest*
CFLAGS="$ac_save_CFLAGS" CFLAGS="$ac_save_CFLAGS"
@ -2721,7 +2725,7 @@ fi
# Extract the first word of "gtk-config", so it can be a program name with args. # Extract the first word of "gtk-config", so it can be a program name with args.
set dummy gtk-config; ac_word=$2 set dummy gtk-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2725: checking for $ac_word" >&5 echo "configure:2729: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -2756,7 +2760,7 @@ fi
min_gtk_version=0.99.13 min_gtk_version=0.99.13
echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6 echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6
echo "configure:2760: checking for GTK - version >= $min_gtk_version" >&5 echo "configure:2764: checking for GTK - version >= $min_gtk_version" >&5
no_gtk="" no_gtk=""
if test "$GTK_CONFIG" = "no" ; then if test "$GTK_CONFIG" = "no" ; then
no_gtk=yes no_gtk=yes
@ -2779,7 +2783,7 @@ echo "configure:2760: checking for GTK - version >= $min_gtk_version" >&5
echo $ac_n "cross compiling; assumed OK... $ac_c" echo $ac_n "cross compiling; assumed OK... $ac_c"
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2783 "configure" #line 2787 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <gtk/gtk.h> #include <gtk/gtk.h>
@ -2842,7 +2846,7 @@ main ()
} }
EOF EOF
if { (eval echo configure:2846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null if { (eval echo configure:2850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then then
: :
else else
@ -2876,7 +2880,7 @@ fi
CFLAGS="$CFLAGS $GTK_CFLAGS" CFLAGS="$CFLAGS $GTK_CFLAGS"
LIBS="$LIBS $GTK_LIBS" LIBS="$LIBS $GTK_LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2880 "configure" #line 2884 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <gtk/gtk.h> #include <gtk/gtk.h>
@ -2886,7 +2890,7 @@ int main() {
return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version));
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
echo "*** The test program compiled, but did not run. This usually means" echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding GTK or finding the wrong" echo "*** that the run-time linker is not finding GTK or finding the wrong"
@ -2940,17 +2944,17 @@ rm -f conftest*
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2944: checking for $ac_hdr" >&5 echo "configure:2948: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2949 "configure" #line 2953 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:2958: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
@ -2980,17 +2984,17 @@ done
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2984: checking for $ac_hdr" >&5 echo "configure:2988: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2989 "configure" #line 2993 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2994: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:2998: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*