From: sailer Date: Mon, 19 May 2003 15:17:25 +0000 (+0000) Subject: move to new had_ m4-macros. X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=30e8a89f691e374b266bd37975fc521797798415;p=daqdata.git move to new had_ m4-macros. -- Benjamin Sailer --- diff --git a/allParam/configure.in b/allParam/configure.in index a5d849e..d9ff3cb 100644 --- a/allParam/configure.in +++ b/allParam/configure.in @@ -5,16 +5,34 @@ AC_CONFIG_AUX_DIR(config) AM_INIT_AUTOMAKE(allParam, 0.4) AM_MAINTAINER_MODE - +dnl dnl Check features. -AC_ARG_ENABLE(param, [ --enable-param[=ARG] make parameter library for given source, default ist "tcl"],,enable_param="tcl") -AC_ARG_ENABLE(server, [ --enable-server in case of --enable-param=ca make parameter server instead of library, default is "no"],,enable_server="no") -AC_ARG_ENABLE(paramsrc, [ --enable-paramsrc[=ARG] in case of --enable-server use parameter library for given source in this server, default is "tcl"],,enable_paramsrc="tcl") -AC_ARG_WITH(epics, [ --with-epics[=ARG] in case of --enable-param=ca indicates the epics base directory],,with_epics="$EPICS_BASE") -AC_ARG_WITH(oracle, [ --with-oracle[=ARG] in case of --enable-param=ora indicates the oracle home directory],,with_oracle="$ORACLE_HOME") - - +dnl +AC_ARG_ENABLE([param], + AC_HELP_STRING([--enable-param[=ARG]], + [make parameter library for given source, default ist "tcl"]), + ,[enable_param="tcl"]) +AC_ARG_ENABLE([server], + AC_HELP_STRING([--enable-server], + [in case of --enable-param=ca make parameter server instead of library, default is "no"]), + ,[enable_server="no"]) +AC_ARG_ENABLE([paramsrc], + AC_HELP_STRING([--enable-paramsrc[=ARG]], + [in case of --enable-server use parameter library for given source in this server, default is "tcl"]), + ,[enable_paramsrc="tcl"]) +AC_ARG_WITH([epics], + AC_HELP_STRING([--with-epics[=ARG], + [indicates the epics base directory, take default from enviroment EPICS_BASE]), + ,[with_epics="$EPICS_BASE"]) +AC_ARG_WITH([oracle], + AC_HELP_STRING([--with-oracle[=ARG]], + [indicates the oracle home directory, take default from enviroment ORACLE_HOME]), + ,[with_oracle="$ORACLE_HOME"]) + + +dnl dnl Make primary definitions. +dnl if test "x$program_transform_name" = "xs,x,x," then program_transform_name="s,\$\$,_$enable_paramsrc," @@ -60,7 +78,9 @@ AC_SUBST(LIBTCLPARAM_A) AC_SUBST(ALLPARAM_H) +dnl dnl Checks for programs. +dnl AC_PROG_CXX AC_PROG_CC AC_PROG_INSTALL @@ -90,33 +110,22 @@ then fi fi -if test "x$enable_param" = "xca" -then - if test -x "$with_epics/startup/EpicsHostArch" - then - epics_release="314" - AC_DEFINE(EPICS_RELEASE, 314) - EPICS_HOST_ARCH=$($with_epics/startup/EpicsHostArch) - HOST_ARCH=$($with_epics/startup/HostArch) - elif test -x "$with_epics/startup/HostArch" - then - epics_release="313" - AC_DEFINE(EPICS_RELEASE, 313) - HOST_ARCH=$($with_epics/startup/HostArch) - else - AC_ERROR([Missing valid EPICS version]) - fi - echo "setting EPICS release to $epics_release" -fi - +dnl dnl Checks for libraries. +dnl +had_CHECK_PARAM([$with_paramsrc],[],[], + AC_ERROR([cannot get parameter source for pas and test program])) + if test "x$enable_server" = "xyes" then + had_EPICS_CLIENT([$with_epics]) + AC_SEARCH_LIBS(getprotobyname, netinet) AC_SEARCH_LIBS(syslog, netinet) AC_CHECK_LIB(compat, SYSLOG_syslog) + if test "x$epics_release" = "x313" then LDFLAGS="-L$with_epics/lib/$HOST_ARCH $LDFLAGS" @@ -124,91 +133,52 @@ then then LDFLAGS="-L$with_epics/lib/$EPICS_HOST_ARCH $LDFLAGS" fi - AC_CHECK_LIB(Com, osiSleep) - 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" + AC_CHECK_HEADER([aitTypes.h],,AC_ERROR([Missing header file])) fi -if test "x$enable_paramsrc" = "xca" -then - if test "x$epics_release" = "x313" - then - LDFLAGS="-L$with_epics/lib/$HOST_ARCH $LDFLAGS" - elif test "x$epics_release" = "x314" - then - LDFLAGS="-L$with_epics/lib/$EPICS_HOST_ARCH $LDFLAGS" - fi - AC_CHECK_LIB(Com, osiSleep) - AC_CHECK_LIB(ca, ca_array_get,,[LIBS="-lca $LIBS"]) - AC_CHECK_LIB(caParam, conSetupParam) -elif test "x$enable_paramsrc" = "xfile" -then - AC_CHECK_LIB(fileParam, conSetupParam) -elif test "x$enable_paramsrc" = "xora" -then - LDFLAGS="-L$with_oracle/lib $LDFLAGS" - AC_SEARCH_LIBS(sqlorat, clntsh) - AC_SEARCH_LIBS(sqlcxt, clntsh) - AC_CHECK_LIB(oraParam, conSetupParam) -elif test "x$enable_paramsrc" = "xtcl" -then - AC_SEARCH_LIBS(Tcl_CreateInterp, tcl tcl8.3 tcl8.2 tcl8.0 tcl7.4) - AC_CHECK_LIB(tclParam, conSetupParam) -fi - +dnl dnl Checks for header files. -CPPFLAGS="-I/usr/local/include -I$HOME/include $CPPFLAGS" - +dnl AC_HEADER_STDC AC_CHECK_HEADERS(syslog.h,,AC_ERROR([Missing system header file(s)])) if test "x$enable_param" = "xca" then - if test "x$epics_release" = "x313" - then - CPPFLAGS="-I$with_epics/include -I$with_epics/include/os/$HOST_ARCH $CPPFLAGS" - elif test "x$epics_release" = "x314" - then - 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 ], - [echo "checking for cadef.h... yes"], - [echo "checking for cadef.h... no"; AC_ERROR([Missing header file])]) + had_EPICS_CLIENT([$with_epics]) + AC_CHECK_HEADER([tcl.h],,AC_ERROR([Missing header file])) + AC_CHECK_HEADER([cadef.h],,AC_ERROR([Missing header file])) elif test "x$enable_param" = "xora" then + had_ORACLE_CLIENT([$with_oracle]) CPPFLAGS="-I$with_oracle/precomp/public $CPPFLAGS" - CPPFLAGS="-I$with_oracle/precomp/public $CPPFLAGS" - AC_TRY_CPP([#include ], - [echo "checking for oraca.h... yes"], - [echo "checking for oraca.h... no"; AC_ERROR([Missing header file])]) - AC_TRY_CPP([#include ], - [echo "checking for sqlca.h... yes"], - [echo "checking for sqlca.h... no"; AC_ERROR([Missing header file])]) + AC_CHECK_HEADER([oraca.h],,AC_ERROR([Missing header file])) + AC_CHECK_HEADER([sqlca.h],,AC_ERROR([Missing header file])) elif test "x$enable_param" = "xtcl" then - AC_CHECK_HEADER(tcl.h,,AC_ERROR([Missing header file])) + AC_CHECK_HEADER([tcl.h],,AC_ERROR([Missing header file])) fi if test "x$enable_server" = "xyes" then - AC_CHECK_HEADER(allParam.h,,AC_ERROR([Missing header file])) - AC_CHECK_HEADER(aitTypes.h,,AC_ERROR([Missing header file])) + AC_CHECK_HEADER([allParam.h],,AC_ERROR([Missing header file])) fi +dnl dnl Checks for typedefs, structures, and compiler characteristics. +dnl AC_C_CONST AC_TYPE_SIZE_T +dnl dnl Checks for library functions. +dnl AC_CHECK_FUNCS(select strerror strtoul uname) +dnl +dnl Create output. +dnl AC_OUTPUT(Makefile examples/Makefile)