From 1eff26319fbc55f1b521247b6d942a925b624173 Mon Sep 17 00:00:00 2001 From: Ron Date: Sat, 29 Jun 2013 06:28:43 +0930 Subject: [PATCH] Switch to using config.h for configuration options The main motivation for this is it ensures the files will actually be rebuilt if the configuration options are changed. --- configure.ac | 1 + examples/opusfile_example.c | 4 ++++ examples/seeking_example.c | 4 ++++ src/http.c | 4 ++++ src/info.c | 4 ++++ src/internal.c | 4 ++++ src/opusfile.c | 4 ++++ src/stream.c | 4 ++++ src/wincerts.c | 4 ++++ 9 files changed, 33 insertions(+) diff --git a/configure.ac b/configure.ac index e9e3431..93dc725 100644 --- a/configure.ac +++ b/configure.ac @@ -155,6 +155,7 @@ AC_CONFIG_FILES([ opusurl-uninstalled.pc doc/Doxyfile ]) +AC_CONFIG_HEADERS([config.h]) AC_OUTPUT AC_MSG_NOTICE([ diff --git a/examples/opusfile_example.c b/examples/opusfile_example.c index 22a13d6..f6afdba 100644 --- a/examples/opusfile_example.c +++ b/examples/opusfile_example.c @@ -9,6 +9,10 @@ * by the Xiph.Org Foundation and contributors http://www.xiph.org/ * * * ********************************************************************/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + /*For fileno()*/ #if !defined(_POSIX_SOURCE) # define _POSIX_SOURCE 1 diff --git a/examples/seeking_example.c b/examples/seeking_example.c index 4aabb5b..65f47ea 100644 --- a/examples/seeking_example.c +++ b/examples/seeking_example.c @@ -9,6 +9,10 @@ * by the Xiph.Org Foundation and contributors http://www.xiph.org/ * * * ********************************************************************/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + /*For fileno()*/ #if !defined(_POSIX_SOURCE) # define _POSIX_SOURCE 1 diff --git a/src/http.c b/src/http.c index 200f82a..9a7cd64 100644 --- a/src/http.c +++ b/src/http.c @@ -9,6 +9,10 @@ * by the Xiph.Org Foundation and contributors http://www.xiph.org/ * * * ********************************************************************/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "internal.h" #include #include diff --git a/src/info.c b/src/info.c index 195b56b..87ebb63 100644 --- a/src/info.c +++ b/src/info.c @@ -9,6 +9,10 @@ * by the Xiph.Org Foundation and contributors http://www.xiph.org/ * * * ********************************************************************/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "internal.h" #include #include diff --git a/src/internal.c b/src/internal.c index 2d2e3c8..96c80de 100644 --- a/src/internal.c +++ b/src/internal.c @@ -9,6 +9,10 @@ * by the Xiph.Org Foundation and contributors http://www.xiph.org/ * * * ********************************************************************/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "internal.h" #if defined(OP_ENABLE_ASSERTIONS) diff --git a/src/opusfile.c b/src/opusfile.c index 1c1ac3d..19df686 100644 --- a/src/opusfile.c +++ b/src/opusfile.c @@ -14,6 +14,10 @@ last mod: $Id: vorbisfile.c 17573 2010-10-27 14:53:59Z xiphmont $ ********************************************************************/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "internal.h" #include #include diff --git a/src/stream.c b/src/stream.c index 959522b..1f1ba2d 100644 --- a/src/stream.c +++ b/src/stream.c @@ -14,6 +14,10 @@ last mod: $Id: vorbisfile.c 17573 2010-10-27 14:53:59Z xiphmont $ ********************************************************************/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "internal.h" #include #include diff --git a/src/wincerts.c b/src/wincerts.c index 5d0c322..b0e35aa 100644 --- a/src/wincerts.c +++ b/src/wincerts.c @@ -16,6 +16,10 @@ [1] */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "internal.h" #if defined(OP_ENABLE_HTTP)&&defined(_WIN32) /*You must include windows.h before wincrypt.h and x509.h.*/ -- GitLab