From d4779abc042710638fb4afe419f83d4627c94004 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 23 Apr 2004 15:16:08 +0000 Subject: * Pass SYSTEM through config.h, and allow spaces. --- configure.ac | 4 +++- src/libutil/Makefile.am | 2 +- src/libutil/util.cc | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 60f9e1ff3..90da6e8cc 100644 --- a/configure.ac +++ b/configure.ac @@ -21,6 +21,7 @@ sys_name=`uname -s | tr [A-Z] [a-z]` system="${machine_name}-${sys_name}" AC_MSG_RESULT($system) AC_SUBST(system) +AC_DEFINE_UNQUOTED(SYSTEM, ["$system"], [platform identifier (`cpu-os')]) AC_PROG_CC AC_PROG_CXX @@ -43,7 +44,8 @@ AC_CHECK_HEADERS([locale]) AC_LANG_POP(C++) AC_DEFUN([NEED_PROG], -[AC_PATH_PROG($1, $2) +[ +AC_PATH_PROG($1, $2) if test -z "$$1"; then AC_MSG_ERROR([$1 is required]) fi diff --git a/src/libutil/Makefile.am b/src/libutil/Makefile.am index d5d4fcfad..bd19bfa83 100644 --- a/src/libutil/Makefile.am +++ b/src/libutil/Makefile.am @@ -3,7 +3,7 @@ noinst_LIBRARIES = libutil.a libutil_a_SOURCES = util.cc util.hh hash.cc hash.hh \ archive.cc archive.hh md5.c md5.h aterm.cc aterm.hh -AM_CXXFLAGS = -DSYSTEM=\"@system@\" -Wall -I.. ${aterm_include} +AM_CXXFLAGS = -Wall -I.. ${aterm_include} check_PROGRAMS = test-aterm diff --git a/src/libutil/util.cc b/src/libutil/util.cc index 87b2ef236..354165432 100644 --- a/src/libutil/util.cc +++ b/src/libutil/util.cc @@ -1,3 +1,5 @@ +#include "config.h" + #include #include #include -- cgit v1.2.3