~ubuntu-branches/ubuntu/trusty/photopc/trusty

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Bazaar Package Importer
  • Author(s): John Goerzen
  • Date: 2000-09-04 12:34:52 UTC
  • Revision ID: james.westby@ubuntu.com-20000904123452-8kkxsbtmm1opsnlw
Tags: upstream-3.04
ImportĀ upstreamĀ versionĀ 3.04

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl Process this file with autoconf to produce a configure script.
 
2
AC_REVISION([$Id: configure.in,v 1.16 2000/02/17 21:29:54 crosser Exp $])dnl
 
3
 
 
4
dnl $Log: configure.in,v $
 
5
dnl Revision 1.16  2000/02/17 21:29:54  crosser
 
6
dnl final cleanup for 3.04, change version
 
7
dnl change debugging levels
 
8
dnl
 
9
dnl Revision 1.15  2000/02/01 22:04:15  crosser
 
10
dnl xchdir() function iterates thru path elements
 
11
dnl define DEVVERSION for extra verbosity
 
12
dnl
 
13
dnl Revision 1.14  2000/01/23 15:51:01  crosser
 
14
dnl work in progress on folder tree support
 
15
dnl
 
16
dnl Revision 1.13  1999/12/26 13:59:45  crosser
 
17
dnl sort frame list for erase command; new version 3.03
 
18
dnl
 
19
dnl Revision 1.12  1999/12/11 14:10:15  crosser
 
20
dnl Support sgtty terminal control
 
21
dnl Proper "fake speed" handling (needed two values)
 
22
dnl
 
23
dnl Revision 1.11  1999/12/01 21:41:23  crosser
 
24
dnl add "pseudo" speed
 
25
dnl
 
26
dnl Revision 1.10  1999/11/29 05:39:11  crosser
 
27
dnl make release 3.02
 
28
dnl
 
29
dnl Revision 1.9  1999/11/17 13:48:08  crosser
 
30
dnl check if need to include getopt.h
 
31
dnl
 
32
dnl Revision 1.8  1999/11/09 18:55:03  crosser
 
33
dnl work on windows version
 
34
dnl
 
35
dnl Revision 1.7  1999/09/19 12:33:11  crosser
 
36
dnl Mention comlite32 in the README
 
37
dnl
 
38
dnl Revision 1.6  1999/08/14 09:00:33  crosser
 
39
dnl Create version.h's in dos and win23 directories
 
40
dnl
 
41
dnl Revision 1.5  1999/08/01 23:28:06  crosser
 
42
dnl multiple enhancements
 
43
dnl
 
44
dnl Revision 1.4  1999/03/12 23:22:30  crosser
 
45
dnl check utime and timezone things
 
46
dnl
 
47
dnl Revision 1.3  1999/03/12 10:06:23  crosser
 
48
dnl fix bad checks
 
49
dnl
 
50
dnl Revision 1.2  1999/03/10 22:34:43  crosser
 
51
dnl check rename func
 
52
dnl
 
53
dnl Revision 1.1  1999/03/06 13:16:06  crosser
 
54
dnl Initial revision
 
55
dnl
 
56
 
 
57
AC_INIT(eph_iob.c)
 
58
AM_INIT_AUTOMAKE(photopc, 3.04)
 
59
AM_CONFIG_HEADER(config.h dos/version.h win32/version.h)
 
60
 
 
61
dnl Checks for programs.
 
62
AC_LANG_C
 
63
AC_PROG_CC
 
64
if test "X$ac_cv_prog_gcc" = "Xyes"; then
 
65
        CFLAGS="$CFLAGS -Wall"
 
66
fi
 
67
AM_C_PROTOTYPES
 
68
AC_PROG_MAKE_SET
 
69
AC_SUBST(PROGS)dnl
 
70
AC_PATH_PROG(ECHO, echo, echo)dnl
 
71
AC_PATH_PROG(LN, ln, ln)dnl
 
72
AC_PATH_PROG(MV, mv, mv)dnl
 
73
AC_PATH_PROG(RM, rm, rm)dnl
 
74
AC_SUBST(LIBPROGS)dnl
 
75
AC_PROG_INSTALL
 
76
AC_PROG_RANLIB
 
77
AC_PATH_PROG(AR, ar, ar)dnl
 
78
AC_PROG_LN_S
 
79
 
 
80
dnl Checks for header files.
 
81
AC_HEADER_STDC
 
82
AC_CHECK_HEADERS(fcntl.h sys/time.h sys/select.h unistd.h sched.h)
 
83
AC_CHECK_HEADERS(termios.h termio.h sgtty.h utime.h sys/utime.h)
 
84
 
 
85
AC_ARG_ENABLE(termios,
 
86
        [  --disable-termios       do not use POSIX terminal control])
 
87
if test X$enable_termios != Xno && test X$ac_cv_header_termios_h = Xyes; then
 
88
        AC_DEFINE(USE_TERMIOS)
 
89
elif test X$ac_cv_header_sgtty_h = Xyes; then
 
90
        AC_DEFINE(USE_SGTTY)
 
91
elif test X$ac_cv_header_termio_h = Xyes; then
 
92
        AC_DEFINE(USE_TERMIO)
 
93
else
 
94
        AC_MSG_ERROR([No usable terminal control (neither of termios/sgtty/termio)])
 
95
fi
 
96
 
 
97
dnl Checks for typedefs, structures, and compiler characteristics.
 
98
AC_C_CONST
 
99
AC_TYPE_OFF_T
 
100
AC_TYPE_SIZE_T
 
101
AC_HEADER_TIME
 
102
AC_STRUCT_TM
 
103
 
 
104
AC_MSG_CHECKING([whether struct tm has tm_gmtoff])
 
105
AC_CACHE_VAL(ac_cv_tm_gmtoff, [AC_TRY_COMPILE([
 
106
#if TIME_WITH_SYS_TIME
 
107
# include <sys/time.h>
 
108
# include <time.h>
 
109
#else
 
110
# if HAVE_SYS_TIME_H
 
111
#  include <sys/time.h>
 
112
# else
 
113
#  include <time.h>
 
114
# endif
 
115
#endif
 
116
], [
 
117
struct tm stm;
 
118
stm.tm_gmtoff=0;
 
119
], ac_cv_tm_gmtoff=yes, ac_cv_tm_gmtoff=no)])dnl
 
120
AC_MSG_RESULT($ac_cv_tm_gmtoff)
 
121
if test X$ac_cv_tm_gmtoff = Xyes; then
 
122
        AC_DEFINE(HAVE_TM_GMTOFF)
 
123
fi
 
124
 
 
125
 
 
126
AC_MSG_CHECKING([whether struct utimbuf is defined])
 
127
AC_CACHE_VAL(ac_cv_have_utimbuf, [AC_TRY_COMPILE([
 
128
#if TIME_WITH_SYS_TIME
 
129
# include <sys/time.h>
 
130
# include <time.h>
 
131
#else
 
132
# if HAVE_SYS_TIME_H
 
133
#  include <sys/time.h>
 
134
# else
 
135
#  include <time.h>
 
136
# endif
 
137
#endif
 
138
#ifdef HAVE_UTIME_H
 
139
# include <utime.h>
 
140
#else
 
141
# ifdef HAVE_SYS_UTIME_H
 
142
#  include <sys/utime.h>
 
143
# endif
 
144
#endif
 
145
], [
 
146
struct utimbuf utb;
 
147
utb.actime=0;
 
148
], ac_cv_have_utimbuf=yes, ac_cv_have_utimbuf=no)])dnl
 
149
AC_MSG_RESULT($ac_cv_have_utimbuf)
 
150
if test X$ac_cv_have_utimbuf = Xyes; then
 
151
        AC_DEFINE(HAVE_UTIMBUF)
 
152
fi
 
153
 
 
154
AC_MSG_CHECKING([whether optarg is defined in headers])
 
155
AC_CACHE_VAL(ac_cv_optarg_defined, [AC_TRY_COMPILE([
 
156
#include <sys/types.h>
 
157
#ifdef STDC_HEADERS
 
158
#include <stdlib.h>
 
159
#endif
 
160
#ifdef HAVE_UNISTD_H
 
161
#include <unistd.h>
 
162
#endif
 
163
], [
 
164
char *xxx;
 
165
xxx=optarg;
 
166
], ac_cv_optarg_defined=yes, ac_cv_optarg_defined=no)])dnl
 
167
AC_MSG_RESULT($ac_cv_optarg_defined)
 
168
if test X$ac_cv_optarg_defined = Xyes; then
 
169
        AC_DEFINE(OPTARG_DEFINED)
 
170
fi
 
171
 
 
172
AC_CHECK_SIZEOF(short,2)
 
173
AC_CHECK_SIZEOF(int,4)
 
174
AC_CHECK_SIZEOF(long,4)
 
175
 
 
176
dnl define INT16 and INT32
 
177
AC_ARG_WITH(int16, [  --with-int16=TYPE       integer type that is 16 bits (autodetect)],
 
178
        use_int16=1)
 
179
if test "X$with_int16" != "Xno" && test "X$with_int16" != "Xyes" && test "X$with_int16" != "X"; then
 
180
        INT16=$with_int16
 
181
else
 
182
        if test "X$ac_cv_sizeof_short" = "X2"; then
 
183
                INT16=short
 
184
        else
 
185
                if test "X$ac_cv_sizeof_int" = "X2"; then
 
186
                        INT16=int
 
187
                fi
 
188
        fi
 
189
fi
 
190
AC_ARG_WITH(int32, [  --with-int32=TYPE       integer type that is 32 bits (autodetect)],
 
191
        use_int32=1)
 
192
if test "X$with_int32" != "Xno" && test "X$with_int32" != "Xyes" && test "X$with_int32" != "X"; then
 
193
        INT32=$with_int32
 
194
else
 
195
        if test "X$ac_cv_sizeof_long" = "X4"; then
 
196
                INT32=long
 
197
        else
 
198
                if test "X$ac_cv_sizeof_int" = "X4"; then
 
199
                        INT32=int
 
200
                fi
 
201
        fi
 
202
fi
 
203
: ${INT16=unknown}
 
204
: ${INT32=unknown}
 
205
AC_SUBST(INT16)dnl
 
206
AC_SUBST(INT32)dnl
 
207
AC_DEFINE_UNQUOTED(INT16,$INT16)dnl
 
208
AC_DEFINE_UNQUOTED(INT32,$INT32)dnl
 
209
 
 
210
dnl Define LOWMEMORY model
 
211
AC_ARG_WITH(lomemory, [  --with-lowmemory        Build lowmemory model],
 
212
        AC_DEFINE(LOWMEMORY))
 
213
 
 
214
dnl Use RT priority (default yes)
 
215
AC_ARG_WITH(rtprio, [  --without-rtprio        Do not use realtime priority])
 
216
if test "X$with_rtprio" = "X"; then
 
217
        with_rtprio="yes"
 
218
fi
 
219
if test "X$with_rtprio" = "Xyes"; then
 
220
        AC_DEFINE(USE_RTPRIO)
 
221
fi
 
222
 
 
223
dnl Checks for library functions.
 
224
AC_CHECK_FUNCS(rename mkdir select strerror strspn)
 
225
AC_CHECK_FUNCS(uname cfmakeraw sched_setscheduler nanosleep)
 
226
AC_FUNC_VPRINTF
 
227
AC_FUNC_STRFTIME
 
228
AC_REPLACE_FUNCS(usleep getopt)
 
229
AC_CHECK_FUNC(strcasecmp, [], [LIBOBJS="$LIBOBJS strcscmp.o"])
 
230
 
 
231
dnl this sould be done after determining the target system type...
 
232
AC_DEFINE(UNIX)
 
233
 
 
234
dnl check if all necessary functions are detected
 
235
if test $ac_cv_header_termios_h != yes; then
 
236
        AC_MSG_ERROR([Cannot work without termios!])
 
237
fi
 
238
if test $ac_cv_func_select != yes; then
 
239
        AC_MSG_ERROR([Cannot work without select() function!])
 
240
fi
 
241
if test $ac_cv_func_vprintf != yes; then
 
242
        AC_MSG_ERROR([Cannot work without v*printf() functions!])
 
243
fi
 
244
if test $INT16 = unknown; then
 
245
        AC_MSG_ERROR([Cannot determine 16bit integer type!])
 
246
fi
 
247
if test $INT32 = unknown; then
 
248
        AC_MSG_ERROR([Cannot determine 32bit integer type!])
 
249
fi
 
250
 
 
251
case $VERSION in
 
252
*dev)
 
253
        AC_DEFINE(DEVVERSION);;
 
254
esac
 
255
 
 
256
# This is necessary so that .o files in LIBOBJS are also built via
 
257
# the ANSI2KNR-filtering rules.
 
258
LIBOBJS=`echo $LIBOBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'`
 
259
 
 
260
if test "X$with_rtprio" = "Xyes"; then
 
261
        AC_MSG_RESULT([***])
 
262
        AC_MSG_RESULT([*** "photopc" program must be setuid root to use realtime priority])
 
263
        AC_MSG_RESULT([***])
 
264
fi
 
265
 
 
266
AC_OUTPUT(Makefile)