Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] View of /branches/charisee/config/ax_check_framework.m4
ViewVC logotype

View of /branches/charisee/config/ax_check_framework.m4

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2377 - (download) (annotate)
Mon Jun 3 19:41:56 2013 UTC (6 years, 4 months ago) by jhr
File size: 1134 byte(s)
  Create new branch for Charisee's Einstein stuff
dnl ax_check_framework.m4
dnl
dnl COPYRIGHT (c) 2008 John Reppy (http://cs.uchicago.edu/~jhr)
dnl All rights reserved.
dnl
dnl @synopsis AX_CHECK_FRAMEWORK(framework, [action-if-found], [action-if-not-found])
dnl
dnl This macro is similar to the AC_CHECK_LIB macro, except that it works
dnl for Mac OS X frameworks.  It checks to see if the given framework exists
dnl on the host sytem and if so prepends "-framework framework" to the FRAMEWORKS
dnl variable.
dnl 
dnl @author John Reppy <http://cs.uchicago.edu/~jhr>
dnl
AC_DEFUN([AX_CHECK_FRAMEWORK],[
  AC_REQUIRE([AC_CANONICAL_HOST])dnl
  case x"$host_os" in
    xdarwin*)
      AS_VAR_PUSHDEF([ax_Check], [ax_cv_check_$1])
      AC_CACHE_CHECK([for framework $1], [ax_Check],[
	AC_LANG_PUSH([C])
	ac_check_framework_save_LIBS=$LIBS
	LIBS="-framework $1 $LIBS"
	AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [ax_Check="yes"], [ax_Check="no"])
	AC_LANG_POP([C])dnl
      ])
      if test x"$ax_Check" = "xyes" ; then
	m4_ifvaln([$2],[$2],[:])dnl
      else
	m4_ifvaln([$3],[$3],[:])dnl
	LIBS=$ac_check_framework_save_LIBS
      fi
      AS_VAR_POPDEF([ax_Check])dnl
    ;;
  esac
])dnl

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0