Commit 0d8b1e56acaa451af797a40c4ef83759a0e5cdd3

Authored by Perry Werneck
1 parent caa09a24

Using PIE instead of pic.

Showing 1 changed file with 11 additions and 8 deletions   Show diff stats
configure.ac
... ... @@ -205,19 +205,22 @@ AC_SUBST(GTK_CFLAGS)
205 205 AC_SUBST(GTK_MODVERSION,`$PKG_CONFIG --modversion gtk+-3.0`)
206 206  
207 207 dnl ---------------------------------------------------------------------------
208   -dnl Check for pic
  208 +dnl Check for pie
209 209 dnl ---------------------------------------------------------------------------
210   -AC_ARG_ENABLE([pic],
211   - [AS_HELP_STRING([--disable-pic], [disable support for PIC libraries (required to compile on 64bits)])],
  210 +AC_ARG_ENABLE([pie],
  211 + [AS_HELP_STRING([--disable-pie], [disable support for position independent executable])],
212 212 [
213   - app_cv_pic="$enableval"
  213 + app_cv_pie="$enableval"
214 214 ],[
215   - app_cv_pic="yes"
  215 + app_cv_pie="yes"
216 216 ])
217 217  
218   -if test "$app_cv_pic" == "yes"; then
219   - CFLAGS="$CFLAGS -fPIC"
220   - LDFLAGS="$LDFLAGS -fPIC"
  218 +if test "$app_cv_pie" == "yes"; then
  219 + CFLAGS="$CFLAGS -fpie"
  220 + LDFLAGS="$LDFLAGS -pie"
  221 + AC_MSG_NOTICE([Using position independent executable])
  222 +else
  223 + AC_MSG_NOTICE([Not using position independent executable])
221 224 fi
222 225  
223 226 dnl ---------------------------------------------------------------------------
... ...