]> git.alsa-project.org Git - alsa-lib.git/commitdiff
configure: do allow to use --with-pic for static build
authorJaroslav Kysela <perex@perex.cz>
Mon, 21 Oct 2024 07:31:12 +0000 (09:31 +0200)
committerJaroslav Kysela <perex@perex.cz>
Mon, 21 Oct 2024 07:31:16 +0000 (09:31 +0200)
Closes: https://github.com/alsa-project/alsa-lib/issues/411
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
configure.ac

index b029a705f1e8e56c797063f4e117b57cccd7b881..e35265785b3320de2085a6ef0ad8a375fe8721f5 100644 (file)
@@ -71,6 +71,15 @@ EOF
   exit 1
 fi
 
+dnl Do not use --with-pic for shared libraries (consider to use PIE)
+if test "$enable_static" = "yes" -a "$pic_mode" = "yes"; then
+cat <<EOF
+  Please, do not enable PIC (--with-pic) for static library. Consider
+  to remove this option or use PIE flags.
+EOF
+  exit 1
+fi
+
 dnl ALSA configuration directory
 AC_ARG_WITH(configdir,
     AS_HELP_STRING([--with-configdir=dir],