add single instance mode
[uwplayer.git] / configure
index 0207ee5..274ba9b 100755 (executable)
--- a/configure
+++ b/configure
@@ -226,6 +226,34 @@ fi
 # DEPENDENCIES
 #
 
+dependency_xft()
+{
+    printf "checking for xft... "
+    # dependency xft 
+    while true
+    do
+        if [ -z "$PKG_CONFIG" ]; then
+               break
+        fi
+               $PKG_CONFIG xft
+        if [ $? -ne 0 ] ; then
+            break
+        fi
+        CFLAGS="$CFLAGS `$PKG_CONFIG --cflags xft`"
+        LDFLAGS="$LDFLAGS `$PKG_CONFIG --libs xft`"
+               $PKG_CONFIG fontconfig
+        if [ $? -ne 0 ] ; then
+            break
+        fi
+        CFLAGS="$CFLAGS `$PKG_CONFIG --cflags fontconfig`"
+        LDFLAGS="$LDFLAGS `$PKG_CONFIG --libs fontconfig`"
+               echo yes
+        return 0
+    done
+       
+       echo no
+       return 1
+}
 dependency_motif()
 {
     printf "checking for motif... "
@@ -329,6 +357,11 @@ if [ $? -ne 0 ]; then
        DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED motif "
        ERROR=1
 fi
+dependency_xft
+if [ $? -ne 0 ]; then
+       DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED xft "
+       ERROR=1
+fi
 
 # Features