]> Pileus Git - aweather/commitdiff
OSX port
authorAndy Spencer <andy753421@gmail.com>
Sun, 4 Dec 2011 10:54:10 +0000 (02:54 -0800)
committerAndy Spencer <andy753421@gmail.com>
Mon, 12 Dec 2011 08:07:32 +0000 (08:07 +0000)
configure.ac
gen-apple.sh [new file with mode: 0755]
src/Makefile.am
src/plugins/Makefile.am
src/plugins/alert.c
src/plugins/level2.c
src/plugins/radar.c

index c8f9a3d7b36bf74c6a552ac06e8cc8a1024a964d..cfc16508b97513aa6c7992b2973736822f466762 100644 (file)
@@ -21,15 +21,20 @@ AC_CHECK_LIB(rsl, RSL_wsr88d_to_radar, RSL_LIBS="-lrsl")
 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
+AC_SUBST([SYS])
+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 
 AC_CONFIG_FILES([
diff --git a/gen-apple.sh b/gen-apple.sh
new file mode 100755 (executable)
index 0000000..a2246be
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash
+dir=$(pwd)
+PKG_CONFIG_PATH="../grits/src/" \
+./autogen.sh \
+       "--datadir=$dir/data" \
+       "--libdir=$dir/src/plugins" \
+       CFLAGS="-g -Werror $CFLAGS"
index fb2e6f5e4cc42e34a9a4a5f9e21fd8635fbadd8c..e31c39463e4f30824660944c681d4b91b0fbdd7c 100644 (file)
@@ -1,8 +1,11 @@
 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 \
@@ -18,7 +21,7 @@ aweather_LDADD    = $(GRITS_LIBS)
 wsr88ddec         = wsr88ddec.c
 wsr88ddec_LDADD   = $(GLIB_LIBS) -lbz2
 
-if WIN32
+if SYS_WIN
 dots = ..
 
 wsr88ddec_LDFLAGS     = -mwindows
index 912bb46160111adc5a4ef675c0fa291de5f8bb3c..aae263290a3e6c00a578d05f736eb07ea2444519 100644 (file)
@@ -1,8 +1,16 @@
 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
@@ -28,11 +36,6 @@ radar_la_CPPFLAGS = \
 radar_la_LIBADD  = $(RSL_LIBS) $(GRITS_LIBS)
 endif
 
-if WIN32
-AM_LDFLAGS += -no-undefined
-dots = ..
-endif
-
 test:
        ( cd ../; make test )
 
index d4c6e212286995556f73ccd9976446508872ee24..2ad3a4ccf60409cbc52ac976f985d6de6c54c8c8 100644 (file)
@@ -18,7 +18,6 @@
 
 #include <time.h>
 #include <grits.h>
-#include <GL/gl.h>
 #include <stdio.h>
 #include <string.h>
 
index 2edaabcfc61605322b243de410790a31defbdda0..c6b71949c804b80df538026ceb8b7d8a43806e30 100644 (file)
@@ -17,7 +17,6 @@
 
 #include <config.h>
 #include <math.h>
-#include <GL/gl.h>
 #include <glib/gstdio.h>
 #include <grits.h>
 #include <rsl.h>
index 1b4e2b8feed1bdd423cda82fb5006cfa376325ab..8166e6630891c2fdd341b0468e2b2a57a398d1c1 100644 (file)
@@ -21,7 +21,6 @@
 #include <glib/gstdio.h>
 #include <gtk/gtk.h>
 #include <gio/gio.h>
-#include <GL/gl.h>
 #include <math.h>
 #include <rsl.h>