Freeradius/Oracle compilation

Alexandre Chapellon alexandre.chapellon at mana.pf
Mon Dec 20 21:41:27 CET 2010


Alan when you have enough time, may you take a look at it?
And if ok merge it in trunk?

regards.

Le mardi 14 décembre 2010 à 23:30 -1000, alexandre.chapellon at mana.pf a
écrit :

> It works here, is indeed smarter and lighter.
> Hope it's ok.
> 
> --- /tmp/configure.in.orig	2010-12-14 23:24:40.019101002 -1000
> +++ /tmp/configure.in	2010-12-14 23:18:25.875101003 -1000
> @@ -86,32 +86,37 @@
>  		if test "x$oracle_lib_dir" != "x" ; then
>  			ORACLE_LIBDIR_SWITCH="-L${oracle_lib_dir} "
>  		fi
> -		LIBS="$old_LIBS $ORACLE_LIBDIR_SWITCH -lclntsh -lnnz10"
> -		AC_TRY_LINK([#include <oci.h>
> -	
> -				static OCIEnv           *p_env;
> -				static OCIError         *p_err;
> -				static OCISvcCtx        *p_svc;
> -				static OCIStmt          *p_sql;
> -				static OCIDefine        *p_dfn    = (OCIDefine *) 0;
> -				static OCIBind          *p_bnd    = (OCIBind *) 0;
> -			],
> -			[
> -				  int             p_bvi;
> -				  char            p_sli[20];
> -				  int             rc;
> -				  char            errbuf[100];
> -				  int             errcode;
> -				
> -				  rc = OCIInitialize((ub4) OCI_DEFAULT, (dvoid *)0,  /* Initialize OCI */
> -				          (dvoid * (*)(dvoid *, size_t)) 0,
> -				          (dvoid * (*)(dvoid *, dvoid *, size_t))0,
> -				          (void (*)(dvoid *, dvoid *)) 0 );
> -
> -			],
> -			ORACLE_LIBS="$ORACLE_LIBDIR_SWITCH -lclntsh -lnnz10",
> -			ORACLE_LIBS=
> -		)
> +		for oracle_version in 10 11 9 ""; do
> +			LIBS="$old_LIBS $ORACLE_LIBDIR_SWITCH -lclntsh -lnnz${oracle_version}"
> +			AC_TRY_LINK([#include <oci.h>
> +		
> +					static OCIEnv           *p_env;
> +					static OCIError         *p_err;
> +					static OCISvcCtx        *p_svc;
> +					static OCIStmt          *p_sql;
> +					static OCIDefine        *p_dfn    = (OCIDefine *) 0;
> +					static OCIBind          *p_bnd    = (OCIBind *) 0;
> +				],
> +				[
> +					  int             p_bvi;
> +					  char            p_sli[20];
> +					  int             rc;
> +					  char            errbuf[100];
> +					  int             errcode;
> +					
> +					  rc = OCIInitialize((ub4) OCI_DEFAULT, (dvoid *)0,  /* Initialize OCI */
> +							  (dvoid * (*)(dvoid *, size_t)) 0,
> +							  (dvoid * (*)(dvoid *, dvoid *, size_t))0,
> +							  (void (*)(dvoid *, dvoid *)) 0 );
> +
> +				],
> +				ORACLE_LIBS="$ORACLE_LIBDIR_SWITCH -lclntsh -lnnz${oracle_version}",
> +				ORACLE_LIBS=
> +			)
> +			if test "x$ORACLE_LIBS" != "x"; then
> +				break
> +			fi
> +		done
>  
>  		LIBS="$old_LIBS"
>  		CFLAGS="$old_CFLAGS"
> @@ -129,7 +134,7 @@
>  
>  		if test "x$ORACLE_LIBS" = "x"; then
>  			AC_MSG_WARN([oracle libraries not found.  Use --with-oracle-lib-dir=<path>.])
> -			fail="$fail libclntsh libnnz10"
> +			fail="$fail libclntsh libnnz${oracle_version}"
>  		else
>  			sql_oracle_ldflags="${sql_oracle_ldflags} $ORACLE_LIBS"
>  			AC_MSG_RESULT(yes)
> 
> ---- Message original----
> >Date: Wed, 15 Dec 2010 07:54:38 +0100
> >From: freeradius-users-bounces+alexandre.chapellon=mana.pf at lists.freeradius.org (on behalf of Alan DeKok <aland at deployingradius.com>)
> >Subject: Re: Freeradius/Oracle compilation  
> >To: FreeRadius users mailing list <freeradius-users at lists.freeradius.org>
> >
> >Alexandre Chapellon wrote:
> >> Hello I didn't have even a comment about this.
> >> Is there something stupid in the proposed patch?
> >
> >  I've been busy.  Off of the top of my head:
> >
> >- requiring a new option to configure isn't friendly.
> >
> >- the whole *point* of configure is to have the computer "just figure it
> >out"
> >
> >- leave the old code there, it works for many people
> >
> >- add *new* code, which is run only if the old code doesn't find
> >  the libraries
> >
> >- don't force the user to choose an oracle version.
> >
> >- you can write a "for" loop which loops over the different versions,
> >and stops when the check is successful
> >-
> >List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


-- 
Follow us on: twitter https://www.twitter.com/manainternet
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20101220/ff2c1e85/attachment.html>


More information about the Freeradius-Users mailing list