Pass correct flag to ocamlopt to take care of PIE systems.
[tatoo.git] / configure.in
index 297c4e5..0de71a1 100644 (file)
@@ -190,7 +190,7 @@ AC_ARG_ENABLE([profile],
               [PROFILE=no])
 
 if test "x$PROFILE" = "xyes"; then
-   OCAMLOPTFLAGS="$OCAMLOPTFLAGS -p"
+   OCAMLOPTFLAGS="$OCAMLOPTFLAGS -p -ccopt -no-pie"
    OCAMLC="$OCAMLFIND ocamlcp"
 fi
 
@@ -211,13 +211,14 @@ AC_ARG_ENABLE([inline],
               [INLINE=$enableval],
               [INLINE=100])
 
+OCAMLOPTFLAGS="$OCAMLOPTFLAGS -inline $INLINE"
 #unsafe
 AC_ARG_ENABLE([unsafe],
               [  --enable-unsafe         use unsafe array and string accesses],
               [UNSAFE=1],
               [UNSAFE=0])
 
-if test "x$UNSAFE" = "xyes"; then
+if test "x$UNSAFE" = "x1"; then
    CAMLP4FLAGS="$CAMLP4FLAGS -unsafe"
 fi
 
@@ -250,12 +251,10 @@ else
 AC_MSG_NOTICE([$REMAKE exists, not rebuilding])
 fi
 
-
-AC_SUBST(INLINE)
 AC_SUBST(OCAMLFLAGS)
 AC_SUBST(OCAMLCFLAGS)
 AC_SUBST(OCAMLOPTFLAGS)
 AC_SUBST(CAMLP4FLAGS)
-AC_CONFIG_FILES(Remakefile)
-AC_CONFIG_FILES(Makefile)
+AC_CONFIG_FILES(Makefile Remakefile)
+
 AC_OUTPUT