$NetBSD: patch-lpsolve55_ccc,v 1.2 2016/09/08 05:12:39 richard Exp $ recent versions of gcc are noisy unless main() is declared returning 'int' and isnan() needs a floating argument else NOISNAN is defined causing problems. --- lpsolve55/ccc.orig 2009-03-25 00:27:18.000000000 +0000 +++ lpsolve55/ccc @@ -18,7 +18,7 @@ mkdir bin bin/$PLATFORM >/dev/null 2>&1 echo '#include '>>/tmp/isnan.c echo '#include '>>/tmp/isnan.c echo '#include '>>/tmp/isnan.c -echo 'main(){isnan(0);}'>>/tmp/isnan.c +echo 'int main(){isnan(0.0);}'>>/tmp/isnan.c $c /tmp/isnan.c -o /tmp/isnan $math >/dev/null 2>&1 if [ $? = 0 ] then NOISNAN= @@ -44,7 +44,7 @@ ranlib bin/$PLATFORM/liblpsolve55.a if [ "$so" != "" ] then $c -fpic -s -c -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd -I. $opts $NOISNAN -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src - $c -shared -Wl,-Bsymbolic -Wl,-soname,liblpsolve55.so -o bin/$PLATFORM/liblpsolve55.so `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'` -lc -lm -ldl + $c -shared -Wl,-Bsymbolic -Wl,-soname,liblpsolve55.so -o bin/$PLATFORM/liblpsolve55.so `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'` -lc -lm $DL_LDADD fi rm *.o 2>/dev/null