Skip to content

Commit

Permalink
- Made 'make install' install config.h (into $PREFIX/include/pire);
Browse files Browse the repository at this point in the history
- Prefixed all definitions in config.h with PIRE_ to avoid name
  collisions.
  • Loading branch information
dprokoptsev committed Dec 17, 2010
1 parent f1342c1 commit 4888387
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions Makefile.am
@@ -1,2 +1,3 @@
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = pire tests pkg samples tools
CONFIG_CLEAN_FILES = pire/config.h
3 changes: 2 additions & 1 deletion configure.ac
Expand Up @@ -2,7 +2,7 @@ AC_PREREQ([2.60])
AC_INIT([pire], [0.0.4], [dprokoptsev@yandex-team.ru])
AM_INIT_AUTOMAKE([foreign -Wall])
AC_CONFIG_SRCDIR([pire/classes.cpp])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_HEADERS([config.h.in])
AC_CONFIG_MACRO_DIR([m4])

AC_LANG_CPLUSPLUS
Expand Down Expand Up @@ -50,4 +50,5 @@ AC_CONFIG_FILES([
samples/blacklist/Makefile
samples/pigrep/Makefile
])
AC_OUTPUT_COMMANDS([sed 's/#define \([A-Z]\)/#define PIRE_\1/' < config.h.in > pire/config.h])
AC_OUTPUT
2 changes: 2 additions & 0 deletions pire/Makefile.am
Expand Up @@ -80,6 +80,8 @@ pire_hdr_HEADERS = \
platform.h \
vbitset.h

nodist_pire_hdr_HEADERS = config.h

if ENABLE_EXTRA
pire_extradir = $(includedir)/pire/extra
pire_extra_HEADERS = \
Expand Down
4 changes: 3 additions & 1 deletion pire/defs.h
Expand Up @@ -24,6 +24,8 @@
#ifndef PIRE_DEFS_H
#define PIRE_DEFS_H

#include <pire/config.h>

namespace Pire {

#ifdef PIRE_DEBUG
Expand Down Expand Up @@ -51,7 +53,7 @@ namespace Pire {
using namespace SpecialChar;

namespace Impl {
#ifndef WORDS_BIGENDIAN
#ifndef PIRE_WORDS_BIGENDIAN
inline size_t ToLittleEndian(size_t val) { return val; }
#else
#error TODO: Please implement Pire::Impl::ToLittleEndian()
Expand Down
5 changes: 1 addition & 4 deletions pire/scanners/common.h
Expand Up @@ -24,15 +24,12 @@
#define PIRE_SCANNERS_COMMON_H_INCLUDED

#include <stdlib.h>
#include <pire/config.h>
#include "../align.h"
#include "../stub/defaults.h"
#include "../defs.h"
#include "../platform.h"

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

namespace Pire {

struct Header {
Expand Down

0 comments on commit 4888387

Please sign in to comment.