*apple*) SYS="MAC" ;;
*) SYS="X11" ;;
esac
-if test "$SYS" = "WIN"; then
- ac_default_prefix="/"
-fi
AM_CONDITIONAL([SYS_WIN], test "$SYS" = "WIN")
AM_CONDITIONAL([SYS_MAC], test "$SYS" = "MAC")
AM_CONDITIONAL([SYS_X11], test "$SYS" = "X11")
+# Check for relative build
+AC_ARG_ENABLE(relative, [AS_HELP_STRING([--enable-relative],
+ [enable runtime search paths @<:@default=no@:>@])],
+ [DOTS=".."; ac_default_prefix="/"])
+AC_SUBST([DOTS])
+
# Output
AC_CONFIG_FILES([
Makefile
aweather-gui.c aweather-gui.h \
aweather-location.c aweather-location.h
aweather_CPPFLAGS = \
- -DHTMLDIR="\"$(dots)$(htmldir)\"" \
- -DICONDIR="\"$(dots)$(datadir)/icons\"" \
- -DPKGDATADIR="\"$(dots)$(pkgdatadir)\"" \
- -DPLUGINSDIR="\"$(dots)$(pkglibdir)\""
+ -DHTMLDIR="\"$(DOTS)$(htmldir)\"" \
+ -DICONDIR="\"$(DOTS)$(datadir)/icons\"" \
+ -DPKGDATADIR="\"$(DOTS)$(pkgdatadir)\"" \
+ -DPLUGINSDIR="\"$(DOTS)$(pkglibdir)\""
aweather_LDADD = $(GRITS_LIBS)
wsr88ddec = wsr88ddec.c
wsr88ddec_LDADD = $(GLIB_LIBS) -lbz2
if SYS_WIN
-dots = ..
-
wsr88ddec_LDFLAGS = -mwindows
aweather_SOURCES += resource.rc
if SYS_WIN
AM_LDFLAGS += -no-undefined
-dots = ..
endif
if !SYS_MAC
AM_LDFLAGS += -Wl,--as-needed
alert.c alert.h \
alert-info.c alert-info.h
alert_la_CPPFLAGS = \
- -DPKGDATADIR="\"$(dots)$(pkgdatadir)\""
+ -DPKGDATADIR="\"$(DOTS)$(pkgdatadir)\""
alert_la_LIBADD = $(GRITS_LIBS)
if HAVE_RSL
../aweather-location.c \
../aweather-location.h
radar_la_CPPFLAGS = \
- -DPKGDATADIR="\"$(dots)$(pkgdatadir)\"" \
+ -DPKGDATADIR="\"$(DOTS)$(pkgdatadir)\"" \
-I$(top_srcdir)/src
radar_la_LIBADD = $(RSL_LIBS) $(GRITS_LIBS)
endif