summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2004-12-09 17:06:08 +0000
committerEric S. Raymond <esr@thyrsus.com>2004-12-09 17:06:08 +0000
commit389942537baa196ef7834b8398ebe428fed4b27f (patch)
treef98fb0837e6bf099a6d92d7c4f94f2c35b8b68bd
parent4da2762a891dd5863b0f2d9e6d2aa4a1d46a7152 (diff)
downloadgpsd-389942537baa196ef7834b8398ebe428fed4b27f.tar.gz
HP-UX port changes and automake update.release-2.4
-rw-r--r--AUTHORS3
-rw-r--r--Makefile.am17
-rw-r--r--configure.in6
-rw-r--r--gpsd.spec.in2
-rw-r--r--serial.c11
-rw-r--r--xgpsspeed.c12
6 files changed, 36 insertions, 15 deletions
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 00000000..f915c779
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,3 @@
+Remco Treffkorn <remco@rvt.com>
+Derrick J. Brashear <shadow@dementia.org>
+Eric S. Raymond <esr@thyrsus.com>
diff --git a/Makefile.am b/Makefile.am
index cf3c8144..571da079 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -7,6 +7,8 @@ if HAVE_MOTIF
BUILD_PROGS = gps xgpsspeed
endif
+XMLTO = xmlto
+
bin_PROGRAMS = $(BUILD_PROGS)
bin_SCRIPTS = gpsprobe
@@ -15,7 +17,7 @@ bin_SCRIPTS = gpsprobe
#
gps_SOURCES = display.c gps.c
gps_CFLAGS = $(X_CFLAGS)
-gps_LDADD = $(LIBM) $(LIBC) $(LIBNSL) $(LIBSOCKET) $(XM_LIBS) $(X_LIBS) $(X_PRE_LIBS) libgps.la
+gps_LDADD = $(LIBM) $(LIBC) $(LIBNSL) $(LIBSOCKET) $(XM_LIBS) $(X_LIBS) $(X_PRE_LIBS) libgps.la -lm
#
# Build xgpsspeed
@@ -27,7 +29,7 @@ xgpsspeed_SOURCES = \
Tachometer.h \
xgpsspeed.icon
xgpsspeed_CFLAGS = $(X_CFLAGS)
-xgpsspeed_LDADD = $(LIBM) $(LIBC) $(LIBNSL) $(LIBSOCKET) $(XAW_LIBS) $(XM_LIBS) $(X_LIBS) $(X_PRE_LIBS) libgps.la
+xgpsspeed_LDADD = $(LIBM) $(LIBC) $(LIBNSL) $(LIBSOCKET) $(XAW_LIBS) $(XM_LIBS) $(X_LIBS) $(X_PRE_LIBS) libgps.la -lm
#
@@ -35,7 +37,7 @@ xgpsspeed_LDADD = $(LIBM) $(LIBC) $(LIBNSL) $(LIBSOCKET) $(XAW_LIBS) $(XM_LIBS)
#
sbin_PROGRAMS = gpsd
gpsd_SOURCES = gpsd.c
-gpsd_LDADD = $(LIBM) libgps.la
+gpsd_LDADD = $(LIBM) libgps.la -lm
#
@@ -66,16 +68,16 @@ man_MANS = \
gpsprobe.1
gpsd.1 gps.1 xgpsspeed.1: gpsd.xml
- xmlto man gpsd.xml
+ $(XMLTO) man gpsd.xml
libgps.3: libgps.xml
- xmlto man libgps.xml
+ $(XMLTO) man libgps.xml
libgpsd.3: libgpsd.xml
- xmlto man libgpsd.xml
+ $(XMLTO) man libgpsd.xml
gpsprobe.1: gpsprobe.xml
- xmlto man gpsprobe.xml
+ $(XMLTO) man gpsprobe.xml
#
# Do a release with a tar.gz and a tar.bz2
@@ -99,6 +101,7 @@ EXTRA_DIST = \
COPYING \
HACKING \
TODO \
+ AUTHORS \
gpsd.xml \
libgpsd.xml \
libgps.xml \
diff --git a/configure.in b/configure.in
index 68fb16c6..91e095f5 100644
--- a/configure.in
+++ b/configure.in
@@ -10,9 +10,11 @@ AC_PROG_INSTALL
AC_PROG_LIBTOOL
AC_C_BIGENDIAN
-CFLAGS="$CFLAGS -Wall -Werror"
+if eval "test x$GCC = xyes"; then
+ CFLAGS="$CFLAGS -Wall -Werror"
+fi
-AC_CHECK_HEADERS(termios.h sys/termios.h sys/select.h strings.h sys/filio.h sys/time.h X11/xpm.h xpm.h)
+AC_CHECK_HEADERS(termios.h sys/termios.h sys/select.h strings.h sys/filio.h sys/time.h X11/xpm.h xpm.h getopt.h sys/modem.h)
AC_CHECK_LIB(nsl, gethostbyname, LIBNSL="-lnsl")
AC_SUBST(LIBNSL)
diff --git a/gpsd.spec.in b/gpsd.spec.in
index 2fe778da..a5d92c3f 100644
--- a/gpsd.spec.in
+++ b/gpsd.spec.in
@@ -124,7 +124,7 @@ if [ -f /etc/udev/rules.d/ ] then rm /etc/udev/rules.d/80-gpsd.rules
seen; this change also fixes a bug where gpsd claimed it was confused
if GPGSA had not been seen and status was set. RPM will now install
a udevd rule if the host system uses it. Don't set the online flag
- on activate.
+ on activate. HP port changes and -Wall cleanup.
* Mon Oct 25 2004 Eric S. Raymond <esr@snark.thyrsus.com> - 2.3-1
- Documentation and comment fixes. Last two globals removed from
diff --git a/serial.c b/serial.c
index 49eca467..729e798a 100644
--- a/serial.c
+++ b/serial.c
@@ -2,6 +2,17 @@
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
+#if defined(HAVE_SYS_MODEM_H)
+#include <sys/modem.h>
+#endif /* HAVE_SYS_MODEM_H */
+/* Workaround for HP-UX 11.23, which is missing CRTSCTS */
+#ifndef CRTSCTS
+# ifdef CNEW_RTSCTS
+# define CRTSCTS CNEW_RTSCTS
+# else
+# define CRTSCTS 0
+# endif /* CNEW_RTSCTS */
+#endif /* !CRTSCTS */
#include "gpsd.h"
diff --git a/xgpsspeed.c b/xgpsspeed.c
index a2e297f6..c687d36a 100644
--- a/xgpsspeed.c
+++ b/xgpsspeed.c
@@ -2,9 +2,13 @@
* - Derrick J Brashear <shadow@dementia.org>
* Tachometer widget from Kerberometer (xklife)
*/
+#include "config.h"
+
#include <unistd.h>
#include <stdlib.h>
+#if defined(HAVE_GETOPT_H)
#include <getopt.h>
+#endif /* HAVE_GETOPT_H */
#include <errno.h>
#include <stdio.h>
#include <math.h>
@@ -17,7 +21,6 @@
#include <X11/Xaw/Paned.h>
#include <Tachometer.h>
-#include "config.h"
#include "xgpsspeed.icon"
#include "gps.h"
@@ -51,7 +54,6 @@ int main(int argc, char **argv)
{
Arg args[10];
XtAppContext app;
- Cardinal i;
int option;
char *colon, *server = NULL;
char *port = DEFAULT_GPSD_PORT;
@@ -81,18 +83,18 @@ int main(int argc, char **argv)
XtSetArg(args[0], XtNiconPixmap,
XCreateBitmapFromData(XtDisplay(toplevel),
XtScreen(toplevel)->root, xgps_bits,
- xgps_width, xgps_height)); i++;
+ xgps_width, xgps_height));
XtSetValues(toplevel, args, 1);
/**** Form widget ****/
base = XtCreateManagedWidget("pane", panedWidgetClass, toplevel, NULL, 0);
/**** Label widget (Title) ****/
- XtSetArg(args[0], XtNlabel, "GPS Speedometer"); i++;
+ XtSetArg(args[0], XtNlabel, "GPS Speedometer");
label = XtCreateManagedWidget("title", labelWidgetClass, base, args, 1);
/**** Label widget ****/
- XtSetArg(args[0], XtNlabel, "Miles per Hour"); i++;
+ XtSetArg(args[0], XtNlabel, "Miles per Hour");
label = XtCreateManagedWidget("name", labelWidgetClass, base, args, 1);
/**** Tachometer widget ****/