1
# configure.in --- xdaliclock, Copyright (c) 1999 Jamie Zawinski.
4
AC_INIT(../numbers2/four2.xbm)
5
AC_CONFIG_HEADER(config.h)
7
echo "current directory: `pwd`"
8
echo "command line was: $0 $@"
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
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
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.
26
AC_CHECK_TOOL(CC, gcc)
28
if test "$ac_cv_prog_gcc" = yes; then
34
if test "$ac_cv_prog_cc_g" = yes; then
38
# Now make sure it's the right compiler.
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
46
AC_MSG_ERROR([$CC -dumpmachine failed. See config.log.])
47
elif test "$ac_real_target" != "$target" ; then
49
AC_MSG_ERROR([$CC is not the Palm Pilot cross compiler:
50
It generates code for \`$ac_real_target',
54
AC_MSG_RESULT([no idea -- compiler isn't gcc])
58
# Now check for the other tools we need to build Pilot programs.
60
AC_DEFUN(AC_CHECK_IMPORTANT_TOOL, [
61
AC_CHECK_TOOL([$1], [$2], [no], [$4])
62
if test "$[$1]" = "no"; then
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.])
70
AC_CHECK_IMPORTANT_TOOL(PILRC, pilrc)
71
AC_CHECK_IMPORTANT_TOOL(OBJRES, obj-res)
72
AC_CHECK_IMPORTANT_TOOL(BUILDPRC, build-prc)
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"
79
AC_MSG_RESULT(Turning on -O3 optimization.)
84
# random compiler setup
93
if test \! -z "$includedir" ; then
94
INCLUDES="$INCLUDES -I$includedir"
97
if test \! -z "$libdir" ; then
98
LDFLAGS="$LDFLAGS -L$libdir"
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)
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)
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)
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
137
# ifdef AppLaunchWithCommand
140
ac_cv_have_AppLaunchWithCommand=yes)
143
if test "$ac_cv_have_AppLaunchWithCommand" = yes ; then
144
AC_DEFINE(HAVE_APPLAUNCHWITHCOMMAND)
147
###############################################################################
151
AC_DEFINE_UNQUOTED(CREATOR_ID, '$CREATOR_ID')