leftydir = $(pkgdatadir)/lefty
pdfdir = $(pkgdatadir)/doc/pdf
-DEFINES=-DLEFTYPATH=\"$(LEFTYLIBDIR)\" -DHAVE_CONFIG_H
-
AM_CPPFLAGS = \
-I$(top_srcdir)/cmd/lefty/ws/x11 \
-I$(top_srcdir)/cmd/lefty/os/unix \
-I$(top_srcdir)/cmd/lefty/dot2l @XAW_INCLUDES@
-AM_CFLAGS = $(DEFINES) @X_CFLAGS@
+AM_CFLAGS = -DLEFTYDATADIR=\"$(leftydir)\" -DHAVE_CONFIG_H @X_CFLAGS@
man = lefty.1
pdf = lefty.pdf
extern HANDLE hinstance;
char buf[260];
#endif
+#ifdef LEFTYDATADIR
+ char *leftdatadir = LEFTYDATADIR;
+#else
+ char *leftdatadir = NULL;
+#endif
c = 0;
if (getenv ("INNETSCAPE"))
if (!(leftypath = malloc (PATHINCR * PATHSIZE)))
panic (POS, "init", "leftypath malloc failed");
leftypath[0] = 0;
- if ((s1 = getenv ("LEFTYPATH")))
- strcat (leftypath, s1), strcat (leftypath, PATHSEPSTR);
- if (*aout)
- strcat (leftypath, aout), strcat (leftypath, PATHSEPSTR);
+ if ((s1 = getenv ("LEFTYPATH"))) {
+ strcat (leftypath, s1);
+ strcat (leftypath, PATHSEPSTR);
+ }
+ if (*aout) {
+ strcat (leftypath, aout);
+ strcat (leftypath, PATHSEPSTR);
+ }
for (k = 0; k < 2; k++) {
if (k == 0)
s1 = aout;
if (leftypath[0])
strcat (leftypath, PATHSEPSTR);
}
+ if (leftdatadir) { /* support a compile-time path as last resort */
+ strcat (leftypath, leftdatadir);
+ strcat (leftypath, PATHSEPSTR);
+ }
if (!(leftyoptions = getenv ("LEFTYOPTIONS")))
leftyoptions = "";
putenv (WINSYS);