From 0be8f819218c3244f011e52f26bdf41c69a993ed Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 7 May 2012 04:41:02 +0000 Subject: [PATCH] codesign * Makefile.in (PROGRAM), configure.in (POSTLINK): sign built program using RUBY_CODESIGN identity. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ Makefile.in | 2 ++ configure.in | 5 +++++ 3 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index 8477550c12..a1256fc71d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon May 7 13:41:00 2012 Nobuyoshi Nakada + + * Makefile.in (PROGRAM), configure.in (POSTLINK): sign built program + using RUBY_CODESIGN identity. + Mon May 7 13:03:55 2012 Shugo Maeda * lib/net/imap.rb (body_type_attachment): parse body type diff --git a/Makefile.in b/Makefile.in index 868823ddc5..bae0ce103c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -73,6 +73,7 @@ ARCHMINIOBJS = @MINIOBJS@ BUILTIN_ENCOBJS = @BUILTIN_ENCOBJS@ BUILTIN_TRANSSRCS = @BUILTIN_TRANSSRCS@ BUILTIN_TRANSOBJS = @BUILTIN_TRANSOBJS@ +POSTLINK = @POSTLINK@ RUBY_BASE_NAME=@RUBY_BASE_NAME@ RUBY_PROGRAM_VERSION=@RUBY_PROGRAM_VERSION@ @@ -175,6 +176,7 @@ $(PROGRAM): @$(RM) $@ $(ECHO) linking $@ $(Q) $(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINLIBS) $(MAINOBJ) $(EXTOBJS) $(LIBRUBYARG) $(LIBS) $(OUTFLAG)$@ + $(Q) $(POSTLINK) # We must `rm' the library each time this rule is invoked because "updating" a # MAB library on Apple/NeXT (see --enable-fat-binary in configure) is not diff --git a/configure.in b/configure.in index 18b5431068..70fedcf9b0 100644 --- a/configure.in +++ b/configure.in @@ -1059,6 +1059,11 @@ main() if test "$rb_cv_broken_crypt" = yes; then AC_DEFINE(BROKEN_CRYPT, 1) fi + if test "${RUBY_CODESIGN:+set}"; then + AC_CHECK_PROGS(codesign, codesign) + POSTLINK="$ac_cv_prog_codesign -s '$RUBY_CODESIGN' -f \$@" + AC_SUBST(POSTLINK) + fi ], [hpux*], [ LIBS="-lm $LIBS" ac_cv_c_inline=no],