]> jspc29.x-matter.uni-frankfurt.de Git - daqdata.git/commitdiff
Moved to new m4-macros.
authorsailer <sailer>
Mon, 19 May 2003 15:17:49 +0000 (15:17 +0000)
committersailer <sailer>
Mon, 19 May 2003 15:17:49 +0000 (15:17 +0000)
-- Benjamin Sailer

allParam/m4/hades.m4 [new file with mode: 0644]

diff --git a/allParam/m4/hades.m4 b/allParam/m4/hades.m4
new file mode 100644 (file)
index 0000000..0f49bc8
--- /dev/null
@@ -0,0 +1,246 @@
+############################################################################
+# had_SEARCH_LIBS_LVME([THREAD])
+# ------------------------------
+#
+# Check for availability of lvme library and their dependencies
+#
+
+AC_DEFUN([had_SEARCH_LIBS_LVME], [
+[
+#
+# Enabling all correct header file and library checks to include lvme
+#
+
+#
+# First see if we need pthread extension for our libraries ...
+#
+if test "x]$1[" = "xpthread"
+then
+       pthread="_p"
+else
+       pthread=""
+fi
+#
+# Now let's see which additional libraries we need ...
+#
+
+#
+# First try it with none ...
+#
+]
+AC_SEARCH_LIBS([conLVme], [lvme$pthread])
+[
+if test "x$ac_cv_search_conLVme" = "xno"
+then
+#
+# Then PowerPC (RIO2) / LynxOS (2.5.1) style ...
+#
+       unset ac_cv_search_conLVme
+       LDFLAGS="-L/lib/ces $LDFLAGS"
+]
+       AC_SEARCH_LIBS([conLVme], [lvme$pthread], [LIBS="-llvme$pthread -lvme -lbma -luio $LIBS"],, [-lvme -lbma -luio])
+[
+fi
+if test "x$ac_cv_search_conLVme" = "xno"
+then
+#
+# Then Motorola 68040 (E7) / LynxOS (2.5) style ...
+#
+       unset ac_cv_search_conLVme
+]
+       AC_SEARCH_LIBS([conLVme], [lvme$pthread], [LIBS="-llvme$pthread -llynx $LIBS"],, [-llynx])
+[
+fi
+if test "x$ac_cv_search_conLVme" = "xno"
+then
+#
+# No further idea.
+#
+]
+       AC_ERROR([VME library not found])
+[
+fi
+#
+# Last but not least we need the header file ...
+#
+]
+AC_CHECK_HEADER(lvme.h)
+AC_CHECK_FILE([/dev/vme_a32_0], AC_DEFINE(LVME_SOFTSWAP))
+])
+
+############################################################################
+# had_EPICS_CLIENT([PATH])
+# ------------------------
+#
+# Check for availability of EPICS
+# set HOST_ARCH, [EPICS_HOST_ARCH], EPICS_RELEASE, epics_release, LDFLAGS (-L)
+#
+
+AC_DEFUN([had_EPICS_CLIENT], [
+#
+# This is a weird method to check the epics version, but ask them for
+# a better way ...
+#
+AC_MSG_CHECKING(whether we have a valid epics release)
+[
+if test -x "]$1[/startup/EpicsHostArch"
+then
+epics_release="314"
+]
+AC_MSG_RESULT([$epics_release])
+AC_DEFINE([EPICS_RELEASE], [314])
+[
+EPICS_HOST_ARCH=$(]$1[/startup/EpicsHostArch)
+HOST_ARCH=$(]$1[/startup/HostArch)
+elif test -x "]$1[/startup/HostArch"
+then
+epics_release="313"
+]
+AC_MSG_RESULT([$epics_release])
+AC_DEFINE([EPICS_RELEASE], [313])
+[
+HOST_ARCH=$(]$1[/startup/HostArch)
+else
+]
+AC_MSG_RESULT([no])
+AC_ERROR([Missing valid EPICS version])
+[
+fi
+
+CPPFLAGS="$CPPFLAGS -I]$1[/include"
+if test "x$epics_release" = "x314"
+then
+LDFLAGS="$LDFLAGS -L]$1[/lib/$EPICS_HOST_ARCH"
+CPPFLAGS="$CPPFLAGS -I]$1[/include/os/$HOST_ARCH"
+else
+LDFLAGS="$LDFLAGS -L]$1[/lib/$HOST_ARCH"
+CPPFLAGS="$CPPFLAGS -I]$1[/include/os/$HOST_ARCH"
+fi
+]
+AC_SEARCH_LIBS([fdmgr_add_fd],[Com])
+[
+if test "x$ac_cv_search_fdmgr_add_fd" = "xno"
+then
+    unset ac_cv_search_fdmgr_add_fd
+]
+    AC_SEARCH_LIBS([fdmgr_add_fd],[Com],,[LIBS="-lCom $LIBS"], [-lm])
+[
+fi
+]
+AC_SEARCH_LIBS([ca_array_get],[ca])
+[
+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
+]
+])
+
+############################################################################
+# had_ORACLE_CLIENT([PATH])
+# -------------------------
+#
+# Check for availability of ORACLE, set LDFLAGS (-L)
+#
+
+AC_DEFUN([had_ORACLE_CLIENT], [
+#
+# Zero-order ...
+#
+AC_MSG_CHECKING(whether we have a valid oracle home)
+[
+if test -d "]$1[/"
+then
+LDFLAGS="-L$with_oracle/lib $LDFLAGS"
+]
+AC_MSG_RESULT([yes])
+[
+else
+]
+AC_MSG_RESULT([no])
+AC_ERROR([Missing valid Oracle])
+[
+fi
+]
+])
+
+############################################################################
+# had_CHECK_PARAM(PARAM, [THREAD], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# --------------------------------------------------------------------------
+#
+# Check for availability of necessary libraries to use allParam-source PARAM
+#
+
+AC_DEFUN([had_CHECK_PARAM], [
+[
+#
+# Enabling all correct header file and library checks to include param
+#
+
+#
+# First see if we need pthread extension for our libraries ...
+#
+if test "x]$2[" = "xpthread"
+then
+       pthread="_p"
+else
+       pthread=""
+fi
+]
+#
+# Give us te checking output
+#
+AC_MSG_CHECKING(whether param source $1 is valid)
+[
+if test "x]$1[" = "xca"
+then
+#
+# ca, so we need -lCom, -lca, -lcaParam / -lcaParam_p
+#
+]
+AC_MSG_RESULT([yes])
+had_EPICS_CLIENT([$with_epics])
+AC_SEARCH_LIBS([Tcl_CreateInterp], [tcl tcl8.3 tcl8.2 tcl8.0 tcl7.4])
+AC_CHECK_LIB([caParam$pthread], [conSetupParam])
+$3
+[
+elif test "x]$1[" = "xfile"
+then
+]
+AC_MSG_RESULT([yes])
+AC_CHECK_LIB([fileParam$pthread], [conSetupParam])
+$3
+[
+elif test "x]$1[" = "xora"
+then
+]
+AC_MSG_RESULT([yes])
+had_ORACLE_CLIENT([$with_oracle])
+AC_SEARCH_LIBS([sqlcxt], [clntsh])
+AC_CHECK_LIB([oraParam$pthread], [conSetupParam])
+$3
+[
+elif test "x]$1[" = "xtcl"
+then
+]
+AC_MSG_RESULT([yes])
+AC_SEARCH_LIBS([Tcl_CreateInterp], [tcl tcl8.3 tcl8.2 tcl8.0 tcl7.4])
+AC_CHECK_LIB([tclParam$pthread], [conSetupParam])
+$3
+[
+else
+]
+AC_MSG_RESULT([invalid param source ]$1)
+$4
+[
+fi
+#
+# Last but not least we need the header file ...
+#
+]
+AC_CHECK_HEADER(allParam.h)
+])
+