simplify brlapi selection
authorJuan Quintela <quintela@redhat.com>
Mon, 27 Jul 2009 14:13:18 +0000 (16:13 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 27 Jul 2009 19:09:23 +0000 (14:09 -0500)
Use same style that everythnig else

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Makefile
configure

index a53b63093548d9e1dbb0ee6fafaff9ffee9e94d8..ed9a08d6e9626c7463373e12cbf80f3f9f0f5b35 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -100,9 +100,7 @@ obj-y += qdev.o qdev-properties.o ssi.o
 
 obj-$(CONFIG_BRLAPI) += baum.o
 
-ifdef CONFIG_BRLAPI
-LIBS+=-lbrlapi
-endif
+LIBS+=$(BRLAPI_LIBS)
 
 obj-$(CONFIG_WIN32) += tap-win32.o
 obj-$(CONFIG_POSIX) += migration-exec.o
index 4760b47b53abb0b2858d06b7250fb5baf741fed7..73ee5d60b5b0bddea5db4a7a6e196d4990ba853c 100755 (executable)
--- a/configure
+++ b/configure
@@ -159,6 +159,7 @@ case "$cpu" in
     cpu="unknown"
   ;;
 esac
+brlapi="yes"
 gprof="no"
 debug_tcg="no"
 debug="no"
@@ -1084,16 +1085,17 @@ done
 ##########################################
 # BrlAPI probe
 
-if test -z "$brlapi" ; then
-    brlapi=no
-cat > $TMPC << EOF
+if test "$brlapi" = "yes" ; then
+  brlapi=no
+  brlapi_libs="-lbrlapi"
+  cat > $TMPC << EOF
 #include <brlapi.h>
 int main( void ) { return brlapi__openConnection (NULL, NULL, NULL); }
 EOF
-    if $cc ${ARCH_CFLAGS} -o $TMPE ${OS_CFLAGS} $TMPC -lbrlapi > /dev/null 2> /dev/null ; then
-           brlapi=yes
-    fi # brlapi compile test
-fi # -z $brlapi
+  if $cc ${ARCH_CFLAGS} -o $TMPE ${OS_CFLAGS} $TMPC $brlapi_libs > /dev/null 2> /dev/null ; then
+    brlapi=yes
+  fi
+fi
 
 ##########################################
 # curses probe
@@ -1678,7 +1680,7 @@ fi
 if test "$brlapi" = "yes" ; then
   echo "CONFIG_BRLAPI=y" >> $config_host_mak
   echo "#define CONFIG_BRLAPI 1" >> $config_host_h
-  echo "BRLAPI_LIBS=-lbrlapi" >> $config_host_mak
+  echo "BRLAPI_LIBS=$brlapi_libs" >> $config_host_mak
 fi
 if test "$bluez" = "yes" ; then
   echo "CONFIG_BLUEZ=y" >> $config_host_mak