Index: configure.ac ================================================================== --- configure.ac +++ configure.ac @@ -11,11 +11,11 @@ CFLAGS="$CFLAGS -Wall" AX_CHECK_COMPILER_FLAGS(-pipe, [CFLAGS="$CFLAGS -pipe"]) AX_CHECK_COMPILER_FLAGS(-fno-common, [CFLAGS="$CFLAGS -fno-common"]) -AC_DEFINE(OF_CONFIG_H, 1, [Define so that we know we got our config.h]) +AC_DEFINE(OF_CONFIGURED, 1, [Define so that we know we got our config.h]) BUILDSYS_LIB AC_DEFINE_UNQUOTED(PLUGIN_SUFFIX, "$PLUGIN_SUFFIX", [Suffix for plugins]) if test x"$PLUGIN_SUFFIX" != "x"; then AC_SUBST(OFPLUGIN_M, "OFPlugin.m") Index: objfw-config.in ================================================================== --- objfw-config.in +++ objfw-config.in @@ -1,11 +1,12 @@ #!/bin/sh prefix="@prefix@" exec_prefix="@exec_prefix@" libdir="@libdir@" CFLAGS="" -CPPFLAGS="-I@includedir@ @ENDIANESS_DEF@ @ASPRINTF_DEF@ @OFPLUGIN_DEF@" +CPPFLAGS="-I@includedir@ -DOF_CONFIGURED @ENDIANESS_DEF@ @ASPRINTF_DEF@" +CPPFLAGS="$CPPFLAGS @OFPLUGIN_DEF@" CXXFLAGS="" OBJCFLAGS="-fobjc-exceptions -fconstant-string-class=OFConstString" OBJCFLAGS="$OBJCFLAGS @NO_CONST_CFSTRINGS@" LDFLAGS="@RPATH_LDFLAGS@" LIBS="-L${libdir} -lobjfw @LIBS@" Index: src/OFMacros.h ================================================================== --- src/OFMacros.h +++ src/OFMacros.h @@ -6,10 +6,15 @@ * * This file is part of libobjfw. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE included in * the packaging of this file. */ + +#ifndef OF_CONFIGURED +#error You are missing the libobjfw definitions! +#error Please use objfw-config! +#endif #ifdef __GNUC__ #define OF_INLINE inline __attribute__((always_inline)) #define OF_LIKELY(cond) __builtin_expect(!!(cond), 1) #define OF_UNLIKELY(cond) __builtin_expect(!!(cond), 0) Index: src/OFObject.h ================================================================== --- src/OFObject.h +++ src/OFObject.h @@ -6,10 +6,15 @@ * * This file is part of libobjfw. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE included in * the packaging of this file. */ + +#ifndef OF_CONFIGURED +#error You are missing the libobjfw definitions! +#error Please use objfw-config! +#endif #include #include #import Index: src/asprintf.h ================================================================== --- src/asprintf.h +++ src/asprintf.h @@ -6,12 +6,17 @@ * * This file is part of libobjfw. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE included in * the packaging of this file. */ + +#ifndef OF_CONFIGURED +#error You are missing the libobjfw definitions! +#error Please use objfw-config! +#endif #ifndef OF_HAVE_ASPRINTF #include extern int asprintf(char**, const char*, ...); extern int vasprintf(char**, const char*, va_list); #endif Index: tests/objc_sync/objc_sync.m ================================================================== --- tests/objc_sync/objc_sync.m +++ tests/objc_sync/objc_sync.m @@ -1,5 +1,18 @@ +/* + * Copyright (c) 2008 - 2009 + * Jonathan Schleifer + * + * All rights reserved. + * + * This file is part of libobjfw. It may be distributed under the terms of the + * Q Public License 1.0, which can be found in the file LICENSE included in + * the packaging of this file. + */ + +#include "config.h" + #include #import "OFString.h" #import "OFThread.h"