Skip to content
Permalink
Browse files

added -fPIC to allow using the generated static libraries from a dyna…

…mic one
  • Loading branch information...
nitslp-ri committed Sep 18, 2019
1 parent a737a24 commit 73c0fa6d15735921333346d4a52e8491d89c84a1
Showing with 74 additions and 2 deletions.
  1. +26 −0 libjulius/configure
  2. +10 −0 libjulius/configure.in
  3. +28 −2 libsent/configure
  4. +10 −0 libsent/configure.in
@@ -4492,6 +4492,32 @@ _ACEOF



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fPIC compiler option is accepted" >&5
$as_echo_n "checking whether fPIC compiler option is accepted... " >&6; }
xxxCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fPIC -Werror"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
return 0;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
CFLAGS="$xxxCFLAGS -fPIC"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
CFLAGS="$xxxCFLAGS"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

if test "$want_pthread" = yes; then
case "$host_os" in
freebsd*)
@@ -355,6 +355,16 @@ dnl AC_CHECK_FUNCS(strdup strstr)
dnl AC_CHECK_FUNC(gethostbyname,,AC_CHECK_LIB(nsl,gethostbyname))
dnl AC_CHECK_FUNC(connect,,AC_CHECK_LIB(socket, connect))

dnl Checks whether fPIC compiler option is accepted
AC_MSG_CHECKING(whether fPIC compiler option is accepted)
xxxCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fPIC -Werror"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [return 0;])],
[AC_MSG_RESULT(yes)
CFLAGS="$xxxCFLAGS -fPIC"],
[AC_MSG_RESULT(no)
CFLAGS="$xxxCFLAGS"])

dnl check for POSIX thread support
if test "$want_pthread" = yes; then
case "$host_os" in
@@ -3358,6 +3358,33 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fPIC compiler option is accepted" >&5
$as_echo_n "checking whether fPIC compiler option is accepted... " >&6; }
xxxCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fPIC -Werror"

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
return 0;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
CFLAGS="$xxxCFLAGS -fPIC"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
CFLAGS="$xxxCFLAGS"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

case "$host_cpu" in
arm*)
use_intel_simd=no
@@ -3373,8 +3400,7 @@ if test "$use_intel_simd" = yes; then
xxxxFMA=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIMD FMA instruction" >&5
$as_echo_n "checking for SIMD FMA instruction... " >&6; }

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <immintrin.h>
@@ -133,6 +133,16 @@ dnl Checks for compiler.
AC_PROG_CC
AC_PROG_CPP

dnl Checks whether fPIC compiler option is accepted
AC_MSG_CHECKING(whether fPIC compiler option is accepted)
xxxCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fPIC -Werror"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [return 0;])],
[AC_MSG_RESULT(yes)
CFLAGS="$xxxCFLAGS -fPIC"],
[AC_MSG_RESULT(no)
CFLAGS="$xxxCFLAGS"])

dnl Checks for SIMD capability
case "$host_cpu" in
arm*)

0 comments on commit 73c0fa6

Please sign in to comment.
You can’t perform that action at this time.