From: sailer Date: Fri, 7 Mar 2003 10:30:08 +0000 (+0000) Subject: Added oraParam support. X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=3832e339b61706ee28518b5e4f34bc29bdafbaa0;p=daqdata.git Added oraParam support. -- Benjamin Sailer --- diff --git a/hadaq/configure b/hadaq/configure index 0584b72..85befee 100644 --- a/hadaq/configure +++ b/hadaq/configure @@ -807,6 +807,10 @@ Optional Packages: --with-epics=ARG indicates the epics base directory, take default from enviroment EPICS_BASE \ +\ + --with-oracle=ARG indicates the oracle home directory, take + default from enviroment ORACLE_HOME \ + Some influential environment variables: CC C compiler command @@ -1659,6 +1663,14 @@ else with_epics="$EPICS_BASE" fi; +# Check whether --with-oracle or --without-oracle was given. +if test "${with_oracle+set}" = set; then + withval="$with_oracle" + +else + with_oracle="$ORACLE_HOME" +fi; + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3622,6 +3634,333 @@ if test "$ac_cv_search_conParam" != no; then fi +elif test x$with_param = xora +then +LDFLAGS="-L$with_oracle/lib $LDFLAGS" +echo "$as_me:$LINENO: checking for library containing sqlorat" >&5 +echo $ECHO_N "checking for library containing sqlorat... $ECHO_C" >&6 +if test "${ac_cv_search_sqlorat+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +ac_cv_search_sqlorat=no +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char sqlorat (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +sqlorat (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_sqlorat="none required" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_sqlorat" = no; then + for ac_lib in clntsh; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char sqlorat (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +sqlorat (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_sqlorat="-l$ac_lib" +break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + done +fi +LIBS=$ac_func_search_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_search_sqlorat" >&5 +echo "${ECHO_T}$ac_cv_search_sqlorat" >&6 +if test "$ac_cv_search_sqlorat" != no; then + test "$ac_cv_search_sqlorat" = "none required" || LIBS="$ac_cv_search_sqlorat $LIBS" + +fi + +echo "$as_me:$LINENO: checking for library containing sqlcxt" >&5 +echo $ECHO_N "checking for library containing sqlcxt... $ECHO_C" >&6 +if test "${ac_cv_search_sqlcxt+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +ac_cv_search_sqlcxt=no +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char sqlcxt (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +sqlcxt (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_sqlcxt="none required" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_sqlcxt" = no; then + for ac_lib in clntsh; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char sqlcxt (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +sqlcxt (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_sqlcxt="-l$ac_lib" +break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + done +fi +LIBS=$ac_func_search_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_search_sqlcxt" >&5 +echo "${ECHO_T}$ac_cv_search_sqlcxt" >&6 +if test "$ac_cv_search_sqlcxt" != no; then + test "$ac_cv_search_sqlcxt" = "none required" || LIBS="$ac_cv_search_sqlcxt $LIBS" + +fi + +echo "$as_me:$LINENO: checking for library containing conParam" >&5 +echo $ECHO_N "checking for library containing conParam... $ECHO_C" >&6 +if test "${ac_cv_search_conParam+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +ac_cv_search_conParam=no +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char conParam (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +conParam (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_conParam="none required" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_conParam" = no; then + for ac_lib in oraParam; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char conParam (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +conParam (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_conParam="-l$ac_lib" +break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + done +fi +LIBS=$ac_func_search_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_search_conParam" >&5 +echo "${ECHO_T}$ac_cv_search_conParam" >&6 +if test "$ac_cv_search_conParam" != no; then + test "$ac_cv_search_conParam" = "none required" || LIBS="$ac_cv_search_conParam $LIBS" + +fi + elif test x$with_param = xtcl then echo "$as_me:$LINENO: checking for library containing Tcl_CreateInterp" >&5 diff --git a/hadaq/configure.in b/hadaq/configure.in index bb5801c..ab1cd40 100644 --- a/hadaq/configure.in +++ b/hadaq/configure.in @@ -15,6 +15,10 @@ AC_ARG_WITH(epics, \ [ --with-epics[=ARG] indicates the epics base directory, take default from enviroment EPICS_BASE] \ ,,with_epics="$EPICS_BASE") +AC_ARG_WITH(oracle, \ +[ --with-oracle[=ARG] indicates the oracle home directory, take + default from enviroment ORACLE_HOME] \ +,,with_oracle="$ORACLE_HOME") dnl Checks for programs. AC_PROG_CC @@ -69,6 +73,12 @@ AC_SEARCH_LIBS(conParam, caParam, LIBS="-lcaParam -lca -lCom $LIBS",, -lca -lCom elif test x$with_param = xfile then AC_SEARCH_LIBS(conParam, fileParam) +elif test x$with_param = xora +then +LDFLAGS="-L$with_oracle/lib $LDFLAGS" +AC_SEARCH_LIBS(sqlorat, clntsh) +AC_SEARCH_LIBS(sqlcxt, clntsh) +AC_SEARCH_LIBS(conParam, oraParam) elif test x$with_param = xtcl then AC_SEARCH_LIBS(Tcl_CreateInterp, tcl)