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
|
$NetBSD: patch-aa,v 1.5 2009/08/09 16:00:53 drochner Exp $
--- configure.in.orig 2006-08-16 20:02:25.000000000 +0200
+++ configure.in
@@ -12,6 +12,17 @@ AC_PROG_RANLIB
AC_CHECK_PROG(AR,ar,ar)
AC_CHECK_PROG(INSTALL,install,install)
+case $host in
+*-*-darwin*)
+ EXTRA_OBJS=osx_interface.o
+ EXTRA_LIBS=-framework CoreFoundation -framework IOKit
+ ;;
+*)
+ EXTRA_OBJS="cooked_interface.o scsi_interface.o"
+ EXTRA_LIBS=
+ ;;
+esac
+
if test -z "$GCC"; then
DEBUG="-g"
OPT="-O"
@@ -20,6 +31,12 @@ else
i?86-*-linux*)
DEBUG="-g -Wall -fsigned-char"
OPT="-O2 -ffast-math -fsigned-char -finline-functions";;
+ i?86-*-netbsd*)
+ DEBUG="-g -Wall -fsigned-char"
+ OPT="-O2 -ffast-math -fsigned-char -finline-functions";;
+ *-netbsd*)
+ DEBUG="-g -Wall"
+ OPT="-O";;
*)
DEBUG="-g -Wall -fsigned-char"
OPT="-O2 -fsigned-char";;
@@ -56,15 +73,27 @@ fi
AC_CHECK_HEADERS(linux/sbpcd.h, SBPCD_H="-DSBPCD_H='1' ")
AC_CHECK_HEADERS(linux/ucdrom.h, UCDROM_H="-DUCDROM_H='1' ")
+AC_CHECK_HEADERS(util.h,
+ AC_CHECK_LIB(util, getrawpartition,
+ RAWPART="-DHAVE_GETRAWPARTITION='1' " LIBUTIL="-lutil"
+ )
+)
+
+AC_CHECK_FUNCS(getopt_long, GETOPT_LONG="-DGETOPT_LONG='1' ")
AC_PROG_MAKE_SET
AC_C_CONST
AC_SUBST(SBPCD_H)
AC_SUBST(UCDROM_H)
+AC_SUBST(GETOPT_LONG)
+AC_SUBST(RAWPART)
AC_SUBST(TYPESIZES)
AC_SUBST(OPT)
AC_SUBST(DEBUG)
AC_SUBST(CC)
+AC_SUBST(LIBUTIL)
+AC_SUBST(EXTRA_OBJS)
+AC_SUBST(EXTRA_LIBS)
AC_OUTPUT(Makefile interface/Makefile paranoia/Makefile)
|