[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is the version of MacOS available to CPP ?
From: |
Ben Abbott |
Subject: |
Re: Is the version of MacOS available to CPP ? |
Date: |
Thu, 14 Jun 2012 08:09:31 -0400 |
On Jun 10, 2012, at 7:33 AM, Jordi GutiƩrrez Hermoso wrote:
> On 09/06/2012, Ben Abbott <address@hidden> wrote:
>> With MacOS 10.7.x, Apple has deprecated CGDisplayBitsPerPixel.
> [snip]
>> Is the version of MacOS X available to the preprocessor ?
>
> We test for features, not for versions. If you need that function or a
> replacement if it's absent, write an autoconf macro to test for it.
> There have been recent examples by Carlo about how to do this for NaN
> in Fortran and std::bit_and for C++.
>
> HTH,
> - Jordi G. H.
Jordi / others,
The code below is intended to be added to ./m4/acinclude.m4. I'm not familiar
with the naming of variables. Are my choices acceptable ?
dnl
AC_DEFUN([CARBON_HAS_CGDISPLAYBITSPERPIXEL],
[AC_CACHE_CHECK([whether CGDisplayBitsPerPixel is defined in the Carbon
Framework],
carbon_cv_has_cgdisplaybitsperpixel,
[AC_LANG_PUSH(C++)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <Carbon/Carbon.h>]],
[[int main (void)]]
[[{]]
[[ CGDirectDisplayID display = CGMainDisplayID ();]]
[[ size_t depth = CGDisplayBitsPerPixel (display);]]
[[ return 0;]]
[[}]])],
carbon_cv_has_cgdisplaybitsperpixel=yes,
carbon_cv_has_cgdisplaybitsperpixel=no)])
if test $carbon_cv_cgdisplaybitsperpixel = yes; then
AC_DEFINE(CARBON_HAS_CGDISPLAYBITSPERPIXEL,1,[Define if Carbon Framework has
CGDisplayBitsPerPixel])
fi
AC_LANG_POP(C++)
])
Ben
- Is the version of MacOS available to CPP ?, Ben Abbott, 2012/06/09
- Re: Is the version of MacOS available to CPP ?, Dr. Alexander Klein, 2012/06/10
- Re: Is the version of MacOS available to CPP ?, Jordi GutiƩrrez Hermoso, 2012/06/10
- Re: Is the version of MacOS available to CPP ?,
Ben Abbott <=
- Looking for MacOS 10.5 testers, Ben Abbott, 2012/06/14
- Re: Looking for MacOS 10.5 testers, Alexander Hansen, 2012/06/15
- Re: Looking for MacOS 10.5 testers, Alexander Hansen, 2012/06/15
- Re: Looking for MacOS 10.5 testers, Ben Abbott, 2012/06/15
- Re: Looking for MacOS 10.5 testers, Ben Abbott, 2012/06/15
- Re: Looking for MacOS 10.5 testers, Alexander Hansen, 2012/06/15
- Re: Looking for MacOS 10.5 testers, Ben Abbott, 2012/06/15
- Re: Looking for MacOS 10.5 testers, Alexander Hansen, 2012/06/15
- Re: Looking for MacOS 10.5 testers, Ben Abbott, 2012/06/15
- Re: Looking for MacOS 10.5 testers, Alexander Hansen, 2012/06/15