$NetBSD: patch-aa,v 1.7 2010/12/15 21:08:30 chuck Exp $ --- configure.in.orig 2006-08-16 20:02:25.000000000 +0200 +++ configure.in @@ -12,6 +12,25 @@ 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" + ;; +*-*-linux*) + EXTRA_OBJS="cooked_interface.o scsi_interface.o" + EXTRA_LIBS=-lrt + ;; +*-*-netbsd*) + EXTRA_OBJS=scsi_interface.o + EXTRA_LIBS= + ;; +*) + EXTRA_OBJS="cooked_interface.o scsi_interface.o" + EXTRA_LIBS= + ;; +esac + if test -z "$GCC"; then DEBUG="-g" OPT="-O" @@ -20,6 +39,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 +81,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)