autotools: update to simplified quicklaunch build.

This commit is contained in:
Cedric BAIL 2013-12-11 15:21:38 +09:00
parent cafa7052de
commit f4e52b15de
3 changed files with 26 additions and 13 deletions

View File

@ -32,6 +32,7 @@ AC_CONFIG_HEADERS(config.h)
AC_GNU_SOURCE
AC_PROG_LIBTOOL
AM_PROG_CC_C_O
ELM_QUICKLAUNCH
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##

24
m4/elm_quicklaunch.m4 Normal file
View File

@ -0,0 +1,24 @@
dnl Copyright (C) 2013 Cedric Bail <cedric dot bail at samsung dot com>
dnl That code is public domain and can be freely used or copied
dnl Macro that check if -pie -rdynamic can be given to ld
dnl Usage: ELM_QUICKLAUNCH
dnl add -pie -rdynamic to LDFLAGS and -fpie to CFLAGS
AC_DEFUN([ELM_QUICKLAUNCH],
[
AC_MSG_CHECKING([If the compiler as what it takes to do quicklaunch (-pie -rdynamic)])
old_LDFLAGS="$LDFLAGS"
old_CFLAGS="$CFLAGS"
LDFLAGS="$LDFLAGS -pie -rdynamic"
CFLAGS="$CFLAGS -fpie"
AC_LINK_IFELSE([AC_LANG_SOURCE([int main(){}])],
[AC_MSG_RESULT([yes])],
[LDFLAGS="$old_LDFLAGS"
CFLAGS="$old_CFLAGS"
AC_MSG_RESULT([no])
])
])

View File

@ -1,6 +1,6 @@
MAINTAINERCLEANFILES = Makefile.in
bin_PROGRAMS = enventor enventorql
bin_PROGRAMS = enventor
AM_CPPFLAGS = -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" \
-DPACKAGE_BIN_DIR=\"$(bindir)\" \
@ -27,18 +27,6 @@ enventor_SOURCES = \
build.c \
globals.c
# QuickLaunch
enventorql_SOURCES = $(enventor_SOURCES)
enventorql_LTLIBRARIES = enventorql.la
enventorql_CFLAGS = -DELM_LIB_QUICKLAUNCH=1
enventorql_LDFLAGS = @ENVENTOR_LIBS@
enventorqldir = $(libdir)
enventorql_la_LIBADD = @ENVENTOR_LIBS@
enventorql_la_CFLAGS =
enventorql_la_LDFLAGS = -module -avoid-version -no-undefined
enventorql_la_SOURCES = $(enventor_SOURCES)
enventor_LDADD = @ENVENTOR_LIBS@
enventor_LDFLAGS = $(LTLIBINTL)