Commit eb82284f180196f911fd70ebf0cddfbfdf5af3e3

Authored by Juan Quintela
Committed by Anthony Liguori
1 parent e0b7a42b

simplify brlapi selection

Use same style that everythnig else

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Showing 2 changed files with 11 additions and 11 deletions
Makefile
@@ -100,9 +100,7 @@ obj-y += qdev.o qdev-properties.o ssi.o @@ -100,9 +100,7 @@ obj-y += qdev.o qdev-properties.o ssi.o
100 100
101 obj-$(CONFIG_BRLAPI) += baum.o 101 obj-$(CONFIG_BRLAPI) += baum.o
102 102
103 -ifdef CONFIG_BRLAPI  
104 -LIBS+=-lbrlapi  
105 -endif 103 +LIBS+=$(BRLAPI_LIBS)
106 104
107 obj-$(CONFIG_WIN32) += tap-win32.o 105 obj-$(CONFIG_WIN32) += tap-win32.o
108 obj-$(CONFIG_POSIX) += migration-exec.o 106 obj-$(CONFIG_POSIX) += migration-exec.o
configure
@@ -159,6 +159,7 @@ case &quot;$cpu&quot; in @@ -159,6 +159,7 @@ case &quot;$cpu&quot; in
159 cpu="unknown" 159 cpu="unknown"
160 ;; 160 ;;
161 esac 161 esac
  162 +brlapi="yes"
162 gprof="no" 163 gprof="no"
163 debug_tcg="no" 164 debug_tcg="no"
164 debug="no" 165 debug="no"
@@ -1084,16 +1085,17 @@ done @@ -1084,16 +1085,17 @@ done
1084 ########################################## 1085 ##########################################
1085 # BrlAPI probe 1086 # BrlAPI probe
1086 1087
1087 -if test -z "$brlapi" ; then  
1088 - brlapi=no  
1089 -cat > $TMPC << EOF 1088 +if test "$brlapi" = "yes" ; then
  1089 + brlapi=no
  1090 + brlapi_libs="-lbrlapi"
  1091 + cat > $TMPC << EOF
1090 #include <brlapi.h> 1092 #include <brlapi.h>
1091 int main( void ) { return brlapi__openConnection (NULL, NULL, NULL); } 1093 int main( void ) { return brlapi__openConnection (NULL, NULL, NULL); }
1092 EOF 1094 EOF
1093 - if $cc ${ARCH_CFLAGS} -o $TMPE ${OS_CFLAGS} $TMPC -lbrlapi > /dev/null 2> /dev/null ; then  
1094 - brlapi=yes  
1095 - fi # brlapi compile test  
1096 -fi # -z $brlapi 1095 + if $cc ${ARCH_CFLAGS} -o $TMPE ${OS_CFLAGS} $TMPC $brlapi_libs > /dev/null 2> /dev/null ; then
  1096 + brlapi=yes
  1097 + fi
  1098 +fi
1097 1099
1098 ########################################## 1100 ##########################################
1099 # curses probe 1101 # curses probe
@@ -1678,7 +1680,7 @@ fi @@ -1678,7 +1680,7 @@ fi
1678 if test "$brlapi" = "yes" ; then 1680 if test "$brlapi" = "yes" ; then
1679 echo "CONFIG_BRLAPI=y" >> $config_host_mak 1681 echo "CONFIG_BRLAPI=y" >> $config_host_mak
1680 echo "#define CONFIG_BRLAPI 1" >> $config_host_h 1682 echo "#define CONFIG_BRLAPI 1" >> $config_host_h
1681 - echo "BRLAPI_LIBS=-lbrlapi" >> $config_host_mak 1683 + echo "BRLAPI_LIBS=$brlapi_libs" >> $config_host_mak
1682 fi 1684 fi
1683 if test "$bluez" = "yes" ; then 1685 if test "$bluez" = "yes" ; then
1684 echo "CONFIG_BLUEZ=y" >> $config_host_mak 1686 echo "CONFIG_BLUEZ=y" >> $config_host_mak