AM_CONDITIONAL(HAVE_RSL, test "$RSL_LIBS" != "")
AC_SUBST(RSL_LIBS)
-# Test for Windows vs. Unix
+# Test for windowing system
case "${host}" in
- *mingw32*) WIN32="yes" ;;
- *) WIN32="no" ;;
+ *mingw32*) SYS="WIN" ;;
+ *cygwin*) SYS="WIN" ;;
+ *apple*) SYS="MAC" ;;
+ *) SYS="X11" ;;
esac
-if test "$WIN32" = yes; then
+if test "$SYS" = "WIN"; then
ac_default_prefix="/"
fi
-AM_CONDITIONAL([WIN32], test "$WIN32" = "yes")
+AM_CONDITIONAL([SYS_WIN], test "$SYS" = "WIN")
+AM_CONDITIONAL([SYS_MAC], test "$SYS" = "MAC")
+AM_CONDITIONAL([SYS_X11], test "$SYS" = "X11")
-# Output
+# Output
AC_CONFIG_FILES([
Makefile
src/Makefile
--- /dev/null
+#!/bin/bash
+dir=$(pwd)
+PKG_CONFIG_PATH="../grits/src/" \
+./autogen.sh \
+ "--datadir=$dir/data" \
+ "--libdir=$dir/src/plugins" \
+ CFLAGS="-g -Werror $CFLAGS"
SUBDIRS = plugins
AM_CFLAGS = -Wall --std=gnu99 $(GRITS_CFLAGS)
-AM_LDFLAGS = -Wl,--export-dynamic \
- -Wl,--as-needed -Wl,--no-undefined
+AM_LDFLAGS = -Wl,--export-dynamic -Wl,--no-undefined
+
+if !SYS_MAC
+AM_LDFLAGS += -Wl,--as-needed
+endif
bin_PROGRAMS = aweather wsr88ddec
aweather_SOURCES = main.c \
wsr88ddec = wsr88ddec.c
wsr88ddec_LDADD = $(GLIB_LIBS) -lbz2
-if WIN32
+if SYS_WIN
dots = ..
wsr88ddec_LDFLAGS = -mwindows
AM_CFLAGS = -Wall --std=gnu99 $(GRITS_CFLAGS)
AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
-AM_LDFLAGS = -shared -module -avoid-version -Wl,--as-needed
+AM_LDFLAGS = -shared -module -avoid-version
LIBS = $(GRITS_LIBS)
+if SYS_WIN
+AM_LDFLAGS += -no-undefined
+dots = ..
+endif
+if !SYS_MAC
+AM_LDFLAGS += -Wl,--as-needed
+endif
+
pluginsdir = $(pkglibdir)
plugins_LTLIBRARIES = alert.la
radar_la_LIBADD = $(RSL_LIBS) $(GRITS_LIBS)
endif
-if WIN32
-AM_LDFLAGS += -no-undefined
-dots = ..
-endif
-
test:
( cd ../; make test )
#include <time.h>
#include <grits.h>
-#include <GL/gl.h>
#include <stdio.h>
#include <string.h>
#include <config.h>
#include <math.h>
-#include <GL/gl.h>
#include <glib/gstdio.h>
#include <grits.h>
#include <rsl.h>
#include <glib/gstdio.h>
#include <gtk/gtk.h>
#include <gio/gio.h>
-#include <GL/gl.h>
#include <math.h>
#include <rsl.h>