--- layout: fc_discuss_archives title: Message 54 from Frama-C-discuss on February 2010 ---
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Frama-c-discuss] [PATCH 2/4] test == is a GNU extension, use =



The next three patches correct the use of a GNU extension to 'test'.

POSIX specifies that "=" means equality, not "==". With the next
three patches applied, the configure process runs without error on
FreeBSD (also tested on Debian Linux to ensure that this didn't
break anything).

index 8e2bf14..3cf5fec 100644
--- a/configure.in
+++ b/configure.in
@@ -221,14 +221,14 @@ OCAMLGRAPH_EXISTS=no
 
 AC_CHECK_FILE($OCAMLGRAPH_HOME,OCAMLGRAPH_EXISTS=yes)
 
-if test "$OCAMLGRAPH_EXISTS" == "no"; then
+if test "$OCAMLGRAPH_EXISTS" = "no"; then
    OCAMLGRAPH_TEST=$OCAMLLIB
    OCAMLGRAPH=
    AC_CHECK_FILE($OCAMLGRAPH_HOME/graph.$OBJ_SUFFIX,OCAMLGRAPH_EXISTS=yes)
 fi
 
 # Is the installed version compatible?
-if test "$OCAMLGRAPH_EXISTS" == "yes"; then
+if test "$OCAMLGRAPH_EXISTS" = "yes"; then
  test_ocamlgraph_version='print_string Graph.Version.version;;'
  echo $test_ocamlgraph_version > test_ocamlgraph.ml
  if ocamlc -o test_ocamlgraph $OCAMLGRAPH graph.cmo test_ocamlgraph.ml 2> /dev/null; then
@@ -248,7 +248,7 @@ fi
 
 #revert back to local version of ocamlgraph
 
-if test "$OCAMLGRAPH_EXISTS" == "no"; then
+if test "$OCAMLGRAPH_EXISTS" = "no"; then
    AC_MSG_NOTICE([Switching to local ocamlgraph])
    OCAMLGRAPH_LOCAL=ocamlgraph
    OCAMLGRAPH_HOME=
@@ -257,15 +257,15 @@ if test "$OCAMLGRAPH_EXISTS" == "no"; then
    OCAMLGRAPH="-I lib"
    AC_CHECK_FILE($OCAMLGRAPH_TEST,OCAMLGRAPH_EXISTS=yes)
 
-   if test "$OCAMLGRAPH_EXISTS" == "no"; then
+   if test "$OCAMLGRAPH_EXISTS" = "no"; then
     AC_CHECK_FILE(ocamlgraph.tar.gz,OCAMLGRAPH_EXISTS=yes)
-    if test "$OCAMLGRAPH_EXISTS" == "yes"; then
+    if test "$OCAMLGRAPH_EXISTS" = "yes"; then
          AC_MSG_NOTICE([Unarchiving ocamlgraph.tar.gz])
          tar zxf ocamlgraph.tar.gz
     fi
    else
     AC_CHECK_FILE(ocamlgraph.tar.gz,OCAMLGRAPH_TAR=yes)
-    if test "$OCAMLGRAPH_TAR" == "yes"; then
+    if test "$OCAMLGRAPH_TAR" = "yes"; then
      if test ocamlgraph.tar.gz -nt ocamlgraph; then
        rm -rf ocamlgraph
        AC_MSG_NOTICE([ocamlgraph updated])
@@ -274,7 +274,7 @@ if test "$OCAMLGRAPH_EXISTS" == "no"; then
     fi
    fi
 
-   if test "$OCAMLGRAPH_EXISTS" == "no"; then
+   if test "$OCAMLGRAPH_EXISTS" = "no"; then
       AC_MSG_ERROR(Cannot find $OCAMLGRAPH_LOCAL in current directory
       Please download the latest version from http://ocamlgraph.lri.fr/download
       Compile it in "ocamlgraph" then rerun ./configure)
-- 
1.6.5.3