Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
84f8ab6b
Commit
84f8ab6b
authored
Jan 07, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
configure: Added a check for the soname of libodbc.
parent
a41f0f1b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
98 additions
and
19 deletions
+98
-19
configure
configure
+82
-0
configure.ac
configure.ac
+3
-0
proxyodbc.c
dlls/odbc32/proxyodbc.c
+10
-18
proxyodbc.h
dlls/odbc32/proxyodbc.h
+0
-1
config.h.in
include/config.h.in
+3
-0
No files found.
configure
View file @
84f8ab6b
...
...
@@ -15672,6 +15672,88 @@ esac
fi
{
echo
"
$as_me
:
$LINENO
: checking for -lodbc"
>
&5
echo
$ECHO_N
"checking for -lodbc...
$ECHO_C
"
>
&6
;
}
if
test
"
${
ac_cv_lib_soname_odbc
+set
}
"
=
set
;
then
echo
$ECHO_N
"(cached)
$ECHO_C
"
>
&6
else
ac_check_soname_save_LIBS
=
$LIBS
LIBS
=
"-lodbc
$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 SQLConnect ();
int
main ()
{
return SQLConnect ();
;
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_odbc
=
`
otool
-L
conftest
$ac_exeext
|
grep
"libodbc
\\
.[0-9A-Za-z.]*dylib"
|
sed
-e
"s/^.*
\/\(
libodbc
\.
[0-9A-Za-z.]*dylib
\)
.*
$/
\1
/"
';2,$d'
`
;;
*
)
ac_cv_lib_soname_odbc
=
`
$ac_cv_path_LDD
conftest
$ac_exeext
|
grep
"libodbc
\\
.
$LIBEXT
"
|
sed
-e
"s/^.*
\(
libodbc
\.
$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_odbc
"
=
"x"
;
then
{
echo
"
$as_me
:
$LINENO
: result: not found"
>
&5
echo
"
${
ECHO_T
}
not found"
>
&6
;
}
cat
>>
confdefs.h
<<
_ACEOF
#define SONAME_LIBODBC "libodbc.
$LIBEXT
"
_ACEOF
else
{
echo
"
$as_me
:
$LINENO
: result:
$ac_cv_lib_soname_odbc
"
>
&5
echo
"
${
ECHO_T
}
$ac_cv_lib_soname_odbc
"
>
&6
;
}
cat
>>
confdefs.h
<<
_ACEOF
#define SONAME_LIBODBC "
$ac_cv_lib_soname_odbc
"
_ACEOF
fi
if
test
"x
$ALSALIBS$AUDIOIOLIBS$COREAUDIO$NASLIBS$ESD_LIBS$ac_cv_lib_soname_jack
"
=
"x"
-a
\
"
$ac_cv_header_sys_soundcard_h
"
!=
"yes"
-a
\
"
$ac_cv_header_machine_soundcard_h
"
!=
"yes"
-a
\
...
...
configure.ac
View file @
84f8ab6b
...
...
@@ -1167,6 +1167,9 @@ fi
WINE_NOTICE_WITH(png,[test "x$ac_cv_lib_soname_png" = "x"],
[libpng development files not found, PNG won't be supported.])
dnl **** Check for libodbc ****
WINE_CHECK_SONAME(odbc,SQLConnect,,[AC_DEFINE_UNQUOTED(SONAME_LIBODBC,["libodbc.$LIBEXT"])])
dnl **** Check for any sound system ****
if test "x$ALSALIBS$AUDIOIOLIBS$COREAUDIO$NASLIBS$ESD_LIBS$ac_cv_lib_soname_jack" = "x" -a \
"$ac_cv_header_sys_soundcard_h" != "yes" -a \
...
...
dlls/odbc32/proxyodbc.c
View file @
84f8ab6b
...
...
@@ -518,31 +518,23 @@ static BOOL ODBC_LoadDriverManager(void)
TRACE
(
"
\n
"
);
gProxyHandle
.
bFunctionReady
=
FALSE
;
gProxyHandle
.
nErrorType
=
ERROR_LIBRARY_NOT_FOUND
;
if
(
s
!=
NULL
&&
strlen
(
s
)
>=
sizeof
(
gProxyHandle
.
dmLibName
))
{
ERR
(
"Driver name too long (%s)
\n
"
,
s
);
return
FALSE
;
}
if
(
s
==
NULL
||
strlen
(
s
)
==
0
)
s
=
"libodbc.so"
;
strcpy
(
gProxyHandle
.
dmLibName
,
s
);
#ifdef SONAME_LIBODBC
if
(
!
s
||
!
s
[
0
])
s
=
SONAME_LIBODBC
;
#endif
if
(
!
s
||
!
s
[
0
])
goto
failed
;
gProxyHandle
.
dmHandle
=
wine_dlopen
(
gProxyHandle
.
dmLibName
,
RTLD_LAZY
|
RTLD_GLOBAL
,
error
,
sizeof
(
error
));
gProxyHandle
.
dmHandle
=
wine_dlopen
(
s
,
RTLD_LAZY
|
RTLD_GLOBAL
,
error
,
sizeof
(
error
));
if
(
gProxyHandle
.
dmHandle
==
NULL
)
/* fail to load unixODBC driver manager */
{
WARN
(
"failed to open library %s: %s
\n
"
,
gProxyHandle
.
dmLibName
,
error
);
gProxyHandle
.
dmLibName
[
0
]
=
'\0'
;
gProxyHandle
.
nErrorType
=
ERROR_LIBRARY_NOT_FOUND
;
return
FALSE
;
}
else
if
(
gProxyHandle
.
dmHandle
!=
NULL
)
{
gProxyHandle
.
nErrorType
=
ERROR_FREE
;
return
TRUE
;
}
failed:
WARN
(
"failed to open library %s: %s
\n
"
,
debugstr_a
(
s
),
error
);
gProxyHandle
.
nErrorType
=
ERROR_LIBRARY_NOT_FOUND
;
return
FALSE
;
}
...
...
dlls/odbc32/proxyodbc.h
View file @
84f8ab6b
...
...
@@ -45,7 +45,6 @@ typedef struct proxyhandle
int
nErrorType
;
DM_FUNC
functions
[
NUM_SQLFUNC
];
/* entry point for driver manager functions */
char
driverLibName
[
200
];
/* ODBC driver SO name */
char
dmLibName
[
200
];
/* driver manager library name */
char
ServerName
[
200
];
/* keep server name */
char
UserName
[
50
];
/* keep username */
}
PROXYHANDLE
;
...
...
include/config.h.in
View file @
84f8ab6b
...
...
@@ -1023,6 +1023,9 @@
/* Define to the soname of the libncurses library. */
#undef SONAME_LIBNCURSES
/* Define to the soname of the libodbc library. */
#undef SONAME_LIBODBC
/* Define to the soname of the libpng library. */
#undef SONAME_LIBPNG
...
...
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