aboutsummaryrefslogtreecommitdiffstats
path: root/macros/gnome-pilot.m4
blob: 22018f445be59f60f5254d9562cbb3341d461d79 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
dnl
dnl GNOME_PILOT_HOOK(script if found, fail)
dnl if fail = "failure", abort if gnome-pilot not found
dnl

dnl
dnl 

GNOME_PILOT_CFLAGS=
GNOME_PILOT_LIBS=
PISOCK_CFLAGS=
PISOCK_LIBS=

AC_SUBST(GNOME_PILOT_CFLAGS)
AC_SUBST(GNOME_PILOT_LIBS)
AC_SUBST(PISOCK_CFLAGS)
AC_SUBST(PISOCK_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_CFLAGS="-I$withval/include"
        incdir="$withval/include"
        PISOCK_LIBS="-L$withval/lib -lpisock"
        AC_MSG_CHECKING("for existance of $withval/lib/libpisock.so")
        if test -r $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
    fi
    ])

    if test x$PISOCK_CFLAGS = x; then
        AC_CHECK_HEADER(pi-version.h, [incdir="/usr/include"], [
        AC_CHECK_HEADER(libpisock/pi-version.h, [PISOCK_CFLAGS="-I/usr/include/libpisock"
                                                 piversion_include="libpisock/pi-version.h"
                             incdir="/usr/inlude/libpisock"
                                                    ], [
        AC_CHECK_HEADER($prefix/include/pi-version.h, [PISOCK_CFLAGS="-I$prefix/include/libpisock"
                                                       piversion_include="$prefix/include/pi-version.h"
                                   if test x$PISOCK_LIBDIR = x; then
                                  incdir="$prefix/include"
                                  PISOCK_LIBS="-L$prefix/lib -lpisock"
                                                           fi                             ],
        AC_MSG_ERROR("Unable to find pi-version.h")) 
        ])
        ])
    fi
        
    if test "x$PISOCK_LIBS" = "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_ARG_ENABLE(pilotlinktest,
        [  --enable-pilotlinktest   Test for correct version of pilot-link],
        [testplversion=$enableval],
        [ testplversion=yes ]
    )

    if test x$piversion_include = x; then
        piversion_include="pi-version.h"
    fi

    pi_version=`cat $incdir/pi-version.h|grep PILOT_LINK_VERSION|sed 's/#define PILOT_LINK_VERSION \([[0-9]]*\)/\1/'`
    pi_major=`cat $incdir/pi-version.h|grep PILOT_LINK_MAJOR|sed 's/#define PILOT_LINK_MAJOR \([[0-9]]*\)/\1/'`
    pi_minor=`cat $incdir/pi-version.h|grep PILOT_LINK_MINOR|sed 's/#define PILOT_LINK_MINOR \([[0-9]]*\)/\1/'`
    pi_patch=`cat $incdir/pi-version.h|grep PILOT_LINK_PATCH|sed 's/#define PILOT_LINK_PATCH \"\(.*\)\"/\1/'`

    PILOT_LINK_VERSION="$pi_version.$pi_major.$pi_minor$pi_patch"

    if test x$testplversion = xyes; then
        AC_MSG_CHECKING(for pilot-link version >= $1)
        pl_ve=`echo $1|sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
        pl_ma=`echo $1|sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
        pl_mi=`echo $1|sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
        CFLAGS_save="$CFLAGS"
        CFLAGS="$CFLAGS $PISOCK_CFLAGS"
        AC_TRY_RUN(
            [
            #include <$piversion_include>
            int main(int argc,char *argv[]) {
                if (PILOT_LINK_VERSION == $pl_ve) {
                    if (PILOT_LINK_MAJOR == $pl_ma) {
                        if (PILOT_LINK_MINOR >= $pl_mi) {
                            return 0;
                            }
                    } else if (PILOT_LINK_MAJOR > $pl_ma) {
                        return 0;
                    }
                } else if (PILOT_LINK_VERSION > $pl_ve) {
                    return 0;
                }
                return 1;
            }
            ],
            [AC_MSG_RESULT(yes (found $PILOT_LINK_VERSION))],
            [AC_MSG_ERROR("pilot-link >= $1 required")],
            [AC_MSG_WARN("No action taken for crosscompile")]
        )
        CFLAGS="$CFLAGS_save"
    fi

    PISOCK_CFLAGS="$PISOCK_CFLAGS -DGP_PILOT_LINK_VERSION=\\\"$PILOT_LINK_VERSION\\\""

    unset piversion_include
    unset pi_verion
    unset pi_major
    unset pi_minor
    unset pi_patch
    unset incdir
    unset pl_mi
    unset pl_ma
    unset pl_ve
])

AC_DEFUN([PILOT_LINK_CHECK],[
    PILOT_LINK_HOOK($1,[],nofailure)
])

AC_DEFUN([GNOME_PILOT_HOOK],[
    AC_PATH_PROG(GNOME_CONFIG,gnome-config,no)
    AC_CACHE_CHECK([for gnome-pilot environment],gnome_cv_pilot_found,[
        if test "x$GNOME_CONFIG" = "xno"; then
            gnome_cv_pilot_found=no
        else
            # gnome-config doesn't return a useful error status,
            # so we check if it outputs anything to stderr
            if test "x`$GNOME_CONFIG gpilot 2>&1 > /dev/null`" = "x"; then
                gnome_cv_pilot_found=yes
            else
                gnome_cv_pilot_found=no
            fi
        fi
    ])
    AM_CONDITIONAL(HAVE_GNOME_PILOT,test x$gnome_cv_pilot_found = xyes)
    if test x$gnome_cv_pilot_found = xyes; then
        PILOT_LINK_CHECK($1)
        GNOME_PILOT_CFLAGS=`gnome-config --cflags gpilot`
        GNOME_PILOT_LIBS=`gnome-config --libs gpilot`
        $2
    else
        if test x$3 = xfailure; then
            AC_MSG_ERROR(gnome-pilot development package not installed or installation problem)
        fi
    fi
])

AC_DEFUN([GNOME_PILOT_CHECK],[
    if test x$1 = x; then
        GNOME_PILOT_HOOK(0.9.5,[],nofailure)
    else
        GNOME_PILOT_HOOK($1,[],nofailure)
    fi
])

b2bf8beb14a1cfae897789d2b6f38acf'>Update to latest released version. Update TLS/IPv6 patches to match.eik2004-01-313-9/+20 * Respect ${CC} flag.osa2003-12-311-1/+1 * Add the rc.conf pid-file specification line for startup.petef2003-12-211-0/+1 * - add CONFLICTSdinoex2003-10-141-0/+1 * Update to 2.0.16osa2003-10-023-10/+13 * Update postfix to latest release (mainly a Solaris bug workaround).osa2003-09-092-2/+2 * Update to 2.0.14 [1]osa2003-08-284-99/+99 * Fix plist at optional IPv6 configuration.kuriyama2003-08-172-1/+7 * Fix non-default dependency on openldap2[012] which is broken by splitting.kuriyama2003-08-151-3/+3 * One of the patch files for postfix was not PREFIX-clean. This makes iterwin2003-07-231-7/+7 * Included in this email is a patch to postfix which I need applied forerwin2003-07-101-1/+13 * Fix building with SASL2 case.osa2003-07-071-4/+1 * update mail/postfix: 2.0.12 --> 2.0.13daichi2003-07-023-17/+12 * Upgrade to 2.0.12.obraun2003-06-283-12/+12 * - Update postfix to 2.0.10 releasenaddy2003-06-023-4/+15 * * Upgrade to 2.0.9.obraun2003-05-133-21/+17 * update postfix to 2.0.7leeym2003-04-153-18/+34 * update postfix to 2.0.6leeym2003-03-113-4/+3 * Batch building of packages for postfix is failing due to PCRE issues.leeym2003-03-042-12/+19 * Spell `-ldes' as `-lcrypto'.nectar2003-03-031-3/+3 * Point dependencies on net/openldap to net/openldap12edwin2003-02-241-2/+2 * add PORTEPOCH=1, which was removed by maintainer in rev 1.67leeym2003-02-231-0/+1 * Add missing manpage.demon2003-02-231-2/+2 * update postfix to 2.0.4leeym2003-02-233-10/+9 * De-pkg-comment.knu2003-02-212-1/+1 * upgrade to version 2.0.2sada2003-01-195-19/+67 * Update to 2.0.0.2.petef2003-01-0917-115/+208 * Missed configure scripts in libpq version bump: chase lib version.seanc2003-01-051-2/+3 * upgrade to 1.1.12ijliao2003-01-0258-1074/+42 * Add hooks to preselect postfix optionsdwcjr2002-08-273-31/+47 * moving saslv1 includes files to make it easier to add saslv2ume2002-07-293-6/+6 * Update to 1.1.11dwcjr2002-06-205-10/+25 * Update to latestdwcjr2002-05-172-2/+2 * Update to 1.1.9dwcjr2002-05-153-12/+12 * Add PGSQL supportdwcjr2002-05-092-2/+13 * Add missing pkg-messagedwcjr2002-05-071-0/+24 * Update to 1.1.8dwcjr2002-05-074-26/+24 * handle batch buildsdwcjr2002-04-212-4/+4 * Update postfix to 1.1.7dwcjr2002-04-024-9/+20 * Add USE_SUBMAKE, where it might be necessary.sobomax2002-03-251-0/+2 * Update to 1.1.5dwcjr2002-03-194-6/+8 * Update postfix to 1.1.4dwcjr2002-02-273-6/+6 * Update to 1.1.3dwcjr2002-02-125-28/+40 * Add missing files to pkg-plistdwcjr2002-02-013-2/+18 * Update to 1.1.2 (yes they are finally using versions)dwcjr2002-01-3122-486/+411 * Use ${ECHO_CMD} instead of ${ECHO} where you mean the echo command;knu2002-01-291-9/+9 * Set context of diff for patch-aa to 2 lines to allow tls patchingdwcjr2002-01-181-51/+24 * Disable debugger by defaultnectar2002-01-151-19/+91 * Add header/body_check warnings commanddwcjr2001-11-272-0/+25 * Update to pl08 and tls to go with it.dwcjr2001-11-163-6/+6 * Update to pl07dwcjr2001-11-152-2/+2 * Update postfix to 20010228-pl06 and update tls to go with it.dwcjr2001-11-063-7/+6 * Fix path in patchdwcjr2001-10-111-1/+1 * Erase extra parts of install.cfdwcjr2001-09-241-4/+0 * Remove version tags from files that don't need it.dwcjr2001-09-242-2/+0 * Install install.cf to ensure spool is created with correct permissionsdwcjr2001-09-243-1/+18 * Update to pl05dwcjr2001-09-233-10/+9 * Fix path on main.cf in reference to prefixdwcjr2001-09-142-2/+2 * Correct the size of the dialog box so dialog(1) doesn't bug out and trashkris2001-08-201-2/+2 * Back out the db3 port update because some of these dependent ports hadknu2001-08-012-3/+3 * Reflect databases/db3's shlib version bump from 2 to 3.knu2001-07-252-2/+3 * Update to pl3 of postfixdwcjr2001-06-183-9/+9 * I'm taking over this port for Blaz since he can't dedicate time to itdwcjr2001-06-181-1/+1 * Update port to 20010228 pl02.kuriyama2001-05-214-30/+24 * update postfix to 20010228-pl01mharo2001-04-022-4/+3 * Revert previous commit.kuriyama2001-03-261-3/+3 * Link shared library for MySQL.kuriyama2001-03-241-3/+3 * Make spool directory at pkg-install.kuriyama2001-03-141-0/+1 * fix build options.sf2001-03-131-2/+2 * Disable IPv6 on Alpha, since this breaks it.alex2001-03-121-5/+20 * remove BROKEN for alpha, the unaligned access errors are a red herring.billf2001-03-111-4/+0 * Mark BROKEN for alpha: Unaligned access problems in postsuper and postlogalex2001-03-111-0/+4 * Fix the DB3 support. DB3's shlib version is now at 2.knu2001-03-061-2/+2 * use DIST_SUBDIR=postfix due to both release and snapshot don't havesf2001-03-052-3/+4 * update to NON BETA release, 20010228.sf2001-03-0549-354/+820 * Add -lz to be compiled with MySQL.kuriyama2001-02-171-1/+1 * add MASTER_SITE_RINGSERVER to MASTER_SITES.sf2001-02-061-1/+2 * Spaces->tabs in the mail category.olgeni2001-02-051-1/+1 * Switch from mysql322-{client,server} to mysql323-{client,server}.dirk2001-01-211-1/+1 * Unbreak use with rmail and bump PORTREVISION.dannyboy2000-12-233-40/+60 * Update to 19991231-pl13.dannyboy2000-12-234-4/+5 * Update to postfix 19991231-pl10. Install LDAP_README and MYSQL_README alongwill2000-11-1457-435/+1061 * Hand MAINTAINER to Blaz Zupan <blaz@amis.net>.will2000-11-081-1/+1 * Remove Torsten Blum by due effect of not being a maintainer - many reportswill2000-11-081-1/+1 * Change PKGDIR from pkg/ to . Also fix places where ${PKGDIR} isasami2000-10-081-2/+2 * Upgrade to 19991231pl8.vanilla2000-06-042-3/+3 * Upgrade the 19991231 release to patchlevel 07.obrien2000-06-022-3/+3 * If a user didn't have /usr/sbin in their path, this would have failed.billf2000-05-281-6/+6 * Standardize all user defined options to the booleans WITH_FOO andreg2000-04-171-2/+2 * Update to use PORTNAME/PORTVERSIONcpiazza2000-04-141-3/+3 * Ack, what was I thinking? it's not safe to assume the system sendmailpeter2000-04-031-2/+4 * Fix 'make replace' to correctly use mailer.confpeter2000-04-031-1/+10 * Upgrade to latest version, fix PR 16472, 16753, 17078 too.vanilla2000-04-034-6/+73 * Allow postfix to be built on FreeBSD-5.x (-CURRENT). These patchesjedgar2000-04-012-0/+21 * - Upgrade to Postfix 19991231pl04torstenb2000-02-144-56/+64 * Oops, forgot to change ALL_TARGET ;-(torstenb2000-01-291-2/+2 * - Upgrade to patchlevel 3torstenb2000-01-292-2/+19 * Upgrade to 19991231.vanilla2000-01-023-64/+31 * Upgrade the postfix port from 19990906-pl02 to 19990906-pl09.joe1999-12-311-1/+1 * Upgrade the postfix port from 19990906-pl02 to 19990906-pl09.joe1999-12-311-2/+2 * Strip the binariestorstenb1999-09-111-3/+3