[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] [autoconf] check g++ version



On Mon, 10 Nov 2008, Kristian Nørgaard wrote:

Derudover har jeg opdaget at g++ selv definerer sin version gennem følgende defines:

__ GNUC__
__ GNUC_MINOR__
__ GNUC_PATCHLEVEL__

Kan du så ikke bare lige skrive et testprogram?

AC_LANG_CONFTEST([
        AC_LANG_PROGRAM(
                [[/* no main vars */]],
                [[if (__GNUC__==4 && __GNUC_MINOR__==2 && __GNUC_PATCHLEVEL__==4) exit 0; else exit 1;]]
        )
])

'cat configure' ser sådan ud:

/* no main vars */
int
main ()
{
if (__GNUC__==4 && __GNUC_MINOR__==2 && __GNUC_PATCHLEVEL__==4) exit 0; else exit 1;

  ;
  return 0;
}

Din test skal vist se anderledes ud som jeg husker det, men det ville da kunne bruges.

/hans
--
Horsebakken 78, DK-2400 København NV, Phone: +45 2264 8020
-------------------------------------------------------------
$ mkdir klager
mkdir: cannot create directory `klager': File exists
					-- Vibeke Schou


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2008-12-01, 02:01 CET [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *