Skip to content

Commit

Permalink
U922-030 Remove autotools support for libclang.
Browse files Browse the repository at this point in the history
Change-Id: Iec549990ec229743ebaadd269ba7d670bd1d899c
  • Loading branch information
godunko committed Oct 20, 2021
1 parent 64306ae commit 2c6ba4d
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 110 deletions.
35 changes: 0 additions & 35 deletions acinclude.m4
Original file line number Diff line number Diff line change
Expand Up @@ -403,38 +403,3 @@ EOD`
AC_SUBST(PYGOBJECT_INCLUDE)
AC_SUBST(PYGOBJECT_LIB)
])


#############################################################
#
# Configure for libclang
#
#############################################################

AC_DEFUN([AM_PATH_LIBCLANG],
[
AC_MSG_CHECKING(for libclang)
CLANG_LIBS="-lclang"
AC_ARG_WITH(clang,
[AC_HELP_STRING(
[--with-clang=<path>],
[Specify the directory that contains the libclang libary])],
[CLANG_LIBS="-L$withval $CLANG_LIBS"])
AC_LANG_CONFTEST(
[AC_LANG_PROGRAM(
[],
[clang_getCursorSpelling(0)])])
_save_LIBS="$LIBS"
LIBS="$CLANG_LIBS $LIBS"
AC_LINK_IFELSE([],
[AC_MSG_RESULT(yes)],
[AC_MSG_ERROR([libclang not found (see --with-clang)])])
LIBS=$_save_LIBS
AC_SUBST(CLANG_LIBS)
])

68 changes: 0 additions & 68 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -645,8 +645,6 @@ TARGET
YEAR
GPS_DATE
GPS_VERSION
CLANG_LIBS_GPR
CLANG_LIBS
PYGOBJECT_INCLUDE_GPR
PYGOBJECT_LIB
PYGOBJECT_INCLUDE
Expand Down Expand Up @@ -765,7 +763,6 @@ enable_option_checking
with_gnatcoll
with_gtk
enable_pygobject
with_clang
'
ac_precious_vars='build_alias
host_alias
Expand Down Expand Up @@ -1413,8 +1410,6 @@ Optional Packages:
install
--with-gtk=version Specify the version of GTK to support (3.0 or 2.0)
--without-gtk Disable support for GTK
--with-clang=<path> Specify the directory that contains the libclang
libary
Some influential environment variables:
CC C compiler command
Expand Down Expand Up @@ -5229,69 +5224,6 @@ $as_echo "yes ($version)" >&6; }
######### detect libclang
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libclang" >&5
$as_echo_n "checking for libclang... " >&6; }
CLANG_LIBS="-lclang"
# Check whether --with-clang was given.
if test "${with_clang+set}" = set; then :
withval=$with_clang; CLANG_LIBS="-L$withval $CLANG_LIBS"
fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
clang_getCursorSpelling(0)
;
return 0;
}
_ACEOF
_save_LIBS="$LIBS"
LIBS="$CLANG_LIBS $LIBS"
if ac_fn_c_try_link "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
as_fn_error $? "libclang not found (see --with-clang)" "$LINENO" 5
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
LIBS=$_save_LIBS
value=$CLANG_LIBS
# Special handling on darwin for gcc 4.5 and 4.7
case "$build_os" in
*darwin*)
value=`echo $value | sed -e "s/-framework \([^ ]*\)/-Wl,-framework -Wl,\1/g"`
esac
output=CLANG_LIBS_GPR
result=""
for v in $value; do
if test "$result" != ""; then
result="$result, "
fi
result="$result\"$v\""
done
CLANG_LIBS_GPR=$result
######## GNU regex checking
ac_fn_c_check_func "$LINENO" "re_compile_pattern" "ac_cv_func_re_compile_pattern"
if test "x$ac_cv_func_re_compile_pattern" = xyes; then :
Expand Down
5 changes: 0 additions & 5 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,6 @@ AM_TO_GPR($PYTHON_LIBS $PYTHON_EXTRA_LIBS $PYTHON_EXTRA_LDFLAGS, PYTHON_SHARED_L
AM_PATH_PYGOBJECT
AM_TO_GPR($PYGOBJECT_INCLUDE, PYGOBJECT_INCLUDE_GPR)


######### detect libclang
AM_PATH_LIBCLANG
AM_TO_GPR($CLANG_LIBS, CLANG_LIBS_GPR)

######## GNU regex checking
AC_CHECK_FUNC(re_compile_pattern, AC_DEFINE(HAVE_GNU_REGEX))

Expand Down
3 changes: 1 addition & 2 deletions shared.gpr.in
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ project Shared is
for Switches ("Ada") use ("-E", "-shared");
end Binder;

Clang_Libs := (@CLANG_LIBS_GPR@);
Gtk_Cflags := (@GTK_GCC_FLAGS_GPR@);
Pygobject_Include := (@PYGOBJECT_INCLUDE_GPR@);
Python_cflags := (@PYTHON_CFLAGS_GPR@);
Expand All @@ -82,7 +81,7 @@ project Shared is
package Linker is
-- ??? missing hack to force libiconv first (working around
-- a faulty libiconv in macports)
for Switches ("Ada") use Clang_Libs & ("-lstdc++") & Python_shared_libs;
for Switches ("Ada") use Python_shared_libs;

case OS is
when "osx" =>
Expand Down

0 comments on commit 2c6ba4d

Please sign in to comment.