807b74a1f4
- more --enable-gmp fixes to configure scripts
66 lines
2.2 KiB
Plaintext
66 lines
2.2 KiB
Plaintext
$OpenBSD: patch-nessus-libraries_libpeks_configure_in,v 1.3 2001/05/06 14:38:34 matt Exp $
|
|
--- nessus-libraries/libpeks/configure.in.orig Sat Dec 23 12:14:48 2000
|
|
+++ nessus-libraries/libpeks/configure.in Mon Apr 23 18:18:45 2001
|
|
@@ -39,6 +39,7 @@ AC_LANG_C
|
|
dnl Check for several programs
|
|
AM_PROG_LIBTOOL
|
|
AC_PROG_CC
|
|
+AC_PROG_CPP
|
|
|
|
# general options
|
|
# ---------------
|
|
@@ -88,7 +89,12 @@ AC_ARG_ENABLE(gmp,[ --enable-gmp[=/path
|
|
|
|
# can we use gmp as provided by the os ?
|
|
unset gmplink
|
|
-case $enable_gmp in ''|yes)
|
|
+case $enable_gmp in ''|yes|/*)
|
|
+ case $enable_gmp in /*)
|
|
+ save_CFLAGS="$CFLAGS"
|
|
+ CFLAGS="$CFLAGS -L$enable_gmp/lib"
|
|
+ ;;
|
|
+ esac
|
|
AC_CHECK_LIB(gmp,mp_set_memory_functions,gmplink=-lgmp,,$gmpldflags)
|
|
AC_CHECK_LIB(gmp2,mp_set_memory_functions,gmplink=-lgmp2,,$gmpldflags)
|
|
AC_CHECK_LIB(gmp3,mp_set_memory_functions,gmplink=-lgmp3,,$gmpldflags)
|
|
@@ -98,17 +104,31 @@ case $enable_gmp in ''|yes)
|
|
AC_CHECK_LIB(gmp2,__gmp_set_memory_functions,gmplink=-lgmp2,,$gmpldflags)
|
|
AC_CHECK_LIB(gmp3,__gmp_set_memory_functions,gmplink=-lgmp3,,$gmpldflags)
|
|
}
|
|
+ test -z "$gmplink" && {
|
|
+ case $enable_gmp in /*)
|
|
+ CFLAGS="$save_CFLAGS"
|
|
+ gmplink="-L$enable_gmp/lib $gmplink"
|
|
+ ;;
|
|
+ esac
|
|
+ }
|
|
if test -n "$gmplink" ; then
|
|
- # do we use gmp as provided by the os ?
|
|
- unset gmpinc
|
|
- test -d /usr/include/gmp3 && gmpinc="$gmpinc -I/usr/include/gmp3"
|
|
- test -d /usr/include/gmp2 && gmpinc="$gmpinc -I/usr/include/gmp2"
|
|
- test -d /usr/include/gmp && gmpinc="$gmpinc -I/usr/include/gmp"
|
|
+ case $enable_gmp in ''|yes)
|
|
+ # do we use gmp as provided by the os ?
|
|
+ unset gmpinc
|
|
+ test -d /usr/include/gmp3 && gmpinc="$gmpinc -I/usr/include/gmp3"
|
|
+ test -d /usr/include/gmp2 && gmpinc="$gmpinc -I/usr/include/gmp2"
|
|
+ test -d /usr/include/gmp && gmpinc="$gmpinc -I/usr/include/gmp"
|
|
+ ;;
|
|
+ /*)
|
|
+ # try to make --enable-gmp work as documented...
|
|
+ test -d $enable_gmp/include && gmpinc="-I$enable_gmp/include"
|
|
+ ;;
|
|
+ esac
|
|
fi
|
|
- save_CFLAGS="$CFLAGS"
|
|
- CFLAGS="$CFLAGS $gmpinc"
|
|
+ ac_cpp_SAVE="$ac_cpp"
|
|
+ ac_cpp="$ac_cpp $gmpinc"
|
|
AC_CHECK_HEADER(gmp.h,have_gmp_h=yes,unset have_gmp_h)
|
|
- CFLAGS="$save_CFLAGS"
|
|
+ ac_cpp="$ac_cpp_SAVE"
|
|
esac
|
|
|
|
# config options consistency checks
|