/
configure.in
103 lines (64 loc) · 1.67 KB
/
configure.in
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
dnl $Id$
dnl
dnl Process this file with autoconf to produce a configure script.
AC_INIT(readiso.c)
AC_CONFIG_HEADER(config.h)
AC_CONFIG_AUX_DIR(aux)
AC_CANONICAL_HOST
HOST_TYPE=$host
AC_DEFINE_UNQUOTED(HOST_TYPE,"$host")
dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_MAKE_SET
dnl check if compiling for supported platform
case "$host" in
*-linux-*)
echo "You seem to be using Linux..."
type_target=linux
;;
*-sgi-irix*)
echo "You seem to be using Irix..."
type_target=irix
;;
*)
echo "You seem to be using unsupported os...$host"
echo "(feel free to add support for your OS :)"
exit 1
;;
esac
dnl Checks for libraries.
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(unistd.h getopt.h string.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(int)
dnl Checks for library functions.
AC_CHECK_FUNCS(getopt_long, break, [GNUGETOPT="getopt.o getopt1.o"])
AC_SUBST(GNUGETOPT)
if test $type_target = irix; then
AC_DEFINE(IRIX)
AC_DEFINE(DEFAULT_DEV,"/dev/scsi/sc0d4l0")
ARCHOBJS="scsi_irix.o"
AC_CHECK_LIB(ds, dsopen, ,[
echo "Cannot find libds (generic user mode SCSI driver lib)."
exit 1
])
AC_CHECK_HEADERS(dslib.h, ,[
echo "Cannot find <dslib.h> You need libds headers."
exit 1
])
LIBS="$LIBS -lfpe -laudio -lcdaudio -laudiofile"
fi
if test $type_target = linux; then
AC_DEFINE(LINUX)
AC_DEFINE(DEFAULT_DEV,"/dev/sg0")
ARCHOBJS="scsi_linux.o"
AC_CHECK_HEADERS(scsi/sg.h,,[
echo "Cannot find <scsi/sg.h> you need it."
exit 1
])
fi
AC_SUBST(ARCHOBJS)
AC_OUTPUT(Makefile)