Branch: Tag:

2005-03-21

2005-03-21 15:31:20 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Added detection and support for the SybaseOpenClient framework on MacOS X.

Rev: src/modules/sybase/acconfig.h:1.7
Rev: src/modules/sybase/configure.in:1.8
Rev: src/modules/sybase/sybase.h:1.7

26:    [pike_sybase_lib_dir=$withval])       - dnl "reasonable" search paths we'll look in $root/$prefix/$path + dnl "reasonable" search paths we will look in $root/$prefix/$path   pike_sybase_reasonable_roots="$SYBASE $with_root/ $with_root/usr/local $with_root/usr $with_root/opt $with_root/usr $HOME"   pike_sybase_reasonable_prefixes="sybase include lib /"   pike_sybase_reasonable_paths="sybase include lib /"
37:   if test x$pike_sybase_include_dir != x; then    AC_MSG_RESULT(user-provided: $pike_sybase_include_dir)    pike_cv_sybase_include_dir=$pike_sybase_include_dir +  CPPFLAGS="-I$pike_cv_sybase_include_dir $CPPFLAGS"   else       AC_CACHE_VAL(pike_cv_sybase_include_dir,
63:       if test x$pike_cv_sybase_include_dir != x; then    AC_MSG_RESULT(found: $pike_cv_sybase_include_dir) +  CPPFLAGS="-I$pike_cv_sybase_include_dir $CPPFLAGS"    else    AC_MSG_RESULT(not found)    fi   fi    -  + AC_CHECK_HEADERS(SybaseOpenClient/SybaseOpenClient.h ctpublic.h) +  + AC_MSG_CHECKING(for SybaseOpenClient framework) + AC_CACHE_VAL(pike_cv_framework_sybaseopenclient, [ +  pike_cv_framework_sybaseopenclient="no" +  OLD_LDFLAGS="${LDFLAGS}" +  LDFLAGS="-framework SybaseOpenClient ${LDFLAGS}" +  AC_TRY_LINK([ + #ifdef HAVE_SYBASEOPENCLIENT_SYBASEOPENCLIENT_H + #include <SybaseOpenClient/SybaseOpenClient.h> + #elif defined(HAVE_CTPUBLIC_H) + #include <ctpublic.h> + #endif +  ], [ +  CS_CONTEXT *context; +  CS_RETCODE ret; +  ret = cs_ctx_alloc(CS_VERSION_110, &context); +  ret = ct_init(context, CS_VERSION_110); +  ], [ +  pike_cv_framework_sybaseopenclient="yes" +  ]) +  LDFLAGS="${OLD_LDFLAGS}" + ]) + if test "$pike_cv_framework_sybaseopenclient" = "no"; then +  AC_MSG_RESULT(no) + else +  AC_MSG_RESULT(yes) +  LDFLAGS="-framework SybaseOpenClient $LDFLAGS" + fi +  + if test "$pike_cv_framework_sybaseopenclient" = "no"; then   AC_MSG_CHECKING(for library files location)   if test x$pike_sybase_lib_dir != x; then    AC_MSG_RESULT(user-provided: $pike_sybase_lib_dir)    pike_cv_sybase_lib_dir=$pike_sybase_lib_dir -  +  LDFLAGS="-L$pike_cv_sybase_lib_dir $LDFLAGS"   else       AC_CACHE_VAL(pike_cv_sybase_lib_dir,
99:       if test x$pike_cv_sybase_lib_dir != x; then    AC_MSG_RESULT(found: $pike_cv_sybase_lib_dir) +  LDFLAGS="-L$pike_cv_sybase_lib_dir $LDFLAGS"    else    AC_MSG_RESULT(not found)    fi   fi -  -  - if test x$pike_cv_sybase_include_dir != x; then -  CPPFLAGS="-I$pike_cv_sybase_include_dir $CPPFLAGS" +    fi - if test x$pike_cv_sybase_lib_dir != x; then -  LDFLAGS="-L$pike_cv_sybase_lib_dir $LDFLAGS" - fi +       if test x$with_sybase != xno; then    PIKE_FEATURE_NODEP(sybase)
119:    AC_CHECK_LIB(dl,dlopen)    AC_CHECK_LIB(nsl,gethostbyname)    +  if test x$pike_cv_framework_sybaseopenclient; then +  AC_DEFINE(HAVE_SYBASE) +  PIKE_FEATURE(sybase, [yes, SybaseOpenClient framework]) +  else    AC_SEARCH_LIBS(intl_datetime,    intl_r64 intl_r intl64 intl,    [ -  AC_DEFINE(PIKE_HAVE_LIBINTL) +     AC_SEARCH_LIBS(comn_bintobin,    comn_r64 comn_r comn_dce64 comn_dce comn64 comn,    [ -  AC_DEFINE(PIKE_HAVE_LIBCOMN) +     AC_SEARCH_LIBS(cs_ctx_alloc,    cs_r64 cs_r cs64 cs,    [ -  AC_DEFINE(PIKE_HAVE_LIBCS) +     AC_SEARCH_LIBS(iface_open,    tcl_r64 tcl_r tcl_dce64 tcl_dce sybtcl tcl64 tcl,    [ -  AC_DEFINE(PIKE_HAVE_LIBSYBTCL) +     AC_SEARCH_LIBS(ct_callback,    ct_r64 ct_r ct64 ct,    [ -  AC_DEFINE(PIKE_HAVE_LIBCT) +     AC_CHECK_HEADERS(ctpublic.h, [    AC_DEFINE(HAVE_SYBASE)    PIKE_FEATURE(sybase, yes)
149:    ])    ])   fi + fi      AC_SUBST_FILE(make_variables)      AC_OUTPUT(Makefile,echo FOO >stamp-h)