From 90355c78ed51e414427349172759b31696281a6f Mon Sep 17 00:00:00 2001 From: Henry Kroll III Date: Mon, 20 Dec 2010 05:55:54 -0800 Subject: [PATCH] configure: add --disable-rpath option (Fedora) --- Makefile | 4 ++++ configure | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/Makefile b/Makefile index e6367fc6..90ba1848 100644 --- a/Makefile +++ b/Makefile @@ -65,6 +65,10 @@ endif ifdef DISABLE_STATIC LIBTCC=libtcc.so.1.0 LINK_LIBTCC=-Wl,-rpath,"$(libdir)" +ifdef DISABLE_RPATH +CFLAGS+=-fPIC +LINK_LIBTCC=-ltcc +endif else LIBTCC=libtcc.a LINK_LIBTCC= diff --git a/configure b/configure index 0e45e49f..d91f2d0d 100755 --- a/configure +++ b/configure @@ -140,6 +140,8 @@ for opt do ;; --disable-static) disable_static="yes" ;; + --disable-rpath) disable_rpath="yes" + ;; --with-libgcc) use_libgcc="yes" ;; --with-selinux) have_selinux="yes" @@ -244,6 +246,7 @@ echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]" echo " --sysroot=PREFIX prepend PREFIX to library/include paths []" echo " --cc=CC use C compiler CC [$cc]" echo " --disable-static make libtcc.so instead of libtcc.a" +echo " --disable-rpath disable use of -rpath with the above" echo " --with-libgcc use /lib/libgcc_s.so.1 instead of libtcc.a" echo " --enable-mingw32 build windows version on linux with mingw32" echo " --enable-cygwin build windows version on windows with cygwin" @@ -397,6 +400,9 @@ fi if test "$disable_static" = "yes" ; then echo "DISABLE_STATIC=yes" >> config.mak fi +if test "$disable_rpath" = "yes" ; then + echo "DISABLE_RPATH=yes" >> config.mak +fi if test "$use_libgcc" = "yes" ; then echo "#define CONFIG_USE_LIBGCC" >> $TMPH echo "CONFIG_USE_LIBGCC=yes" >> config.mak -- 2.11.4.GIT