head	1.1;
access;
symbols;
locks; strict;
comment	@# @;


1.1
date	2013.02.10.09.39.36;	author svnexp;	state Exp;
branches;
next	;


desc
@@


1.1
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/311997
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@--- configure.orig
+++ configure
@@@@ -2014,12 +2014,10 @@@@
 #*---------------------------------------------------------------------*/
 # find out the C library for mpg123
 if [ "$mpg123 " = " " ]; then
-   mpg123libs=`$autoconf mpg123 --cflags="$cflags $mpg123cflags"` || exit 1;
+   mpg123libs=`$autoconf bgl-pkg-config --libs libmpg123`
+   mpg123cflags=`$autoconf bgl-pkg-config --cflags libmpg123`
 
-   if [ "$mpg123libs " = "no " -a "$mpg123cflags " = " " ]; then
-     mpg123cflags="-D_FILE_OFFSET_BITS=64"
-     mpg123libs=`$autoconf mpg123 --cflags="$cflags $mpg123cflags"` || exit 1;
-   fi
+   mpg123=`$autoconf mpg123 --cflags="$mpg123cflags" --libs="$mpg123libs"` || exit 1;
 fi
 
 #*---------------------------------------------------------------------*/
@@@@ -2027,7 +2025,10 @@@@
 #*---------------------------------------------------------------------*/
 # find out the C library for flac
 if [ "$flac " = " " ]; then
-   flaclibs=`$autoconf flac --cflags="$cflags"` || exit 1;
+   flaclibs=`$autoconf bgl-pkg-config --libs flac`
+   flaccflags=`$autoconf bgl-pkg-config --cflags flac`
+
+   flac=`$autoconf flac --cflags="$flaccflags" --libs="$flaclibs"` || exit 1;
 fi
 
 #*---------------------------------------------------------------------*/
@@@@ -2040,7 +2041,7 @@@@
 #*---------------------------------------------------------------------*/
 if [ "$regexp " = " " ]; then
   # find out the C library for pcre
-  pcrelibs=`$autoconf pcre --cflags="$cflags"` || exit 1;
+  pcrelibs=`$autoconf pcre --cflags="$cflags" --pcrelib="$pcrelib"` || exit 1;
 
   if [ "$pcrelibs " != "no " ]; then
     featureflags="-srfi enable-pcre $featureflags";
@@@@ -2226,7 +2227,7 @@@@
     featureflags="-srfi enable-gmp $featureflags";
     extralibs="-lbigloogmp-$release $extralibs"
   elif [ "$gmpversion " = " " ]; then
-    gmpversion=`$autoconf gmp` || exit 1
+    gmpversion=`$autoconf gmp --cflags="$cflags" --gmplib="$gmplib"` || exit 1
 
     if [ $gmpversion = "no" ]; then
       havegmp=0;
@@@@ -2359,8 +2360,8 @@@@
     fi
   fi
 
-  long_limbs=`$autoconf limbs --type="long" --cflags="-I$bootdir/lib/$release -L$bootdir/lib/$release"` || exit 1
-  longlong_limbs=`$autoconf limbs --type="$longlong" --cflags="-I$bootdir/lib/$release -L$bootdir/lib/$release"` || exit 1
+  long_limbs=`$autoconf limbs --type="long" --cflags="-I$bootdir/lib/$release -L$bootdir/lib/$release $cflags"` || exit 1
+  longlong_limbs=`$autoconf limbs --type="$longlong" --cflags="-I$bootdir/lib/$release -L$bootdir/lib/$release $cflags"` || exit 1
 
   long_sign_bit=`$autoconf signbit --type=long --alignment="$alignment"` || exit 1
   elong_sign_bit=`$autoconf signbit --type=long --alignment=0` || exit 1
@@@@ -3277,7 +3278,7 @@@@
   fi
 
   # MPG123
-  if [ "$mpg123libs " != "no " ]; then
+  if [ "$mpg123 " != "no " ]; then
     echo "MPG123=$mpg123" >> $makefile_cfg
     echo "MPG123LIBS=$mpg123libs" >> $makefile_cfg
     echo "MPG123CFLAGS=$mpg123cflags" >> $makefile_cfg
@@@@ -3302,13 +3303,14 @@@@
     apis=$napis;
     echo "MPG123=" >> $makefile_cfg
     echo "MPG123LIBS=" >> $makefile_cfg
-    echo "MPG123FLAGS=" >> $makefile_cfg
+    echo "MPG123CFLAGS=" >> $makefile_cfg
   fi
 
   # FLAC
-  if [ "$flaclibs " != "no " ]; then
+  if [ "$flac " != "no " ]; then
     echo "FLAC=$flac" >> $makefile_cfg
     echo "FLACLIBS=$flaclibs" >> $makefile_cfg
+    echo "FLACCFLAGS=$flaccflags" >> $makefile_cfg
 
     # Patch the code of the FLAC init file
     echo ";; automatically generated. Don't edit" >  api/flac/src/Misc/flac.init
@
