Commits

camlspotter committed 1d0a66c

update

  • Participants
  • Parent commits 61f13b0

Comments (0)

Files changed (2)

File Makefile.config

-OCAML_STDLIB=/usr/local/ocaml-3.12/lib/ocaml
-DBM_INCLUDES=
-DBM_LINK=-lgdbm_compat -lgdbm
-DBM_DEFINES=-DDBM_USES_GDBM_NDBM
+OCAML_STDLIB=/home/jun/.share/prefix/lib/ocaml
+DBM_INCLUDES=-I/app/vendor/gdbm/include
+DBM_LINK=-L/app/vendor/gdbm/lib -lgdbm_compat -lgdbm
+DBM_DEFINES=
 
 LIBDIR=/app/vendor/gdbm/lib
 
-hasgot() {
-  rm -f hasgot.c
-  (echo "#include <$2>"
-   echo 'int main() {'
-   echo '  (void) dbm_open("foo", 0, 0);'
-   echo '  return 0;'
-   echo '}') > hasgot.c
-  ${CC:-cc} -L$LIBDIR -I$1 -o hasgot.exe hasgot.c $3 $4
-  res=$?
-  rm -f hasgot.c hasgot.exe
-  return $res
-}
-
-dbm_include="not found"
-dbm_link="not found"
-dbm_defines=""
-
-for dir in /usr/include /usr/include/db1 /usr/include/gdbm /app/vendor/gdbm/include; do
-  if test -f $dir/ndbm.h; then
-    dbm_include=$dir
-    if hasgot $dir ndbm.h; then
-      dbm_link=""
-    elif hasgot $dir ndbm.h -lndbm; then
-      dbm_link="-L$LIBDIR -lndbm"
-    elif hasgot $dir ndbm.h -ldb1; then
-      dbm_link="-L$LIBDIR -ldb1"
-    elif hasgot $dir ndbm.h -lgdbm; then
-      dbm_link="-L$LIBDIR -lgdbm"
-    elif hasgot $dir ndbm.h -lgdbm_compat -lgdbm; then
-      dbm_link="-L$LIBDIR -lgdbm_compat -lgdbm"
-    fi
-    break
-  fi
-  if test -f $dir/gdbm-ndbm.h; then
-    dbm_include=$dir
-    dbm_defines="-DDBM_USES_GDBM_NDBM"
-    if hasgot $dir gdbm-ndbm.h -lgdbm_compat -lgdbm; then
-      dbm_link="-L$LIBDIR -lgdbm_compat -lgdbm"
-    fi
-    break
-  fi
-done
-if test "$dbm_include" = "not found" || test "$dbm_link" = "not found"; then
-  echo "NDBM not found, the \"camldbm\" library cannot be built."
-  exit 2
-fi
+dbm_include=/app/vendor/gdbm/include
+dbm_defines=
+dbm_link="-L/app/vendor/gdbm/lib -lgdbm_compat -lgdbm"
 
 echo "Configuration for the \"camldbm\" library:"
 echo "        headers found in ......... $dbm_include"
 echo "DBM_INCLUDES=$dbm_include" >> Makefile.config
 echo "DBM_LINK=$dbm_link" >> Makefile.config
 echo "DBM_DEFINES=$dbm_defines" >> Makefile.config
-