Add dhcpcd_encode which encodes raw data back into a safe string.
[dhcpcd-ui] / configure
index 5bc9220216089777520af8a4a39beafe79016a95..73a761f4b4ba582c629ea27443aad3b404368ad2 100755 (executable)
--- a/configure
+++ b/configure
@@ -303,6 +303,32 @@ if [ "$STRLCPY" = no ]; then
            >>$CONFIG_H
 fi
 
+if [ -z "$VIS" ]; then
+       printf "Testing for vis ... "
+       cat <<EOF >_vis.c
+#include <vis.h>
+
+int main(void) {
+       char s[10];
+       xxvis(s, 0, 0, 0);
+       return 0;
+}
+EOF
+       if $XCC _vis.c -o _vis 2>&3; then
+               VIS=yes
+       else
+               VIS=no
+       fi
+       echo "$VIS"
+       rm -f _vis.c _vis
+fi
+if [ "$VIS" = no ]; then
+       echo "VIS_SRC=          vis.c" >>$CONFIG_MK
+       echo "#define vis       dhcpcd_vis" >>$CONFIG_H
+else
+       echo "#define HAVE_VIS_H" >>$CONFIG_H
+fi
+
 if [ -z "$STRNUNVIS" ]; then
        printf "Testing for strnunvis ... "
        cat <<EOF >_strnunvis.c
@@ -332,9 +358,9 @@ EOF
 fi
 if [ "$STRNUNVIS" = no ]; then
        echo "UNVIS_SRC=        unvis.c" >>$CONFIG_MK
-       echo "#define strnunvis dhcpcd_strnunvis" >>$CONFIG_H
+       echo "#define strnunvis dhcpcd_strnunvis" >>$CONFIG_H
 else
-       echo "#define HAVE_VIS_H" >>$CONFIG_H
+       echo "#define HAVE_STRNUNVIS" >>$CONFIG_H
 fi
 
 if [ -z "$STRVERSCMP" ]; then