Changeset 82
- Timestamp:
- 01/12/06 01:00:47 (3 years ago)
- Files:
-
- branches/libsyncml-threaded/acinclude.m4 (modified) (1 diff)
- branches/libsyncml-threaded/configure.ac (modified) (3 diffs)
- branches/libsyncml-threaded/libsyncml/transports/Makefile.am (modified) (1 diff)
- branches/libsyncml-threaded/libsyncml/transports/http_client.c (modified) (1 diff)
- branches/libsyncml-threaded/libsyncml/transports/http_server.c (modified) (1 diff)
- branches/libsyncml-threaded/libsyncml/transports/obex_client.c (modified) (1 diff)
- branches/libsyncml-threaded/libsyncml/transports/obex_client.h (modified) (1 diff)
- branches/libsyncml-threaded/tests/check_ds.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/libsyncml-threaded/acinclude.m4
r46 r82 185 185 ]) 186 186 187 dnl Check for openobex library188 dnl Written by Pontus Fuchs 2000-08-18189 dnl Version checking fixed by Christian W. Zuckschwerdt 2002-10-17190 191 187 AC_DEFUN([AM_PATH_OPENOBEX], [ 192 AC_PATH_PROG(OPENOBEX_CONFIG, openobex-config, no) 193 194 if test "$OPENOBEX_CONFIG" = "no" ; then 195 AC_MSG_WARN(openobex-config not found. Perhaps openobex is not installed.) 196 HAVE_OPENOBEX="no" 197 else 198 min_obex_version=ifelse([$1], ,0.9.6,$1) 199 AC_MSG_CHECKING(for openobex - version >= $min_obex_version) 200 201 OPENOBEX_CFLAGS=`$OPENOBEX_CONFIG --cflags` 202 OPENOBEX_LIBS=`$OPENOBEX_CONFIG --libs` 203 204 obex_config_version=`$OPENOBEX_CONFIG --version` 205 206 obex_config_major_version=`$OPENOBEX_CONFIG --version | \ 207 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` 208 obex_config_minor_version=`$OPENOBEX_CONFIG --version | \ 209 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` 210 obex_config_micro_version=`$OPENOBEX_CONFIG --version | \ 211 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` 212 213 obex_req_major_version=`echo $min_obex_version | \ 214 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` 215 obex_req_minor_version=`echo $min_obex_version | \ 216 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` 217 obex_req_micro_version=`echo $min_obex_version | \ 218 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` 219 220 221 if test $obex_req_major_version -lt $obex_config_major_version ; then 222 obex_config_version_ok="yes" 223 fi 224 if test $obex_req_major_version -eq $obex_config_major_version ; then 225 if test $obex_req_minor_version -lt $obex_config_minor_version ; then 226 obex_config_version_ok="yes" 227 fi 228 if test $obex_req_minor_version -eq $obex_config_minor_version ; then 229 if test $obex_req_micro_version -le $obex_config_micro_version ; then 230 obex_config_version_ok="yes" 231 fi 232 fi 233 fi 234 235 if test "$obex_config_version_ok" != "yes" ; then 236 HAVE_OPENOBEX="no" 237 else 238 HAVE_OPENOBEX="yes" 239 fi 240 241 AC_SUBST(OPENOBEX_CFLAGS) 242 AC_SUBST(OPENOBEX_LIBS) 243 AC_MSG_RESULT(yes) 244 fi 188 if (test "${prefix}" = "NONE"); then 189 openobex_prefix=${ac_default_prefix} 190 else 191 openobex_prefix=${prefix} 192 fi 193 194 AC_ARG_WITH(openobex, AC_HELP_STRING([--with-openobex=DIR], [OpenOBEX library is installed in DIR]), [ 195 if (test "${withval}" != "yes"); then 196 openobex_prefix=${withval} 197 fi 198 ]) 199 200 ac_save_CPPFLAGS=$CPPFLAGS 201 ac_save_LDFLAGS=$LDFLAGS 202 203 OPENOBEX_CFLAGS="" 204 test -d "${openobex_prefix}/include" && OPENOBEX_CFLAGS="$OPENOBEX_CFLAGS -I${openobex_prefix}/include" 205 206 CPPFLAGS="$CPPFLAGS $OPENOBEX_CFLAGS" 207 AC_CHECK_HEADER(openobex/obex.h,, AC_MSG_ERROR(OpenOBEX header files not found)) 208 209 OPENOBEX_LIBS="" 210 if (test "${ac_default_prefix}" = "${openobex_prefix}"); then 211 test -d "${libdir}" && OPENOBEX_LIBS="$OPENOBEX_LIBS -L${libdir}" 212 else 213 test -d "${openobex_prefix}/lib64" && OPENOBEX_LIBS="$OPENOBEX_LIBS -L${openobex_prefix}/lib64" 214 test -d "${openobex_prefix}/lib" && OPENOBEX_LIBS="$OPENOBEX_LIBS -L${openobex_prefix}/lib" 215 fi 216 217 LDFLAGS="$LDFLAGS $OPENOBEX_LIBS" 218 AC_CHECK_LIB(openobex, OBEX_Init, OPENOBEX_LIBS="$OPENOBEX_LIBS -lopenobex", AC_MSG_ERROR(OpenOBEX library not found)) 219 220 CPPFLAGS=$ac_save_CPPFLAGS 221 LDFLAGS=$ac_save_LDFLAGS 222 223 AC_SUBST(OPENOBEX_CFLAGS) 224 AC_SUBST(OPENOBEX_LIBS) 245 225 ]) 246 branches/libsyncml-threaded/configure.ac
r75 r82 28 28 AS_HELP_STRING([--enable-http], [enable http transports]), 29 29 WANT_HTTP=$enableval) 30 PKG_CHECK_MODULES(LIBSOUP, libsoup- opensync-2.2 >= 2.2.4, HAVE_LIBSOUP=yes, HAVE_LIBSOUP=no)30 PKG_CHECK_MODULES(LIBSOUP, libsoup-2.2 >= 2.2.90, HAVE_LIBSOUP=yes, HAVE_LIBSOUP=no) 31 31 if test "x${HAVE_LIBSOUP}" = "xyes"; then 32 32 if test "x${WANT_HTTP}" = "xno"; then … … 41 41 else 42 42 if test "x${WANT_HTTP}" = "xyes"; then 43 AC_MSG_ERROR(" PatchedLibsoup not found")43 AC_MSG_ERROR("Libsoup not found") 44 44 else 45 45 ENABLE_HTTP=no … … 51 51 AS_HELP_STRING([--enable-obex], [enable obex transports]), 52 52 WANT_OBEX=$enableval) 53 AM_PATH_OPENOBEX 53 54 PKG_CHECK_MODULES(LIBOPENOBEX, openobex >= 1.1, HAVE_OPENOBEX=yes, HAVE_OPENOBEX=no) 55 ##AM_PATH_OPENOBEX 54 56 if test "x${HAVE_OPENOBEX}" = "xyes"; then 55 57 if test "x${WANT_OBEX}" = "xno"; then 56 58 ENABLE_OBEX=no 57 59 else 60 AC_SUBST(LIBOPENOBEX_CFLAGS) 61 AC_SUBST(LIBOPENOBEX_LIBS) 58 62 ENABLE_OBEX=yes 59 63 AC_SUBST(ENABLE_OBEX) branches/libsyncml-threaded/libsyncml/transports/Makefile.am
r71 r82 27 27 libhttp_server_la_LIBADD = @LIBSOUP_LIBS@ 28 28 29 libobex_client_la_CFLAGS = @ OPENOBEX_CFLAGS@ @PACKAGE_CFLAGS@ -I$(top_srcdir) -Wall -Werror29 libobex_client_la_CFLAGS = @LIBOPENOBEX_CFLAGS@ @PACKAGE_CFLAGS@ -I$(top_srcdir) -Wall -Werror 30 30 libobex_client_la_SOURCES = obex_client.c 31 31 libobex_client_la_LDFLAGS = @PACKAGE_LIBS@ 32 libobex_client_la_LIBADD = @ OPENOBEX_LIBS@32 libobex_client_la_LIBADD = @LIBOPENOBEX_LIBS@ 33 33 34 libobex_server_la_CFLAGS = @ OPENOBEX_CFLAGS@ @PACKAGE_CFLAGS@ -I$(top_srcdir) -Wall -Werror34 libobex_server_la_CFLAGS = @LIBOPENOBEX_CFLAGS@ @PACKAGE_CFLAGS@ -I$(top_srcdir) -Wall -Werror 35 35 libobex_server_la_SOURCES = obex_server.c 36 36 libobex_server_la_LDFLAGS = @PACKAGE_LIBS@ 37 libobex_server_la_LIBADD = @ OPENOBEX_LIBS@37 libobex_server_la_LIBADD = @LIBOPENOBEX_LIBS@ branches/libsyncml-threaded/libsyncml/transports/http_client.c
r75 r82 134 134 env->tsp = tsp; 135 135 136 if (!(env->session = soup_session_async_new_with_options _full(tsp->context, SOUP_SESSION_PROXY_URI, config->proxy, NULL))) {136 if (!(env->session = soup_session_async_new_with_options(SOUP_SESSION_ASYNC_CONTEXT, tsp->context, SOUP_SESSION_PROXY_URI, config->proxy, NULL))) { 137 137 smlErrorSet(error, SML_ERROR_GENERIC, "Unable to create new session"); 138 138 goto error_free_env; branches/libsyncml-threaded/libsyncml/transports/http_server.c
r75 r82 153 153 env->tsp = tsp; 154 154 155 env->server = soup_server_new _full(tsp->context, SOUP_SERVER_PORT, env->port, NULL);155 env->server = soup_server_new(SOUP_SERVER_ASYNC_CONTEXT, tsp->context, SOUP_SERVER_PORT, env->port, NULL); 156 156 if (!env->server) { 157 157 smlErrorSet(error, SML_ERROR_MISCONFIGURATION, "Unable to spawn server"); branches/libsyncml-threaded/libsyncml/transports/obex_client.c
r81 r82 215 215 env->obexhandle = OBEX_Init(OBEX_TRANS_FD, _smlObexEvent, 0); 216 216 break; 217 case SML_OBEX_TYPE_USB: 218 env->obexhandle = OBEX_Init(OBEX_TRANS_USB, _smlObexEvent, 0); 219 break; 217 220 default: 218 221 smlErrorSet(error, SML_ERROR_GENERIC, "Unknown obex type"); branches/libsyncml-threaded/libsyncml/transports/obex_client.h
r72 r82 27 27 SML_OBEX_TYPE_BLUETOOTH = 2, 28 28 SML_OBEX_TYPE_IRDA = 3, 29 SML_OBEX_TYPE_NET = 4 29 SML_OBEX_TYPE_NET = 4, 30 SML_OBEX_TYPE_USB = 5 30 31 } SmlTransportObexClientType; 31 32 branches/libsyncml-threaded/tests/check_ds.c
r79 r82 1510 1510 create_case(s, "check_ds_send_alert", check_ds_send_alert); 1511 1511 create_case(s2, "check_ds_send_alert2", check_ds_send_alert2); 1512 /*create_case(s, "check_ds_send_empty_sync", check_ds_send_empty_sync);1513 create_case(s, "check_ds_reply_empty_sync", check_ds_reply_empty_sync);1512 create_case(s, "check_ds_send_empty_sync", check_ds_send_empty_sync); 1513 /*create_case(s, "check_ds_reply_empty_sync", check_ds_reply_empty_sync); 1514 1514 create_case(s, "check_ds_add", check_ds_add); 1515 1515 create_case(s, "check_ds_add2", check_ds_add2);
