This repository has been archived by the owner on Jul 4, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 11.4k
/
gengetopt.rb
70 lines (60 loc) · 1.52 KB
/
gengetopt.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
require 'formula'
class Gengetopt < Formula
url 'http://ftpmirror.gnu.org/gengetopt/gengetopt-2.22.5.tar.gz'
mirror 'http://ftp.gnu.org/gnu/gengetopt/gengetopt-2.22.5.tar.gz'
homepage 'http://www.gnu.org/software/gengetopt/'
sha1 '8b1d97cbd8d013998d74830a0286435f881e3c10'
def patches
# patches to fix conflicting struct definitions
# upstream issue: http://savannah.gnu.org/bugs/index.php?34430
DATA
end
def install
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}",
"--mandir=#{man}"
ENV.deparallelize
system "make install"
end
end
__END__
diff --git a/doc/main1.cc b/doc/main1.cc
index e6e727e..838d2ae 100644
--- a/doc/main1.cc
+++ b/doc/main1.cc
@@ -2,6 +2,10 @@
/* we try to use gengetopt generated file in a C++ program */
/* we don't use autoconf and automake vars */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <iostream>
#include "stdlib.h"
diff --git a/src/acceptedvalues.cpp b/src/acceptedvalues.cpp
index 792908b..1ecb10f 100644
--- a/src/acceptedvalues.cpp
+++ b/src/acceptedvalues.cpp
@@ -10,6 +10,10 @@
//
//
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <sstream>
#include "acceptedvalues.h"
diff --git a/src/fileutils.cpp b/src/fileutils.cpp
index d97782c..33eecde 100644
--- a/src/fileutils.cpp
+++ b/src/fileutils.cpp
@@ -10,6 +10,10 @@
//
//
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <cstdio>
#include <cstdlib>
#include <cstring>