Skip to content
Snippets Groups Projects
Commit 8ceb8c00 authored by Virgile Prevosto's avatar Virgile Prevosto
Browse files

[configure] Allow compiling against lablgtk2 even if lablgtk3 is also installed

parent aaf056cd
No related branches found
No related tags found
No related merge requests found
......@@ -921,26 +921,41 @@ new_section "configure tools and libraries used by some plug-ins"
# lablgtk2
##########
define([ENABLE_LABLGTK3_HELP],
AC_HELP_STRING([--disable-lablgtk3],
[in case lablgtk2 and lablgtk3 are available, the default is to compile
against lablgtk3. Use this option to force compiling against lablgtk2]))
AC_ARG_ENABLE(
lablgtk3,[ENABLE_LABLGTK3_HELP],
[ENABLE_LABLGTK3=$enableval],[ENABLE_LABLGTK3=yes])
REQUIRE_LABLGTK="$REQUIRE_LABLGTK$REQUIRE_GNOMECANVAS"
USE_LABLGTK="$USE_LABLGTK$USE_GNOMECANVAS"
LABLGTK_PATH=`ocamlfind query lablgtk3 | tr -d '\\r\\n'`
if test "$LABLGTK_PATH" = ""; then
LABLGTK_VERSION=2
LABLGTK_PATH=`ocamlfind query lablgtk2 | tr -d '\\r\\n'`
if test "$LABLGTK_PATH" = "" -o "$LABLGTK_PATH" -ef "$OCAMLLIB/lablgtk2" ; then
LABLGTK_PATH=""
if test "$ENABLE_LABLGTK3" = "yes"; then
LABLGTK_PATH=`ocamlfind query lablgtk3 | tr -d '\\r\\n'`;
fi
if test "$LABLGTK_PATH" = ""; then
LABLGTK_VERSION=2
LABLGTK_PATH=`ocamlfind query lablgtk2 | tr -d '\\r\\n'`
if test "$LABLGTK_PATH" = "" -o \
"$LABLGTK_PATH" -ef "$OCAMLLIB/lablgtk2" ; then
echo "Ocamlfind -> using +lablgtk2.($LABLGTK_PATH,$OCAMLLIB/lablgtk2)"
LABLGTK_PATH=+lablgtk2
LABLGTKPATH_FOR_CONFIGURE=$OCAMLLIB/lablgtk2
else
else
echo "Ocamlfind -> using $LABLGTK_PATH"
LABLGTKPATH_FOR_CONFIGURE=$LABLGTK_PATH
fi;
else
LABLGTK_VERSION=3
echo "ocamlfind -> using $LABLGTK_PATH"
LABLGTKPATH_FOR_CONFIGURE=$LABLGTK_PATH;
fi
fi;
else
LABLGTK_VERSION=3
echo "ocamlfind -> using $LABLGTK_PATH"
LABLGTKPATH_FOR_CONFIGURE=$LABLGTK_PATH;
fi
configure_library([GTKSOURCEVIEW],
[$LABLGTKPATH_FOR_CONFIGURE/lablgtksourceview2.$LIB_SUFFIX,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment