Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
418e74b5
Commit
418e74b5
authored
Jul 02, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
configure: Merge the libsane existence check with the soname check.
parent
3336e9bf
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
99 additions
and
116 deletions
+99
-116
configure
configure
+77
-85
configure.ac
configure.ac
+3
-6
ds_ctrl.c
dlls/sane.ds/ds_ctrl.c
+2
-2
ds_image.c
dlls/sane.ds/ds_image.c
+3
-3
sane_i.h
dlls/sane.ds/sane_i.h
+2
-2
sane_main.c
dlls/sane.ds/sane_main.c
+9
-12
ui.c
dlls/sane.ds/ui.c
+3
-3
config.h.in
include/config.h.in
+0
-3
No files found.
configure
View file @
418e74b5
...
...
@@ -11228,13 +11228,11 @@ echo "${ECHO_T}no" >&6; }
fi
SANEINCL
=
""
if
test
"
$sane_devel
"
!=
"no"
then
SANEINCL
=
"
`
$sane_devel
--cflags
`
"
ac_sane_incl
=
"
`
$sane_devel
--cflags
`
"
ac_save_CPPFLAGS
=
"
$CPPFLAGS
"
CPPFLAGS
=
"
$CPPFLAGS
$
SANEINCL
"
CPPFLAGS
=
"
$CPPFLAGS
$
ac_sane_incl
"
if
test
"
${
ac_cv_header_sane_sane_h
+set
}
"
=
set
;
then
{
echo
"
$as_me
:
$LINENO
: checking for sane/sane.h"
>
&5
echo
$ECHO_N
"checking for sane/sane.h...
$ECHO_C
"
>
&6
;
}
...
...
@@ -11366,13 +11364,85 @@ echo "${ECHO_T}$ac_cv_header_sane_sane_h" >&6; }
fi
if
test
$ac_cv_header_sane_sane_h
=
yes
;
then
{
echo
"
$as_me
:
$LINENO
: checking for -lsane"
>
&5
echo
$ECHO_N
"checking for -lsane...
$ECHO_C
"
>
&6
;
}
if
test
"
${
ac_cv_lib_soname_sane
+set
}
"
=
set
;
then
echo
$ECHO_N
"(cached)
$ECHO_C
"
>
&6
else
ac_check_soname_save_LIBS
=
$LIBS
LIBS
=
"-lsane
$LIBS
"
cat
>
conftest.
$ac_ext
<<
_ACEOF
/* confdefs.h. */
_ACEOF
cat
confdefs.h
>>
conftest.
$ac_ext
cat
>>
conftest.
$ac_ext
<<
_ACEOF
/* end confdefs.h. */
cat
>>
confdefs.h
<<
\
_ACEOF
#define HAVE_SANE 1
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char sane_init ();
int
main ()
{
return sane_init ();
;
return 0;
}
_ACEOF
rm
-f
conftest.
$ac_objext
conftest
$ac_exeext
if
{
(
ac_try
=
"
$ac_link
"
case
"((
$ac_try
"
in
*
\"
*
|
*
\`
*
|
*
\\
*
)
ac_try_echo
=
\$
ac_try
;;
*
)
ac_try_echo
=
$ac_try
;;
esac
eval
"echo
\"\$
as_me:
$LINENO
:
$ac_try_echo
\"
"
)
>
&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
)
;
}
&&
{
test
-z
"
$ac_c_werror_flag
"
||
test
!
-s
conftest.err
}
&&
test
-s
conftest
$ac_exeext
&&
$as_test_x
conftest
$ac_exeext
;
then
case
"
$LIBEXT
"
in
dll
)
;;
dylib
)
ac_cv_lib_soname_sane
=
`
otool
-L
conftest
$ac_exeext
|
grep
"libsane
\\
.[0-9A-Za-z.]*dylib"
|
sed
-e
"s/^.*
\/\(
libsane
\.
[0-9A-Za-z.]*dylib
\)
.*
$/
\1
/"
';2,$d'
`
;;
*
)
ac_cv_lib_soname_sane
=
`
$ac_cv_path_LDD
conftest
$ac_exeext
|
grep
"libsane
\\
.
$LIBEXT
"
|
sed
-e
"s/^.*
\(
libsane
\.
$LIBEXT
[^ ]*
\)
.*
$/
\1
/"
';2,$d'
`
;;
esac
else
echo
"
$as_me
: failed program was:"
>
&5
sed
's/^/| /'
conftest.
$ac_ext
>
&5
fi
rm
-f
core conftest.err conftest.
$ac_objext
conftest_ipa8_conftest.oo
\
conftest
$ac_exeext
conftest.
$ac_ext
LIBS
=
$ac_check_soname_save_LIBS
fi
if
test
"x
$ac_cv_lib_soname_sane
"
=
"x"
;
then
{
echo
"
$as_me
:
$LINENO
: result: not found"
>
&5
echo
"
${
ECHO_T
}
not found"
>
&6
;
}
else
SANEINCL
=
""
{
echo
"
$as_me
:
$LINENO
: result:
$ac_cv_lib_soname_sane
"
>
&5
echo
"
${
ECHO_T
}
$ac_cv_lib_soname_sane
"
>
&6
;
}
cat
>>
confdefs.h
<<
_ACEOF
#define SONAME_LIBSANE "
$ac_cv_lib_soname_sane
"
_ACEOF
SANEINCL
=
"
$ac_sane_incl
"
fi
fi
...
...
@@ -15470,84 +15540,6 @@ _ACEOF
fi
{
echo
"
$as_me
:
$LINENO
: checking for -lsane"
>
&5
echo
$ECHO_N
"checking for -lsane...
$ECHO_C
"
>
&6
;
}
if
test
"
${
ac_cv_lib_soname_sane
+set
}
"
=
set
;
then
echo
$ECHO_N
"(cached)
$ECHO_C
"
>
&6
else
ac_check_soname_save_LIBS
=
$LIBS
LIBS
=
"-lsane
$LIBS
"
cat
>
conftest.
$ac_ext
<<
_ACEOF
/* confdefs.h. */
_ACEOF
cat
confdefs.h
>>
conftest.
$ac_ext
cat
>>
conftest.
$ac_ext
<<
_ACEOF
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char sane_init ();
int
main ()
{
return sane_init ();
;
return 0;
}
_ACEOF
rm
-f
conftest.
$ac_objext
conftest
$ac_exeext
if
{
(
ac_try
=
"
$ac_link
"
case
"((
$ac_try
"
in
*
\"
*
|
*
\`
*
|
*
\\
*
)
ac_try_echo
=
\$
ac_try
;;
*
)
ac_try_echo
=
$ac_try
;;
esac
eval
"echo
\"\$
as_me:
$LINENO
:
$ac_try_echo
\"
"
)
>
&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
)
;
}
&&
{
test
-z
"
$ac_c_werror_flag
"
||
test
!
-s
conftest.err
}
&&
test
-s
conftest
$ac_exeext
&&
$as_test_x
conftest
$ac_exeext
;
then
case
"
$LIBEXT
"
in
dll
)
;;
dylib
)
ac_cv_lib_soname_sane
=
`
otool
-L
conftest
$ac_exeext
|
grep
"libsane
\\
.[0-9A-Za-z.]*dylib"
|
sed
-e
"s/^.*
\/\(
libsane
\.
[0-9A-Za-z.]*dylib
\)
.*
$/
\1
/"
';2,$d'
`
;;
*
)
ac_cv_lib_soname_sane
=
`
$ac_cv_path_LDD
conftest
$ac_exeext
|
grep
"libsane
\\
.
$LIBEXT
"
|
sed
-e
"s/^.*
\(
libsane
\.
$LIBEXT
[^ ]*
\)
.*
$/
\1
/"
';2,$d'
`
;;
esac
else
echo
"
$as_me
: failed program was:"
>
&5
sed
's/^/| /'
conftest.
$ac_ext
>
&5
fi
rm
-f
core conftest.err conftest.
$ac_objext
conftest_ipa8_conftest.oo
\
conftest
$ac_exeext
conftest.
$ac_ext
LIBS
=
$ac_check_soname_save_LIBS
fi
if
test
"x
$ac_cv_lib_soname_sane
"
=
"x"
;
then
{
echo
"
$as_me
:
$LINENO
: result: not found"
>
&5
echo
"
${
ECHO_T
}
not found"
>
&6
;
}
else
{
echo
"
$as_me
:
$LINENO
: result:
$ac_cv_lib_soname_sane
"
>
&5
echo
"
${
ECHO_T
}
$ac_cv_lib_soname_sane
"
>
&6
;
}
cat
>>
confdefs.h
<<
_ACEOF
#define SONAME_LIBSANE "
$ac_cv_lib_soname_sane
"
_ACEOF
fi
...
...
configure.ac
View file @
418e74b5
...
...
@@ -699,15 +699,13 @@ LIBS="$ac_save_LIBS"
dnl **** Check for SANE ****
AC_CHECK_PROG(sane_devel,sane-config,sane-config,no)
AC_SUBST(SANEINCL,"")
if test "$sane_devel" != "no"
then
SANEINCL
="`$sane_devel --cflags`"
ac_sane_incl
="`$sane_devel --cflags`"
ac_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $
SANEINCL
"
CPPFLAGS="$CPPFLAGS $
ac_sane_incl
"
AC_CHECK_HEADER(sane/sane.h,
[AC_DEFINE(HAVE_SANE, 1, [Define if we have SANE development environment])],
[SANEINCL=""])
[WINE_CHECK_SONAME(sane,sane_init,[AC_SUBST(SANEINCL,"$ac_sane_incl")])])
CPPFLAGS="$ac_save_CPPFLAGS"
fi
...
...
@@ -1123,7 +1121,6 @@ WINE_CHECK_SONAME(fontconfig,FcInit)
WINE_CHECK_SONAME(ssl,SSL_library_init)
WINE_CHECK_SONAME(crypto,BIO_new_socket)
WINE_CHECK_SONAME(jpeg,jpeg_start_decompress)
WINE_CHECK_SONAME(sane,sane_init)
dnl **** Check for functions ****
...
...
dlls/sane.ds/ds_ctrl.c
View file @
418e74b5
...
...
@@ -485,7 +485,7 @@ TW_UINT16 SANE_SetupFileXfer2Set (pTW_IDENTITY pOrigin,
TW_UINT16
SANE_SetupMemXferGet
(
pTW_IDENTITY
pOrigin
,
TW_MEMREF
pData
)
{
#ifndef
HAVE_
SANE
#ifndef
SONAME_LIB
SANE
return
TWRC_FAILURE
;
#else
pTW_SETUPMEMXFER
pSetupMemXfer
=
(
pTW_SETUPMEMXFER
)
pData
;
...
...
@@ -573,7 +573,7 @@ TW_UINT16 SANE_EnableDSUserInterface (pTW_IDENTITY pOrigin,
{
activeDS
.
pendingEvent
.
TWMessage
=
MSG_CLOSEDSREQ
;
}
#ifdef
HAVE_
SANE
#ifdef
SONAME_LIB
SANE
else
{
psane_get_parameters
(
activeDS
.
deviceHandle
,
&
activeDS
.
sane_param
);
...
...
dlls/sane.ds/ds_image.c
View file @
418e74b5
...
...
@@ -80,7 +80,7 @@ TW_UINT16 SANE_ImageFileXferGet (pTW_IDENTITY pOrigin,
TW_UINT16
SANE_ImageInfoGet
(
pTW_IDENTITY
pOrigin
,
TW_MEMREF
pData
)
{
#ifndef
HAVE_
SANE
#ifndef
SONAME_LIB
SANE
return
TWRC_FAILURE
;
#else
TW_UINT16
twRC
=
TWRC_SUCCESS
;
...
...
@@ -186,7 +186,7 @@ TW_UINT16 SANE_ImageLayoutSet (pTW_IDENTITY pOrigin,
TW_UINT16
SANE_ImageMemXferGet
(
pTW_IDENTITY
pOrigin
,
TW_MEMREF
pData
)
{
#ifndef
HAVE_
SANE
#ifndef
SONAME_LIB
SANE
return
TWRC_FAILURE
;
#else
TW_UINT16
twRC
=
TWRC_SUCCESS
;
...
...
@@ -321,7 +321,7 @@ TW_UINT16 SANE_ImageMemXferGet (pTW_IDENTITY pOrigin,
TW_UINT16
SANE_ImageNativeXferGet
(
pTW_IDENTITY
pOrigin
,
TW_MEMREF
pData
)
{
#ifndef
HAVE_
SANE
#ifndef
SONAME_LIB
SANE
return
TWRC_FAILURE
;
#else
TW_UINT16
twRC
=
TWRC_SUCCESS
;
...
...
dlls/sane.ds/sane_i.h
View file @
418e74b5
...
...
@@ -23,7 +23,7 @@
# error You must include config.h first
#endif
#ifdef
HAVE_
SANE
#ifdef
SONAME_LIB
SANE
# include <sane/sane.h>
#define MAKE_FUNCPTR(f) typeof(f) * p##f;
...
...
@@ -63,7 +63,7 @@ struct tagActiveDS
TW_UINT16
twCC
;
/* condition code */
HWND
hwndOwner
;
/* window handle of the app */
HWND
progressWnd
;
/* window handle of the scanning window */
#ifdef
HAVE_
SANE
#ifdef
SONAME_LIB
SANE
SANE_Handle
deviceHandle
;
/* device handle */
SANE_Parameters
sane_param
;
/* parameters about the image
transferred */
...
...
dlls/sane.ds/sane_main.c
View file @
418e74b5
...
...
@@ -35,10 +35,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(twain);
HINSTANCE
SANE_instance
;
#ifdef HAVE_SANE
#ifndef SONAME_LIBSANE
#define SONAME_LIBSANE "libsane" SONAME_EXT
#endif
#ifdef SONAME_LIBSANE
static
void
*
libsane_handle
;
...
...
@@ -85,7 +82,7 @@ static void *open_libsane(void)
return
h
;
}
#endif
/*
HAVE_
SANE */
#endif
/*
SONAME_LIB
SANE */
BOOL
WINAPI
DllMain
(
HINSTANCE
hinstDLL
,
DWORD
fdwReason
,
LPVOID
lpvReserved
)
{
...
...
@@ -94,7 +91,7 @@ BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
switch
(
fdwReason
)
{
case
DLL_PROCESS_ATTACH
:
{
#ifdef
HAVE_
SANE
#ifdef
SONAME_LIB
SANE
SANE_Status
status
;
SANE_Int
version_code
;
...
...
@@ -109,7 +106,7 @@ BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
break
;
}
case
DLL_PROCESS_DETACH
:
#ifdef
HAVE_
SANE
#ifdef
SONAME_LIB
SANE
TRACE
(
"calling sane_exit()
\n
"
);
psane_exit
();
...
...
@@ -123,7 +120,7 @@ BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
return
TRUE
;
}
#ifdef
HAVE_
SANE
#ifdef
SONAME_LIB
SANE
static
TW_UINT16
SANE_GetIdentity
(
pTW_IDENTITY
,
pTW_IDENTITY
);
static
TW_UINT16
SANE_OpenDS
(
pTW_IDENTITY
,
pTW_IDENTITY
);
#endif
...
...
@@ -142,19 +139,19 @@ static TW_UINT16 SANE_SourceControlHandler (
switch
(
MSG
)
{
case
MSG_CLOSEDS
:
#ifdef
HAVE_
SANE
#ifdef
SONAME_LIB
SANE
psane_close
(
activeDS
.
deviceHandle
);
#endif
break
;
case
MSG_OPENDS
:
#ifdef
HAVE_
SANE
#ifdef
SONAME_LIB
SANE
twRC
=
SANE_OpenDS
(
pOrigin
,
(
pTW_IDENTITY
)
pData
);
#else
twRC
=
TWRC_FAILURE
;
#endif
break
;
case
MSG_GET
:
#ifdef
HAVE_
SANE
#ifdef
SONAME_LIB
SANE
twRC
=
SANE_GetIdentity
(
pOrigin
,
(
pTW_IDENTITY
)
pData
);
#else
twRC
=
TWRC_FAILURE
;
...
...
@@ -566,7 +563,7 @@ DS_Entry ( pTW_IDENTITY pOrigin,
return
twRC
;
}
#ifdef
HAVE_
SANE
#ifdef
SONAME_LIB
SANE
/* Sane returns device names that are longer than the 32 bytes allowed
by TWAIN. However, it colon separates them, and the last bit is
the most interesting. So we use the last bit, and add a signature
...
...
dlls/sane.ds/ui.c
View file @
418e74b5
...
...
@@ -37,7 +37,7 @@
#include "wine/debug.h"
#include "resource.h"
#ifdef
HAVE_
SANE
#ifdef
SONAME_LIB
SANE
WINE_DEFAULT_DEBUG_CHANNEL
(
twain
);
...
...
@@ -1056,11 +1056,11 @@ HWND ScanningDialogBox(HWND dialog, LONG progress)
return
dialog
;
}
#else
/*
HAVE_
SANE */
#else
/*
SONAME_LIB
SANE */
BOOL
DoScannerUI
(
void
)
{
return
FALSE
;
}
#endif
/*
HAVE_
SANE */
#endif
/*
SONAME_LIB
SANE */
include/config.h.in
View file @
418e74b5
...
...
@@ -549,9 +549,6 @@
/* Define to 1 if you have the `rfork' function. */
#undef HAVE_RFORK
/* Define if we have SANE development environment */
#undef HAVE_SANE
/* Define to 1 if you have the <sched.h> header file. */
#undef HAVE_SCHED_H
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment