#else
-#cd $ldir
-#gllibdir="`where_gl_libs`"
-#if [ "$gllibdir" != "" ] ; then
-# if [ -f ${gllibdir}/libGL.la ] ; then
-# libdir=`grep "libdir=" ${gllibdir}/libGL.la | sed -e "s%libdir='\(.*\)'%\1%"`
-# if [ "`ls $libdir/libGL.so* 2>/dev/null`" ] ; then
-# str_to_replace="${gllibdir}/libGL.la"
-# fi
-#fi
-# if [ "$str_to_replace" == "" ] ; then
-# str_to_replace="-L${gllibdir} -lGL"
-# fi
-
-is_debian40=0
-
-if [ -e /etc/issue ] ; then
- grep -e "Debian GNU/Linux 4.0" /etc/issue > /dev/null
- if [ $? == 0 ] ; then is_debian40=1 ; fi
-fi
-
- if test `uname -m` = "x86_64" ; then
- if [ $is_debian40 == 1 ] ; then
- libGLpath=/usr/lib/libGL.la
- else
- libGLpath=/usr/lib64/libGL.la
+cd $ldir
+gllibdir="`where_gl_libs`"
+if [ "$gllibdir" != "" ] ; then
+ if [ -f ${gllibdir}/libGL.la ] ; then
+ libdir=`grep "libdir=" ${gllibdir}/libGL.la | sed -e "s%libdir='\(.*\)'%\1%"`
+ if [ "`ls $libdir/libGL.so* 2>/dev/null`" ] ; then
+ str_to_replace="${gllibdir}/libGL.la"
fi
- else
- libGLpath=/usr/lib/libGL.la
+fi
+ if [ "$str_to_replace" == "" ] ; then
+ str_to_replace="-L${gllibdir} -lGL"
fi
- sed -e "s%$libGLpath%""%g" \
+
+ sed -e "s%-lGL\b%%g" \
+ -e "s%[^[:space:]]*libGL.la[[:space:]]%%g" \
+ -e "s%^dependency_libs='\(.*\)%dependency_libs='${str_to_replace} \1%" \
libTKOpenGl.la > libTKOpenGl.la.new
mv -f libTKOpenGl.la.new libTKOpenGl.la
-
-# sed -e "s%-lGL%%g" \
-# -e "s%[^[:space:]]*libGL.la[[:space:]]%%g" \
-# -e "s%^dependency_libs='\(.*\)%dependency_libs='${str_to_replace} \1%" \
-# libTKOpenGl.la > libTKOpenGl.la.new
-# mv -f libTKOpenGl.la.new libTKOpenGl.la
-#fi
+fi
#fi
# to generate environment script for sources