From 438355477bdfd88abb73da18452c7ee83db8bc06 Mon Sep 17 00:00:00 2001 From: hadaq Date: Tue, 4 Feb 2003 13:33:32 +0000 Subject: [PATCH] *** empty log message *** --- allParam/Makefile.am | 4 +- allParam/Makefile.in | 2 - allParam/configure | 221 +++++++++++++++++++++++++++--------------- allParam/configure.in | 36 ++++--- 4 files changed, 163 insertions(+), 100 deletions(-) diff --git a/allParam/Makefile.am b/allParam/Makefile.am index b4fa203..9edf291 100644 --- a/allParam/Makefile.am +++ b/allParam/Makefile.am @@ -1,14 +1,12 @@ VPATH = @srcdir@ @srcdir@/ca/client @srcdir@/ca/server @srcdir@/file \ @srcdir@/ora @srcdir@/tcl -#SUFFIXES += .pc - PROC=@PROC@ PROCFLAGS=@PROCFLAGS@ PROC_INCLUDES=@PROC_INCLUDES@ include=@top_srcdir@/include .pc.c : - $(PROC) $(PROCFLAGS) $(PROC_INCLUDES) iname=$< oname=$@ + $(PROC) $(PROCFLAGS) $(AM_PROCFLAGS) $(PROC_INCLUDES) iname=$< oname=$@ include_HEADERS = @ALLPARAM_H@ EXTRA_HEADERS = include/allParam.h diff --git a/allParam/Makefile.in b/allParam/Makefile.in index bbc34e4..69f0547 100644 --- a/allParam/Makefile.in +++ b/allParam/Makefile.in @@ -82,8 +82,6 @@ MAINT = @MAINT@ PACKAGE = @PACKAGE@ PAS = @PAS@ - -#SUFFIXES += .pc PROC = @PROC@ PROCFLAGS = @PROCFLAGS@ PROC_INCLUDES = @PROC_INCLUDES@ include=@top_srcdir@/include diff --git a/allParam/configure b/allParam/configure index df8455d..b84377f 100644 --- a/allParam/configure +++ b/allParam/configure @@ -3223,33 +3223,72 @@ fi if test "x$enable_param" = "xora" then - if test -x "$with_oracle/bin/proc" + # Extract the first word of "proc", so it can be a program name with args. +set dummy proc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PROC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PROC in + [\\/]* | ?:[\\/]*) + ac_cv_path_PROC="$PROC" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $with_oracle/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PROC="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_PROC" && ac_cv_path_PROC="no" + ;; +esac +fi +PROC=$ac_cv_path_PROC + +if test -n "$PROC"; then + echo "$as_me:$LINENO: result: $PROC" >&5 +echo "${ECHO_T}$PROC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + if test "x$PROC" = "xno" then - PROC="$with_oracle/bin/proc" + { { echo "$as_me:$LINENO: error: Missing ProC/C++ Praecompiler" >&5 +echo "$as_me: error: Missing ProC/C++ Praecompiler" >&2;} + { (exit 1); exit 1; }; } + else ORA_USER="daq_oper/daqall@db-hades.gsi.de" PROCFLAGS="oraca=yes parse=partial sqlcheck=semantics \ userid=$ORA_USER ireclen=130 oreclen=130" PROC_INCLUDES="" - else - { { echo "$as_me:$LINENO: error: Missing ProC/C++ Praecompiler" >&5 -echo "$as_me: error: Missing ProC/C++ Praecompiler" >&2;} - { (exit 1); exit 1; }; } - fi - + fi fi if test "x$enable_param" = "xca" then - if test -x "$with_epics/startup/HostArch" + if test -x "$with_epics/startup/EpicsHostArch" then - epics_version="3_13" + epics_version="3_14" + EPICS_HOST_ARCH=$($with_epics/startup/EpicsHostArch) HOST_ARCH=$($with_epics/startup/HostArch) - elif test -x "$with_epics/startup/EpicsHostArch" + elif test -x "$with_epics/startup/HostArch" then - epics_version="3_14" - HOST_ARCH=$($with_epics/startup/EpicsHostArch) + epics_version="3_13" + HOST_ARCH=$($with_epics/startup/HostArch) else { { echo "$as_me:$LINENO: error: Missing valid EPICS version" >&5 echo "$as_me: error: Missing valid EPICS version" >&2;} @@ -3617,14 +3656,13 @@ _ACEOF fi - -echo "$as_me:$LINENO: checking for ca_array_get in -lca" >&5 -echo $ECHO_N "checking for ca_array_get in -lca... $ECHO_C" >&6 -if test "${ac_cv_lib_ca_ca_array_get+set}" = set; then + echo "$as_me:$LINENO: checking for library containing ca_array_get" >&5 +echo $ECHO_N "checking for library containing ca_array_get... $ECHO_C" >&6 +if test "${ac_cv_search_ca_array_get+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lca $LIBS" + ac_func_search_save_LIBS=$LIBS +ac_cv_search_ca_array_get=no cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" @@ -3662,36 +3700,82 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_ca_ca_array_get=yes + ac_cv_search_ca_array_get="none required" else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_cv_lib_ca_ca_array_get=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_ca_ca_array_get" >&5 -echo "${ECHO_T}$ac_cv_lib_ca_ca_array_get" >&6 -if test $ac_cv_lib_ca_ca_array_get = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBCA 1 -_ACEOF +if test "$ac_cv_search_ca_array_get" = no; then + for ac_lib in ca; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" - LIBS="-lca $LIBS" +/* 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 ca_array_get (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +ca_array_get (); + ; + 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_ca_array_get="-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_ca_array_get" >&5 +echo "${ECHO_T}$ac_cv_search_ca_array_get" >&6 +if test "$ac_cv_search_ca_array_get" != no; then + test "$ac_cv_search_ca_array_get" = "none required" || LIBS="$ac_cv_search_ca_array_get $LIBS" else LIBS="-lca $LIBS" fi - -echo "$as_me:$LINENO: checking for gdd in -lgdd" >&5 -echo $ECHO_N "checking for gdd in -lgdd... $ECHO_C" >&6 -if test "${ac_cv_lib_gdd_gdd+set}" = set; then + if test "x$ac_cv_search_ca_array_get" = "xno" + then + unset ac_cv_search_ca_array_get + echo "$as_me:$LINENO: checking for library containing ca_array_get" >&5 +echo $ECHO_N "checking for library containing ca_array_get... $ECHO_C" >&6 +if test "${ac_cv_search_ca_array_get+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lgdd $LIBS" + ac_func_search_save_LIBS=$LIBS +ac_cv_search_ca_array_get=no cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" @@ -3702,7 +3786,7 @@ 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 gdd (); +char ca_array_get (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" @@ -3712,7 +3796,7 @@ char gdd (); int main () { -gdd (); +ca_array_get (); ; return 0; } @@ -3729,37 +3813,16 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_gdd_gdd=yes + ac_cv_search_ca_array_get="none required" else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_cv_lib_gdd_gdd=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_gdd_gdd" >&5 -echo "${ECHO_T}$ac_cv_lib_gdd_gdd" >&6 -if test $ac_cv_lib_gdd_gdd = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBGDD 1 -_ACEOF - - LIBS="-lgdd $LIBS" - -else - LIBS="-lgdd $LIBS" -fi - - -echo "$as_me:$LINENO: checking for fileDescriptorManager in -lcas" >&5 -echo $ECHO_N "checking for fileDescriptorManager in -lcas... $ECHO_C" >&6 -if test "${ac_cv_lib_cas_fileDescriptorManager+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcas $LIBS" -cat >conftest.$ac_ext <<_ACEOF +if test "$ac_cv_search_ca_array_get" = no; then + for ac_lib in ca; do + LIBS="-l$ac_lib -lm $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" @@ -3769,7 +3832,7 @@ 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 fileDescriptorManager (); +char ca_array_get (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" @@ -3779,7 +3842,7 @@ char fileDescriptorManager (); int main () { -fileDescriptorManager (); +ca_array_get (); ; return 0; } @@ -3796,28 +3859,28 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_cas_fileDescriptorManager=yes + ac_cv_search_ca_array_get="-l$ac_lib" +break else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_cv_lib_cas_fileDescriptorManager=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + done fi -echo "$as_me:$LINENO: result: $ac_cv_lib_cas_fileDescriptorManager" >&5 -echo "${ECHO_T}$ac_cv_lib_cas_fileDescriptorManager" >&6 -if test $ac_cv_lib_cas_fileDescriptorManager = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBCAS 1 -_ACEOF - - LIBS="-lcas $LIBS" +LIBS=$ac_func_search_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_search_ca_array_get" >&5 +echo "${ECHO_T}$ac_cv_search_ca_array_get" >&6 +if test "$ac_cv_search_ca_array_get" != no; then + test "$ac_cv_search_ca_array_get" = "none required" || LIBS="$ac_cv_search_ca_array_get $LIBS" else - LIBS="-lcas $LIBS" + LIBS="-lca $LIBS" fi + fi + LIBS="-lcas -lgdd $LIBS" fi if test "x$enable_paramsrc" = "xca" then @@ -5080,7 +5143,7 @@ then CPPFLAGS="-I$with_epics/include -I$with_epics/include/os/$HOST_ARCH $CPPFLAGS" elif test "x$epics_version" = "x3_14" then - CPPFLAGS="-I$with_epics/include -I$with_epics/include/os/$EPICS_HOST_ARCH $CPPFLAGS" + CPPFLAGS="-I$with_epics/include -I$with_epics/include/os/$HOST_ARCH -I$with_epics/include/os/$EPICS_HOST_ARCH $CPPFLAGS" fi if test "${ac_cv_header_tcl_h+set}" = set; then echo "$as_me:$LINENO: checking for tcl.h" >&5 diff --git a/allParam/configure.in b/allParam/configure.in index 22adff0..094ddbb 100644 --- a/allParam/configure.in +++ b/allParam/configure.in @@ -77,31 +77,31 @@ fi if test "x$enable_param" = "xora" then - if test -x "$with_oracle/bin/proc" + AC_PATH_PROG(PROC,proc,no,$with_oracle/bin) + if test "x$PROC" = "xno" then - PROC="$with_oracle/bin/proc" + AC_ERROR([Missing ProC/C++ Praecompiler]) + else ORA_USER="daq_oper/daqall@db-hades.gsi.de" PROCFLAGS="oraca=yes parse=partial sqlcheck=semantics \ userid=$ORA_USER ireclen=130 oreclen=130" PROC_INCLUDES="" - else - AC_ERROR([Missing ProC/C++ Praecompiler]) + AC_SUBST(PROCFLAGS) + AC_SUBST(PROC_INCLUDES) fi - AC_SUBST(PROC) - AC_SUBST(PROCFLAGS) - AC_SUBST(PROC_INCLUDES) fi if test "x$enable_param" = "xca" then - if test -x "$with_epics/startup/HostArch" + if test -x "$with_epics/startup/EpicsHostArch" then - epics_version="3_13" + epics_version="3_14" + EPICS_HOST_ARCH=$($with_epics/startup/EpicsHostArch) HOST_ARCH=$($with_epics/startup/HostArch) - elif test -x "$with_epics/startup/EpicsHostArch" + elif test -x "$with_epics/startup/HostArch" then - epics_version="3_14" - HOST_ARCH=$($with_epics/startup/EpicsHostArch) + epics_version="3_13" + HOST_ARCH=$($with_epics/startup/HostArch) else AC_ERROR([Missing valid EPICS version]) fi @@ -125,9 +125,13 @@ then LIBS="-L$with_epics/lib/$EPICS_HOST_ARCH $LIBS" fi AC_CHECK_LIB(Com, osiSleep) - AC_CHECK_LIB(ca, ca_array_get,,[LIBS="-lca $LIBS"]) - AC_CHECK_LIB(gdd, gdd,,[LIBS="-lgdd $LIBS"]) - AC_CHECK_LIB(cas, fileDescriptorManager,,[LIBS="-lcas $LIBS"]) + AC_SEARCH_LIBS(ca_array_get, ca,,[LIBS="-lca $LIBS"]) + if test "x$ac_cv_search_ca_array_get" = "xno" + then + unset ac_cv_search_ca_array_get + AC_SEARCH_LIBS(ca_array_get, ca,,[LIBS="-lca $LIBS"], -lm) + fi + LIBS="-lcas -lgdd $LIBS" fi if test "x$enable_paramsrc" = "xca" then @@ -170,7 +174,7 @@ then CPPFLAGS="-I$with_epics/include -I$with_epics/include/os/$HOST_ARCH $CPPFLAGS" elif test "x$epics_version" = "x3_14" then - CPPFLAGS="-I$with_epics/include -I$with_epics/include/os/$EPICS_HOST_ARCH $CPPFLAGS" + CPPFLAGS="-I$with_epics/include -I$with_epics/include/os/$HOST_ARCH -I$with_epics/include/os/$EPICS_HOST_ARCH $CPPFLAGS" fi AC_CHECK_HEADER(tcl.h,,AC_ERROR([Missing header file])) AC_TRY_CPP([#include ], -- 2.43.0