Install a misc/_config.h to hide all the defines that clutter the
built output. This is also a step towards better checks for things like __attribute__ or std::tr1. * m4/ax_prefix_config_h.m4: New file. * configure.ac: Call AC_CONFIG_HEADERS and AX_PREFIX_CONFIG_H. * src/misc/Makefile.am: Install misc/_config.h. * src/misc/random.cc, src/misc/version.cc: Include misc/_config.h.
This commit is contained in:
parent
78f932081b
commit
67ff9f203f
7 changed files with 246 additions and 4 deletions
|
|
@ -26,6 +26,9 @@ AM_CXXFLAGS = $(WARNING_CXXFLAGS)
|
|||
|
||||
miscdir = $(pkgincludedir)/misc
|
||||
|
||||
nodist_misc_HEADERS = _config.h
|
||||
DISTCLEANFILES = _config.h
|
||||
|
||||
misc_HEADERS = \
|
||||
bareword.hh \
|
||||
bddalloc.hh \
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
|
||||
// Copyright (C) 2004, 2011 Laboratoire d'Informatique de Paris 6 (LIP6),
|
||||
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
|
||||
// et Marie Curie.
|
||||
//
|
||||
|
|
@ -19,6 +19,7 @@
|
|||
// Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
// 02111-1307, USA.
|
||||
|
||||
#include "_config.h"
|
||||
#include "random.hh"
|
||||
#include <cstdlib>
|
||||
|
||||
|
|
@ -27,7 +28,7 @@ namespace spot
|
|||
void
|
||||
srand(unsigned int seed)
|
||||
{
|
||||
#if HAVE_SRAND48 && HAVE_DRAND48
|
||||
#if SPOT_HAVE_SRAND48 && SPOT_HAVE_DRAND48
|
||||
::srand48(seed);
|
||||
#else
|
||||
::srand(seed);
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
// Copyright (C) 2011 Laboratoire de Recherche et Développement de
|
||||
// l'Epita (LRDE).
|
||||
// Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
|
||||
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
|
||||
// et Marie Curie.
|
||||
|
|
@ -20,10 +22,11 @@
|
|||
// 02111-1307, USA.
|
||||
|
||||
#include "version.hh"
|
||||
#include "_config.h"
|
||||
|
||||
namespace spot
|
||||
{
|
||||
static const char version_[] = VERSION;
|
||||
static const char version_[] = SPOT_VERSION;
|
||||
|
||||
const char*
|
||||
version()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue