Commit 4b7e372d authored by Stezowski Olivier's avatar Stezowski Olivier
Browse files

paths to installed directories available through core/GwConfig.h

git-svn-id: svn+ssh://anonsvn.in2p3.fr/agata/gammaware/trunk@138 c3abf467-7ff2-0310-b516-c5fb849bdde0
parent 5d06c3e5
......@@ -45,7 +45,7 @@ depend: inc
@echo " "
# install any includes in a single directory
inc:
inc:
@echo " "
@echo " ---> Copying all includes in a single directory " $(TOPDIR)/include
@{ for dir in $(SUBDIRS); do \
......
......@@ -1238,12 +1238,26 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test "x$prefix" = "xNONE"; then
prefix=$ac_default_prefix
ac_configure_args="$ac_configure_args --prefix $prefix"
fi
exec_prefix=$prefix
includedir=$prefix/include
libdir=$prefix/lib
bindir=$prefix/bin
datadir=$prefix/share
# Check whether --enable-ganil or --disable-ganil was given.
if test "${enable_ganil+set}" = set; then
enableval="$enable_ganil"
......@@ -1255,8 +1269,6 @@ else
fi;
echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
......@@ -1409,7 +1421,7 @@ echo "$as_me: Bytes swapping is not optimized, /usr/include/byteswap.h not found
fi
ac_config_headers="$ac_config_headers src/system/GWConfig.h"
ac_config_headers="$ac_config_headers src/system/GsConfig.h"
......@@ -1441,6 +1453,9 @@ fi
ac_config_files="$ac_config_files demos/tools/rootlogon.C"
ac_config_files="$ac_config_files src/root/core/GwConfig.h"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
......@@ -1975,7 +1990,8 @@ do
"src/root/ganil/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/root/ganil/Makefile" ;;
"demos/gem/rootlogon.C" ) CONFIG_FILES="$CONFIG_FILES demos/gem/rootlogon.C" ;;
"demos/tools/rootlogon.C" ) CONFIG_FILES="$CONFIG_FILES demos/tools/rootlogon.C" ;;
"src/system/GWConfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/system/GWConfig.h" ;;
"src/root/core/GwConfig.h" ) CONFIG_FILES="$CONFIG_FILES src/root/core/GwConfig.h" ;;
"src/system/GsConfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/system/GsConfig.h" ;;
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
{ (exit 1); exit 1; }; };;
......
......@@ -16,21 +16,21 @@
{
'm4_pattern_forbid' => 1,
'AC_CONFIG_LIBOBJ_DIR' => 1,
'AC_C_VOLATILE' => 1,
'AC_TYPE_OFF_T' => 1,
'AC_C_VOLATILE' => 1,
'AC_FUNC_CLOSEDIR_VOID' => 1,
'AC_REPLACE_FNMATCH' => 1,
'AC_PROG_LIBTOOL' => 1,
'AC_FUNC_STAT' => 1,
'AC_FUNC_WAIT3' => 1,
'AC_HEADER_TIME' => 1,
'AC_FUNC_LSTAT' => 1,
'AC_STRUCT_TM' => 1,
'AC_FUNC_WAIT3' => 1,
'AM_AUTOMAKE_VERSION' => 1,
'AC_FUNC_GETMNTENT' => 1,
'AC_STRUCT_TM' => 1,
'AC_FUNC_LSTAT' => 1,
'AC_TYPE_MODE_T' => 1,
'AC_CHECK_HEADERS' => 1,
'AC_FUNC_GETMNTENT' => 1,
'AC_FUNC_STRTOD' => 1,
'AC_CHECK_HEADERS' => 1,
'AC_FUNC_STRNLEN' => 1,
'm4_sinclude' => 1,
'AC_PROG_CXX' => 1,
......@@ -47,17 +47,17 @@
'AC_STRUCT_ST_BLOCKS' => 1,
'AC_TYPE_SIGNAL' => 1,
'AC_TYPE_UID_T' => 1,
'AC_PROG_MAKE_SET' => 1,
'AC_CONFIG_AUX_DIR' => 1,
'm4_pattern_allow' => 1,
'AC_PROG_MAKE_SET' => 1,
'sinclude' => 1,
'm4_pattern_allow' => 1,
'AC_DEFINE_TRACE_LITERAL' => 1,
'AC_FUNC_STRERROR_R' => 1,
'AC_PROG_CC' => 1,
'AC_FUNC_FORK' => 1,
'AC_DECL_SYS_SIGLIST' => 1,
'AC_FUNC_STRCOLL' => 1,
'AC_FUNC_FORK' => 1,
'AC_FUNC_VPRINTF' => 1,
'AC_FUNC_STRCOLL' => 1,
'AC_PROG_YACC' => 1,
'AC_INIT' => 1,
'AC_STRUCT_TIMEZONE' => 1,
......@@ -79,33 +79,33 @@
'AM_MAINTAINER_MODE' => 1,
'AC_FUNC_UTIME_NULL' => 1,
'AC_FUNC_SELECT_ARGTYPES' => 1,
'AC_HEADER_STAT' => 1,
'AC_FUNC_STRFTIME' => 1,
'AC_PROG_CPP' => 1,
'AC_HEADER_STAT' => 1,
'AC_C_INLINE' => 1,
'AC_TYPE_PID_T' => 1,
'AC_PROG_LEX' => 1,
'AC_PROG_CPP' => 1,
'AC_C_CONST' => 1,
'AC_PROG_LEX' => 1,
'AC_TYPE_PID_T' => 1,
'AC_CONFIG_FILES' => 1,
'include' => 1,
'AC_FUNC_SETVBUF_REVERSED' => 1,
'AC_PROG_INSTALL' => 1,
'AM_GNU_GETTEXT' => 1,
'AC_CHECK_LIB' => 1,
'AC_FUNC_OBSTACK' => 1,
'AC_CHECK_LIB' => 1,
'AC_FUNC_MALLOC' => 1,
'AC_FUNC_GETGROUPS' => 1,
'AC_FUNC_GETLOADAVG' => 1,
'AH_OUTPUT' => 1,
'AC_FUNC_FSEEKO' => 1,
'AM_PROG_CC_C_O' => 1,
'AC_FUNC_MKTIME' => 1,
'AC_CANONICAL_SYSTEM' => 1,
'AM_CONDITIONAL' => 1,
'AC_CANONICAL_SYSTEM' => 1,
'AC_FUNC_MKTIME' => 1,
'AC_CONFIG_HEADERS' => 1,
'AC_HEADER_SYS_WAIT' => 1,
'AC_PROG_LN_S' => 1,
'AC_FUNC_MEMCMP' => 1,
'AC_PROG_LN_S' => 1,
'm4_include' => 1,
'AC_HEADER_DIRENT' => 1,
'AC_CHECK_FUNCS' => 1
......
......@@ -51,34 +51,40 @@ m4trace:configure.in:6: -1- AC_SUBST([ECHO_C])
m4trace:configure.in:6: -1- AC_SUBST([ECHO_N])
m4trace:configure.in:6: -1- AC_SUBST([ECHO_T])
m4trace:configure.in:6: -1- AC_SUBST([LIBS])
m4trace:configure.in:19: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
m4trace:configure.in:30: -1- AC_SUBST([exec_prefix], [$prefix])
m4trace:configure.in:31: -1- AC_SUBST([includedir], [$prefix/include])
m4trace:configure.in:32: -1- AC_SUBST([libdir], [$prefix/lib])
m4trace:configure.in:33: -1- AC_SUBST([bindir], [$prefix/bin])
m4trace:configure.in:34: -1- AC_SUBST([datadir], [$prefix/share])
m4trace:configure.in:37: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from...
configure.in:19: the top level])
m4trace:configure.in:21: -1- AC_SUBST([SUBPROJETS], ['src/root/core src/root/physics src/root/gem src/root/tools src/system src/root/ganil'])
m4trace:configure.in:21: -1- AC_SUBST([SUBPROJETS], ['src/root/core src/root/physics src/root/gem src/root/tools '])
m4trace:configure.in:28: -1- AC_PROG_MAKE_SET([gmake])
m4trace:configure.in:28: -1- AC_SUBST([SET_MAKE])
m4trace:configure.in:34: -1- AC_SUBST([ROOTCINT_FOUND], [$ac_cv_path_ROOTCINT_FOUND])
m4trace:configure.in:37: -1- AC_SUBST([ROOTCONF_FOUND], [$ac_cv_path_ROOTCONF_FOUND])
m4trace:configure.in:42: -1- AC_SUBST([INSTALL_PROGRAM], ['cp'])
m4trace:configure.in:43: -1- AC_SUBST([INSTALL_DATA], ['cp -R'])
m4trace:configure.in:64: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [autoconf/general.m4:2315: AC_CHECK_FILE is expanded from...
configure.in:37: the top level])
m4trace:configure.in:39: -1- AC_SUBST([SUBPROJETS], ['src/root/core src/root/physics src/root/gem src/root/tools src/system src/root/ganil'])
m4trace:configure.in:39: -1- AC_SUBST([SUBPROJETS], ['src/root/core src/root/physics src/root/gem src/root/tools '])
m4trace:configure.in:43: -1- AC_PROG_MAKE_SET([gmake])
m4trace:configure.in:43: -1- AC_SUBST([SET_MAKE])
m4trace:configure.in:49: -1- AC_SUBST([ROOTCINT_FOUND], [$ac_cv_path_ROOTCINT_FOUND])
m4trace:configure.in:52: -1- AC_SUBST([ROOTCONF_FOUND], [$ac_cv_path_ROOTCONF_FOUND])
m4trace:configure.in:57: -1- AC_SUBST([INSTALL_PROGRAM], ['cp'])
m4trace:configure.in:58: -1- AC_SUBST([INSTALL_DATA], ['cp -R'])
m4trace:configure.in:79: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [autoconf/general.m4:2315: AC_CHECK_FILE is expanded from...
autoconf/general.m4:2327: AC_CHECK_FILES is expanded from...
configure.in:64: the top level])
m4trace:configure.in:64: -1- AC_DEFINE_TRACE_LITERAL([HAVE__USR_INCLUDE_BYTESWAP_H])
m4trace:configure.in:64: -1- AH_OUTPUT([HAVE__USR_INCLUDE_BYTESWAP_H], [/* Define to 1 if you have the file `AC_File\'. */
configure.in:79: the top level])
m4trace:configure.in:79: -1- AC_DEFINE_TRACE_LITERAL([HAVE__USR_INCLUDE_BYTESWAP_H])
m4trace:configure.in:79: -1- AH_OUTPUT([HAVE__USR_INCLUDE_BYTESWAP_H], [/* Define to 1 if you have the file `AC_File\'. */
#undef HAVE__USR_INCLUDE_BYTESWAP_H])
m4trace:configure.in:64: -1- AC_DEFINE_TRACE_LITERAL([HAVE_BYTESWAP_H])
m4trace:configure.in:66: -1- AC_CONFIG_HEADERS([src/system/GWConfig.h])
m4trace:configure.in:111: -1- AC_CONFIG_FILES([ Makefile ])
m4trace:configure.in:112: -1- AC_CONFIG_FILES([ Doxyfile ])
m4trace:configure.in:113: -1- AC_CONFIG_FILES([ src/root/core/Makefile ])
m4trace:configure.in:114: -1- AC_CONFIG_FILES([ src/root/physics/Makefile ])
m4trace:configure.in:115: -1- AC_CONFIG_FILES([ src/root/gem/Makefile ])
m4trace:configure.in:116: -1- AC_CONFIG_FILES([ src/root/tools/Makefile ])
m4trace:configure.in:117: -1- AC_CONFIG_FILES([ src/system/Makefile ])
m4trace:configure.in:118: -1- AC_CONFIG_FILES([ src/root/ganil/Makefile ])
m4trace:configure.in:119: -1- AC_CONFIG_FILES([ demos/gem/rootlogon.C ])
m4trace:configure.in:120: -1- AC_CONFIG_FILES([ demos/tools/rootlogon.C ])
m4trace:configure.in:121: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
m4trace:configure.in:121: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
m4trace:configure.in:79: -1- AC_DEFINE_TRACE_LITERAL([HAVE_BYTESWAP_H])
m4trace:configure.in:81: -1- AC_CONFIG_HEADERS([src/system/GsConfig.h])
m4trace:configure.in:126: -1- AC_CONFIG_FILES([ Makefile ])
m4trace:configure.in:127: -1- AC_CONFIG_FILES([ Doxyfile ])
m4trace:configure.in:128: -1- AC_CONFIG_FILES([ src/root/core/Makefile ])
m4trace:configure.in:129: -1- AC_CONFIG_FILES([ src/root/physics/Makefile ])
m4trace:configure.in:130: -1- AC_CONFIG_FILES([ src/root/gem/Makefile ])
m4trace:configure.in:131: -1- AC_CONFIG_FILES([ src/root/tools/Makefile ])
m4trace:configure.in:132: -1- AC_CONFIG_FILES([ src/system/Makefile ])
m4trace:configure.in:133: -1- AC_CONFIG_FILES([ src/root/ganil/Makefile ])
m4trace:configure.in:134: -1- AC_CONFIG_FILES([ demos/gem/rootlogon.C ])
m4trace:configure.in:135: -1- AC_CONFIG_FILES([ demos/tools/rootlogon.C ])
m4trace:configure.in:136: -1- AC_CONFIG_FILES([ src/root/core/GwConfig.h])
m4trace:configure.in:138: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
m4trace:configure.in:138: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
......@@ -1236,6 +1236,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
......@@ -1244,6 +1246,18 @@ if test "x$prefix" = "xNONE"; then
ac_configure_args="$ac_configure_args --prefix $prefix"
fi
exec_prefix=$prefix
includedir=$prefix/include
libdir=$prefix/lib
bindir=$prefix/bin
datadir=$prefix/share
# Check whether --enable-ganil or --disable-ganil was given.
if test "${enable_ganil+set}" = set; then
enableval="$enable_ganil"
......@@ -1255,8 +1269,6 @@ else
fi;
echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
......@@ -1409,7 +1421,7 @@ echo "$as_me: Bytes swapping is not optimized, /usr/include/byteswap.h not found
fi
ac_config_headers="$ac_config_headers src/system/GWConfig.h"
ac_config_headers="$ac_config_headers src/system/GsConfig.h"
......@@ -1441,6 +1453,9 @@ fi
ac_config_files="$ac_config_files demos/tools/rootlogon.C"
ac_config_files="$ac_config_files src/root/core/GwConfig.h"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
......@@ -1975,7 +1990,8 @@ do
"src/root/ganil/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/root/ganil/Makefile" ;;
"demos/gem/rootlogon.C" ) CONFIG_FILES="$CONFIG_FILES demos/gem/rootlogon.C" ;;
"demos/tools/rootlogon.C" ) CONFIG_FILES="$CONFIG_FILES demos/tools/rootlogon.C" ;;
"src/system/GWConfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/system/GWConfig.h" ;;
"src/root/core/GwConfig.h" ) CONFIG_FILES="$CONFIG_FILES src/root/core/GwConfig.h" ;;
"src/system/GsConfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/system/GsConfig.h" ;;
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
{ (exit 1); exit 1; }; };;
......
......@@ -6,6 +6,9 @@ dnl
AC_INIT([GammaWare],[0.3],[agata@ipnl.in2p3.fr],[GammaWare0.3])
AC_CONFIG_SRCDIR(./config/Makefile.root)
dnl set default to install the distribution
AC_PREFIX_DEFAULT(['/usr/local'])
dnl -------------------------------------
dnl information on the package
dnl -------------------------------------
......@@ -15,14 +18,26 @@ if test "x$prefix" = "xNONE"; then
ac_configure_args="$ac_configure_args --prefix $prefix"
fi
dnl AC_SUBST(exec_prefix,[$prefix])
dnl if test "x$datadir" = "xNONE"; then
dnl datadir=$prefix/share
dnl AC_SUBST(datadir,[$prefix/share])
dnl fi
dnl
dnl Some restrictions for the variuos path (all are based on prefix)
dnl
AC_SUBST(exec_prefix,[$prefix])
AC_SUBST(includedir,[$prefix/include])
AC_SUBST(libdir,[$prefix/lib])
AC_SUBST(bindir,[$prefix/bin])
AC_SUBST(datadir,[$prefix/share])
dnl configuration option for building with or without ganil
AC_ARG_ENABLE(ganil,AC_HELP_STRING([--enable-ganil],[enable to build the GANIL library])
,[AC_SUBST(SUBPROJETS,['src/root/core src/root/physics src/root/gem src/root/tools src/system src/root/ganil'])] \
,[AC_SUBST(SUBPROJETS,['src/root/core src/root/physics src/root/gem src/root/tools '])])
dnl set default to install the distribution
AC_PREFIX_DEFAULT(['/usr/local'])
dnl to set the correct makefile
dnl any makefile that call MAKE should starts with
AC_PROG_MAKE_SET(gmake)
......@@ -63,7 +78,7 @@ AC_CHECK_FILES([/usr/include/byteswap.h],
[AC_DEFINE([HAVE_BYTESWAP_H])],
[AC_MSG_NOTICE([Bytes swapping is not optimized, /usr/include/byteswap.h not found])])
AC_CONFIG_HEADERS([src/system/GWConfig.h])
AC_CONFIG_HEADERS([src/system/GsConfig.h])
dnl AC_CHECK_HEADER([byteswap.h])
......@@ -118,6 +133,8 @@ AC_CONFIG_FILES([ src/system/Makefile ])
AC_CONFIG_FILES([ src/root/ganil/Makefile ])
AC_CONFIG_FILES([ demos/gem/rootlogon.C ])
AC_CONFIG_FILES([ demos/tools/rootlogon.C ])
AC_CONFIG_FILES([ src/root/core/GwConfig.h])
AC_OUTPUT()
ok_conf=true
......
/***************************************************************************
* Copyright (C) 2004 by Olivier Stezowski *
* agata@ipnl.in2p3.fr *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
/** \file GwConfig.h to get information about the gammaware configuration
*
* Available are (const char *):
* - Gw::Version
* - Gw::LibraryPath
* - Gw::BinaryPath
* - Gw::IncludePath
* - Gw::IconsPath
* - Gw::NdbPath
* - Gw::MacrosPath
*
*/
#ifndef GW_CONFIG_H
#define GW_CONFIG_H
//! Gammaware namespace
/*!
All gammaware classes are protected by the Gw namespace
*/
namespace Gw {
static const char *Version = "@PACKAGE_VERSION@";
static const char *LibraryPath = "@libdir@";
static const char *BinaryPath = "@bindir@";
static const char *IncludePath = "@includedir@";
static const char *IconsPath = "@datadir@/gw/icons";
static const char *NdbPath = "@datadir@/gw/ndb";
static const char *MacrosPath = "@datadir@/gw/macros";
}
#endif
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment