forked from facebook/infer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: public For now, the script only checks that the ocaml dependencies are present. Reviewed By: meyering Differential Revision: D2702956 fb-gh-sync-id: 6945b63
- Loading branch information
Showing
7 changed files
with
480 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/sh | ||
|
||
# Copyright (c) 2015 - present Facebook, Inc. | ||
# All rights reserved. | ||
# | ||
# This source code is licensed under the BSD style license found in the | ||
# LICENSE file in the root directory of this source tree. An additional grant | ||
# of patent rights can be found in the PATENTS file in the same directory. | ||
|
||
set -e | ||
|
||
# try to pull submodules if we are in a git repo | ||
# might fail if git is not installed (how did you even checkout the | ||
# repo in the first place?) | ||
if test -d '.git'; then | ||
echo -n 'git repository detected, updating submodule... ' | ||
if git submodule update --init > /dev/null; then | ||
echo 'done' | ||
else | ||
echo 'error running git command' | ||
fi | ||
else | ||
echo 'no git repository detected; not updating facebook-clang-plugins/' | ||
fi | ||
|
||
ACINCLUDE="acinclude.m4" | ||
echo -n "generating $ACINCLUDE..." | ||
cat m4/*.m4 > "$ACINCLUDE" | ||
echo " done" | ||
|
||
echo -n "generating ./configure script..." | ||
autoreconf -fi | ||
echo " done" | ||
|
||
echo "" | ||
echo "you may now run the following commands to build Infer:" | ||
echo "" | ||
echo " ./configure" | ||
echo " make -C infer clang java" | ||
echo "" | ||
echo 'run `./configure --help` for more options' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
dnl autoconf script for Infer | ||
dnl run ./autogen.sh to generate a configure script | ||
dnl | ||
dnl Copyright (c) 2015 - present Facebook, Inc. | ||
dnl All rights reserved. | ||
dnl | ||
dnl This source code is licensed under the BSD style license found in the | ||
dnl LICENSE file in the root directory of this source tree. An additional grant | ||
dnl of patent rights can be found in the PATENTS file in the same directory. | ||
|
||
AC_PREREQ([2.63]) | ||
|
||
# TODO: use the stuff in infer/src/Makefile and version.ml.in instead | ||
# of 0.4.0 | ||
AC_INIT([Infer],[0.4.0],[https://github.com/facebook/infer/issues/]) | ||
|
||
AC_CONFIG_SRCDIR([infer/src/backend/sil.ml]) | ||
#AC_CONFIG_HEADERS([config.h]) | ||
|
||
# Checks for programs. | ||
AC_PROG_CXX | ||
AC_PROG_AWK | ||
AC_PROG_CC | ||
AC_PROG_CPP | ||
AC_PROG_LN_S | ||
AC_PROG_MAKE_SET | ||
AC_PROG_OBJC | ||
|
||
AC_PROG_OCAML | ||
AC_ASSERT_PROG([ocamlc], [$OCAMLC]) | ||
AC_ASSERT_PROG([ocamlopt], [$OCAMLOPT]) | ||
AC_ASSERT_PROG([ocamlbuild], [$OCAMLBUILD]) | ||
AC_PROG_FINDLIB | ||
AC_ASSERT_PROG([findlib], [$FINDLIB]) | ||
AC_PROG_OCAMLLEX | ||
AC_ASSERT_PROG([ocamllex], [$OCAMLLEX]) | ||
AC_PROG_OCAMLYACC | ||
AC_ASSERT_PROG([ocamlyacc], [$OCAMLYACC]) | ||
AC_ASSERT_OCAML_PKG([atdgen], [], [1.6.0]) | ||
AC_ASSERT_OCAML_PKG([extlib], [], [1.5.4]) | ||
AC_ASSERT_OCAML_PKG([javalib], [], [2.3.1]) | ||
AC_ASSERT_OCAML_PKG([sawja], [], [1.5.1]) | ||
AC_ASSERT_OCAML_PKG([biniou]) | ||
AC_ASSERT_OCAML_PKG([camlzip], [zip]) | ||
AC_ASSERT_OCAML_PKG([easy-format]) | ||
AC_ASSERT_OCAML_PKG([ptrees]) | ||
AC_ASSERT_OCAML_PKG([yojson]) | ||
|
||
# Checks for header files. | ||
AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h locale.h malloc.h stddef.h stdint.h stdlib.h string.h sys/mount.h sys/param.h sys/socket.h sys/statfs.h sys/time.h unistd.h wchar.h wctype.h]) | ||
|
||
AC_OUTPUT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
dnl Copyright (c) 2015 - present Facebook, Inc. | ||
dnl All rights reserved. | ||
dnl | ||
dnl This source code is licensed under the BSD style license found in the | ||
dnl LICENSE file in the root directory of this source tree. An additional grant | ||
dnl of patent rights can be found in the PATENTS file in the same directory. | ||
|
||
dnl AC_ASSERT_OCAML_PKG([pkg_name], [pkg_version]) | ||
dnl | ||
dnl fails if $pkg_name is not installed; also fails if it is not | ||
dnl installed at version $pkg_version if specified | ||
AC_DEFUN([AC_ASSERT_OCAML_PKG], | ||
[dnl | ||
AC_CHECK_OCAML_PKG_PATH([$1], [$2], [$3]) | ||
unset has_pkg | ||
unset pkg | ||
has_pkg=$AS_TR_SH[OCAML_PKG_$1] | ||
AS_IF([test "$has_pkg" = "no"], | ||
[dnl | ||
unset version | ||
unset version_msg | ||
version=".$3" | ||
AS_IF([test "x$3" = "x"], [version=""]) | ||
version_msg="" | ||
AS_IF([test "x$3" != "x"], [version_msg=" version $3"]) | ||
AC_MSG_ERROR([missing dependency: $1$version_msg. | ||
If you are using opam, please run | ||
opam install $1$version]) | ||
]) | ||
]) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
dnl Copyright (c) 2015 - present Facebook, Inc. | ||
dnl All rights reserved. | ||
dnl | ||
dnl This source code is licensed under the BSD style license found in the | ||
dnl LICENSE file in the root directory of this source tree. An additional grant | ||
dnl of patent rights can be found in the PATENTS file in the same directory. | ||
|
||
dnl AC_ASSERT_PROG([program_name], [test_variable]) | ||
dnl | ||
dnl fails if $test_variable is "no", which is taken to mean that | ||
dnl $program_name is not installed | ||
AC_DEFUN([AC_ASSERT_PROG], | ||
[dnl | ||
AS_IF([test "$2" = "no"], | ||
[dnl | ||
AC_MSG_ERROR([$1 not found.]) | ||
]) | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
dnl Copyright (c) 2015 - present Facebook, Inc. | ||
dnl All rights reserved. | ||
dnl | ||
dnl This source code is licensed under the BSD style license found in the | ||
dnl LICENSE file in the root directory of this source tree. An additional grant | ||
dnl of patent rights can be found in the PATENTS file in the same directory. | ||
|
||
dnl this adds the following features to AC_CHECK_OCAML_PKG: | ||
dnl - supports an optional version argument in $3 | ||
dnl - sets OCAML_PKG_PATH_$1 to be the path where the package is | ||
dnl installed | ||
AC_DEFUN([AC_CHECK_OCAML_PKG_PATH], | ||
[dnl | ||
AC_REQUIRE([AC_PROG_FINDLIB]) | ||
AC_CHECK_OCAML_PKG([$1], [$2]) | ||
unset version_msg | ||
version_msg="" | ||
AS_IF([test "x$3" != "x"], [version_msg=" version $3"]) | ||
AC_MSG_CHECKING([for OCaml findlib package $1$version_msg]) | ||
unset path | ||
unset pkg | ||
unset version | ||
pkg=$AS_TR_SH([OCAML_PKG_$1]) | ||
found=no | ||
if test "x$pkg" != "xno"; then | ||
path=`$OCAMLFIND query $pkg 2>/dev/null` | ||
version=`$OCAMLFIND query -format '%v' $pkg 2>/dev/null` | ||
if test "x$3" = "x" || test "x$version" = "x$3"; then | ||
AC_MSG_RESULT([$path]) | ||
AS_TR_SH([OCAML_PKG_$1])=$pkg | ||
AS_TR_SH([OCAML_PKG_PATH_$1])=$path | ||
found=yes | ||
fi | ||
fi | ||
if test "$found" = "no" ; then | ||
AC_MSG_RESULT([not found]) | ||
AS_TR_SH([OCAML_PKG_$1])=no | ||
fi | ||
AC_SUBST(AS_TR_SH([OCAML_PKG_$1])) | ||
AC_SUBST(AS_TR_SH([OCAML_PKG_PATH_$1])) | ||
]) |
Oops, something went wrong.