#!/bin/sh
confopts=""
makeopts=""
archflags="-arch i386 -arch x86_64"
ldarchflags="-arch i386 -arch x86_64"
CC=/usr/bin/clang; export CC
CXX=/usr/bin/clang++; export CXX
while test $ opt="$1"
shift
case "$opt" in
--gcc)
CC=/usr/bin/gcc
CXX=/usr/bin/g++
;;
-l)
archflags=""
ldarchflags=""
;;
-*)
confopts="$confopts $opt"
;;
*)
makeopts="$makeopts $opt"
;;
esac
done
if test "x$makeopts" = x; then
makeopts="clean check"
fi
makeopts="-j`sysctl -n hw.activecpu` $makeopts"
echo cd cups
cd cups
echo autoconf -f
autoconf -f || exit 1
echo ./configure ... $confopts
./configure --enable-debug --enable-debug-guards --enable-debug-printfs \
--enable-unit-tests --enable-pie --with-pam-module=opendirectory \
--with-archflags="$archflags" \
--with-ldarchflags="$ldarchflags" \
--with-adminkey="system.print.admin" \
--with-operkey="system.print.operator" \
$confopts || exit 1
echo make $makeopts
make $makeopts