aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--macros/ChangeLog5
-rw-r--r--macros/gnome-pilot.m447
2 files changed, 48 insertions, 4 deletions
diff --git a/macros/ChangeLog b/macros/ChangeLog
index c2333280e2..f909414ebb 100644
--- a/macros/ChangeLog
+++ b/macros/ChangeLog
@@ -1,3 +1,8 @@
+1999-10-31 Eskil Heyn Olsen <deity@eskil.dk>
+
+ * gnome-pilot.m4: added PILOT_LINK_CHECK, used by
+ GNOME_PILOT_CHECK. Adds --with-pisock=$dir_for_pilot_link.
+
1999-10-24 Jacob Berkman <jberkman@andrew.cmu.edu>
* gnome-ghttp-check.m4: this should be a better fix
diff --git a/macros/gnome-pilot.m4 b/macros/gnome-pilot.m4
index 5895bf793f..e0e6f293cd 100644
--- a/macros/gnome-pilot.m4
+++ b/macros/gnome-pilot.m4
@@ -17,6 +17,46 @@ AC_SUBST(PISOCK_LIBS)
AC_SUBST(PILOT_BINS)
AC_SUBST(PILOT_LIBS)
+AC_DEFUN([PILOT_LINK_HOOK],[
+ AC_ARG_WITH(pisock,
+ [ --with-pisock Specify prefix for pisock files],[
+ if test x$withval = xyes; then
+ dnl Note that an empty true branch is not valid sh syntax.
+ ifelse([$1], [], :, [$1])
+ else
+ PISOCK_INCLUDEDIR="-I$withval/include"
+ PISOCK_LIBDIR="-L$withval/lib"
+ PISOCK_LIBS="-lpisock"
+ AC_MSG_CHECKING("for existance of $withval/lib/libpisock.so")
+ if test -e $withval/lib/libpisock.so; then
+ AC_MSG_RESULT("yes")
+ else
+ AC_MSG_ERROR("Unable to find libpisock. Try ftp://ryeham.ee.ryerson.ca/pub/PalmOS/.")
+ fi
+ AC_SUBST(PISOCK_INCLUDEDIR)
+ AC_SUBST(PISOCK_LIBDIR)
+ fi
+ ])
+
+ if test x$PISOCK_INCLUDEDIR = x; then
+ AC_CHECK_HEADER(pi-version.h, [], [
+ AC_CHECK_HEADER(libpisock/pi-version.h, PISOCK_INCLUDEDIR="-I/usr/include/libpisock",
+ AC_MSG_ERROR("Unable to find pi-version.h")) ])
+ fi
+
+ AC_SUBST(PISOCK_INCLUDEDIR)
+
+ if test x$PISOCK_INCLUDEDIR = x; then
+ AC_CHECK_LIB(pisock, pi_accept, [ PISOCK_LIBS=-lpisock ],
+ [ AC_MSG_ERROR("Unable to find libpisock. Try ftp://ryeham.ee.ryerson.ca/pub/PalmOS/.") ])
+ fi
+
+])
+
+AC_DEFUN([PILOT_LINK_CHECK],[
+ PILOT_LINK_HOOK([],nofailure)
+])
+
AC_DEFUN([GNOME_PILOT_HOOK],[
AC_PATH_PROG(GNOME_PILOT_CONFIG,gnome-pilot-config,no)
AC_CACHE_CHECK([for gnome-pilot environment],gnome_cv_pilot_found,[
@@ -28,12 +68,10 @@ AC_DEFUN([GNOME_PILOT_HOOK],[
])
AM_CONDITIONAL(HAVE_GNOME_PILOT,test x$gnome_cv_pilot_found = xyes)
if test x$gnome_cv_pilot_found = xyes; then
- $1
- AC_CHECK_HEADER(pi-version.h, [PISOCK_INCLUDEDIR=""], [
- AC_CHECK_HEADER(libpisock/pi-version.h, [PISOCK_INCLUDEDIR="-I/usr/include/libpisock"])])
- AC_CHECK_LIB(pisock, pi_accept, [ PISOCK_LIBS="-lpisock" ])
+ PILOT_LINK_CHECK
GNOME_PILOT_CFLAGS=`gnome-pilot-config --cflags client conduitmgmt`
GNOME_PILOT_LIBS=`gnome-pilot-config --libs client conduitmgmt`
+ $1
else
if test x$2 = xfailure; then
AC_MSG_ERROR(Gnome-pilot not installed or installation problem)
@@ -44,3 +82,4 @@ AC_DEFUN([GNOME_PILOT_HOOK],[
AC_DEFUN([GNOME_PILOT_CHECK],[
GNOME_PILOT_HOOK([],nofailure)
])
+