diff --git a/src/espeak-ng.c b/src/espeak-ng.c index 4ed20e0c..d0a1c105 100644 --- a/src/espeak-ng.c +++ b/src/espeak-ng.c @@ -17,13 +17,15 @@ * along with this program; if not, see: . */ +#include "config.h" + #include #include #include #include #include #include -#ifndef NEED_GETOPT +#ifdef HAVE_GETOPT_H #include #endif #include @@ -294,7 +296,7 @@ static void PrintVersion() printf("eSpeak text-to-speech: %s Data at: %s\n", version, path_data); } -#ifdef NEED_GETOPT +#ifndef HAVE_GETOPT_H struct option { char *name; int has_arg; @@ -373,7 +375,7 @@ int main(int argc, char **argv) devicename[0] = 0; option_punctlist[0] = 0; -#ifdef NEED_GETOPT +#ifndef HAVE_GETOPT_H optind = 1; opt_string = ""; while (optind < argc) { diff --git a/src/libespeak-ng/speech.h b/src/libespeak-ng/speech.h index 250fc792..3758360e 100644 --- a/src/libespeak-ng/speech.h +++ b/src/libespeak-ng/speech.h @@ -32,7 +32,6 @@ extern "C" #endif #ifdef __QNX__ -#define NEED_GETOPT #define NO_VARIADIC_MACROS #endif @@ -40,7 +39,6 @@ extern "C" #define PLATFORM_WINDOWS #define PATHSEP '\\' -#define NEED_GETOPT #define NO_VARIADIC_MACROS #else diff --git a/src/speak-ng.c b/src/speak-ng.c index d19e4419..cd0c4157 100644 --- a/src/speak-ng.c +++ b/src/speak-ng.c @@ -38,7 +38,7 @@ #endif #endif -#ifndef NEED_GETOPT +#ifdef HAVE_GETOPT_H #include #endif #include @@ -284,7 +284,7 @@ static int WavegenFile(void) return finished; } -#ifdef NEED_GETOPT +#ifndef HAVE_GETOPT_H struct option { char *name; int has_arg; @@ -359,7 +359,7 @@ int main(int argc, char **argv) option_multibyte = espeakCHARS_AUTO; f_trans = stdout; -#ifdef NEED_GETOPT +#ifndef HAVE_GETOPT_H optind = 1; opt_string = ""; while (optind < argc) {