summaryrefslogtreecommitdiff
blob: ad95dd9ba7f43b747777a6911bab7abfe5aaa868 (plain)
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
--- lib/ast/pathpath.c
+++ lib/ast/pathpath.c
@@ -33,7 +33,12 @@
 #include <unistd.h>
 
 /* #include <option.h> */
+#ifdef __APPLE__
+#include <crt_externs.h>
+#define environ (*_NSGetEnviron())
+#else
 extern char **environ;
+#endif
 char **opt_info_argv;
 
 char *pathpath(register char *path, const char *p, const char *a, int mode)
--- lib/expr/Makefile.in
+++ lib/expr/Makefile.in
@@ -362,7 +362,11 @@
 pkglib_LTLIBRARIES = libexpr.la
 man_MANS = expr.3
 pdf_DATA = expr.pdf
+ifeq ($(host_os),darwin)
+libexpr_la_LDFLAGS = -version-info @VERSION_INFO@
+else
 libexpr_la_LDFLAGS = -version-info @VERSION_INFO@ -no-undefined
+endif
 libexpr_la_SOURCES = excc.c excontext.c exdata.c exerror.c \
        exeval.c exexpr.c exlexname.c exopen.c exrewind.c extoken.c \
        extype.c exzero.c exparse.y
--- lib/plugin/Makefile.in
+++ lib/plugin/Makefile.in
@@ -370,7 +370,13 @@
        libgvplugin_dot_layout.la \
        libgvplugin_usershape_gd.la
 
-libgvplugin_neato_layout_la_LDFLAGS = -version-info @VERSION_INFO@ -no-undefined
+ifneq ($(host_os),darwin)
+EXTRALDFLAGS="-no_undefined"
+else
+EXTRALDFLAGS=""
+endif
+
+libgvplugin_neato_layout_la_LDFLAGS = -version-info @VERSION_INFO@ $(EXTRALDFLAGS) 
 libgvplugin_neato_layout_la_SOURCES = \
        gvplugin_neato_layout.c \
        gvlayout_neato_layout.c
@@ -384,7 +390,7 @@
        $(top_builddir)/lib/pack/libpack.la \
        $(top_builddir)/lib/gvc/libgvc.la
 
-libgvplugin_dot_layout_la_LDFLAGS = -version-info @VERSION_INFO@ -no-undefined
+libgvplugin_dot_layout_la_LDFLAGS = -version-info @VERSION_INFO@ $(EXTRALDFLAGS)
 libgvplugin_dot_layout_la_SOURCES = \
        gvplugin_dot_layout.c \
        gvlayout_dot_layout.c
@@ -394,7 +400,7 @@
        $(top_builddir)/lib/pathplan/libpathplan.la \
        $(top_builddir)/lib/gvc/libgvc.la 
 
-libgvplugin_usershape_gd_la_LDFLAGS = -version-info @VERSION_INFO@ -no-undefined
+libgvplugin_usershape_gd_la_LDFLAGS = -version-info @VERSION_INFO@ $(EXTRALDFLAGS)
 libgvplugin_usershape_gd_la_SOURCES = \
        gvplugin_usershape_gd.c \
        gvusershape_gd.c