~ubuntu-branches/ubuntu/jaunty/xdaliclock/jaunty

« back to all changes in this revision

Viewing changes to palm/configure.in

  • Committer: Bazaar Package Importer
  • Author(s): Aaron Lehmann
  • Date: 2001-10-08 12:18:39 UTC
  • Revision ID: james.westby@ubuntu.com-20011008121839-5bnuoyjpmaf0vgvs
Tags: upstream-2.18
ImportĀ upstreamĀ versionĀ 2.18

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# configure.in --- xdaliclock, Copyright (c) 1999 Jamie Zawinski.
 
2
#
 
3
 
 
4
AC_INIT(../numbers2/four2.xbm)
 
5
AC_CONFIG_HEADER(config.h)
 
6
 
 
7
echo "current directory: `pwd`"
 
8
echo "command line was: $0 $@"
 
9
 
 
10
# Default to building on "this" architecture targed for the Palm architecture.
 
11
# That way "./configure" does the right thing with no args (but you can still
 
12
# override it.)
 
13
#
 
14
if test "$target" = NONE ; then target=m68k-palmos-coff    ; fi
 
15
if test "$host"   = NONE ; then host=$target               ; fi
 
16
if test "$build"  = NONE ; then build=`sh ../config.guess` ; fi
 
17
 
 
18
AC_CANONICAL_HOST
 
19
 
 
20
 
 
21
# We can't use AC_PROG_CC here for two reasons: first, it searches for "gcc"
 
22
# in preference to "m68k-palmos-coff-gcc"; second, it calls "AC_PROG_CC_WORKS"
 
23
# which fails because it tries to link a program containing only "main()",
 
24
# while the Pilot cross-compiler wants "PilotMain()" instead.
 
25
#
 
26
AC_CHECK_TOOL(CC, gcc)
 
27
AC_PROG_CC_GNU
 
28
if test "$ac_cv_prog_gcc" = yes; then
 
29
  GCC=yes
 
30
else
 
31
  GCC=
 
32
fi
 
33
AC_PROG_CC_G
 
34
if test "$ac_cv_prog_cc_g" = yes; then
 
35
  CFLAGS="$CFLAGS -g"
 
36
fi
 
37
 
 
38
# Now make sure it's the right compiler.
 
39
#
 
40
AC_MSG_CHECKING([compiler's target architecture])
 
41
if test -n "$GCC"; then
 
42
  ac_real_target=`$CC -dumpmachine 2>&-`
 
43
  AC_MSG_RESULT([$ac_real_target])
 
44
  if test -z "$ac_real_target" ; then
 
45
    AC_MSG_RESULT()
 
46
    AC_MSG_ERROR([$CC -dumpmachine failed.  See config.log.])
 
47
  elif test "$ac_real_target" != "$target" ; then
 
48
    AC_MSG_RESULT()
 
49
    AC_MSG_ERROR([$CC is not the Palm Pilot cross compiler:
 
50
                  It generates code for \`$ac_real_target',
 
51
                  not for \`$target'.])
 
52
  fi
 
53
else
 
54
  AC_MSG_RESULT([no idea -- compiler isn't gcc])
 
55
fi
 
56
 
 
57
 
 
58
# Now check for the other tools we need to build Pilot programs.
 
59
#
 
60
AC_DEFUN(AC_CHECK_IMPORTANT_TOOL, [
 
61
  AC_CHECK_TOOL([$1], [$2], [no], [$4])
 
62
  if test "$[$1]" = "no"; then
 
63
    AC_MSG_RESULT()
 
64
    AC_MSG_ERROR([need [$2] to cross-compile Palm Pilot programs.
 
65
                  You don't appear to have a complete Pilot development
 
66
                  environment installed.])
 
67
  fi
 
68
 ])
 
69
 
 
70
AC_CHECK_IMPORTANT_TOOL(PILRC, pilrc)
 
71
AC_CHECK_IMPORTANT_TOOL(OBJRES, obj-res)
 
72
AC_CHECK_IMPORTANT_TOOL(BUILDPRC, build-prc)
 
73
 
 
74
 
 
75
if test -n "$GCC"; then
 
76
  AC_MSG_RESULT(Turning on gcc compiler warnings.)
 
77
  CC="$CC -Wall -Wstrict-prototypes -Wnested-externs -Wno-format"
 
78
 
 
79
  AC_MSG_RESULT(Turning on -O3 optimization.)
 
80
  CFLAGS="$CFLAGS -O3"
 
81
 
 
82
fi
 
83
 
 
84
# random compiler setup
 
85
AC_C_CONST
 
86
AC_C_INLINE
 
87
AC_PROG_CPP
 
88
 
 
89
# stuff for Makefiles
 
90
AC_PROG_INSTALL
 
91
AC_PROG_MAKE_SET
 
92
 
 
93
if test \! -z "$includedir" ; then 
 
94
  INCLUDES="$INCLUDES -I$includedir"
 
95
fi
 
96
 
 
97
if test \! -z "$libdir" ; then
 
98
  LDFLAGS="$LDFLAGS -L$libdir"
 
99
fi
 
100
 
 
101
 
 
102
AC_CACHE_CHECK([for SysTicksPerSecond],
 
103
               ac_cv_have_SysTicksPerSecond,
 
104
               [ac_cv_have_SysTicksPerSecond=no
 
105
                AC_EGREP_HEADER(SysTicksPerSecond, Pilot.h,
 
106
                                ac_cv_have_SysTicksPerSecond=yes)])
 
107
if test "$ac_cv_have_SysTicksPerSecond" = yes ; then
 
108
  AC_DEFINE(HAVE_SYSTICKSPERSECOND)
 
109
fi
 
110
 
 
111
AC_CACHE_CHECK([for ScrDisplayMode],
 
112
               ac_cv_have_ScrDisplayMode,
 
113
               [ac_cv_have_ScrDisplayMode=no
 
114
                AC_EGREP_HEADER(ScrDisplayMode, Pilot.h,
 
115
                                ac_cv_have_ScrDisplayMode=yes)])
 
116
if test "$ac_cv_have_ScrDisplayMode" = yes ; then
 
117
  AC_DEFINE(HAVE_SCRDISPLAYMODE)
 
118
fi
 
119
 
 
120
AC_CACHE_CHECK([for PrefSetAppPreferencesV10],
 
121
               ac_cv_have_PrefSetAppPreferencesV10,
 
122
               [ac_cv_have_PrefSetAppPreferencesV10=no
 
123
                AC_EGREP_HEADER(PrefSetAppPreferencesV10, Pilot.h,
 
124
                                ac_cv_have_PrefSetAppPreferencesV10=yes)])
 
125
if test "$ac_cv_have_PrefSetAppPreferencesV10" = yes ; then
 
126
  AC_DEFINE(HAVE_PREFSETAPPPREFERENCES_20)
 
127
fi
 
128
 
 
129
AC_CACHE_CHECK([for AppLaunchWithCommand],
 
130
               ac_cv_have_AppLaunchWithCommand,
 
131
               [ac_cv_have_AppLaunchWithCommand=no
 
132
                AC_EGREP_HEADER(AppLaunchWithCommand, Pilot.h,
 
133
                                ac_cv_have_AppLaunchWithCommand=yes)
 
134
                if test "$ac_cv_have_AppLaunchWithCommand" = no ; then
 
135
                  AC_EGREP_CPP(yes, [
 
136
#                               include <Pilot.h>
 
137
#                               ifdef AppLaunchWithCommand
 
138
                                  yes
 
139
#                               endif],
 
140
                                ac_cv_have_AppLaunchWithCommand=yes)
 
141
                fi
 
142
])
 
143
if test "$ac_cv_have_AppLaunchWithCommand" = yes ; then
 
144
  AC_DEFINE(HAVE_APPLAUNCHWITHCOMMAND)
 
145
fi
 
146
 
 
147
###############################################################################
 
148
 
 
149
CREATOR_ID=Dali
 
150
 
 
151
AC_DEFINE_UNQUOTED(CREATOR_ID, '$CREATOR_ID')
 
152
AC_SUBST(CREATOR_ID)
 
153
AC_SUBST(INCLUDES)
 
154
AC_OUTPUT(Makefile)