autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Alternate header locations


From: Soren A
Subject: Alternate header locations
Date: Tue, 15 Oct 2002 08:08:13 +0000 (UTC)
User-agent: Xnews/L5

Hello,

This message is along similar lines to others i read on this list in the
last couple of days. 

It occurs to me to ask, before i consider submitting this to an Autoconf
macro collection, for tips on the approach taken. Feedback from the List
is requested. 

The problem to be solved is that a program that wants to #include
<utime.h> came my way recently and i realized that my platform doesn't
have <utime.h>, it has <sys/utime.h> however. This bit of Autoconf code
was what I put into my 'configure.ac' to accomplish porting of the
build. 

--------------------------------8<---------------------------------
where_toGet_utime_h=''
   AC_CHECK_HEADER(utime.h,
     [AC_DEFINE(HAVE_UTIME_H,1, ["utime.h" is present instead of 
"sys/utime.h"])]
                                where_toGet_utime_h='utime.h',
     [AC_CHECK_HEADER(sys/utime.h,
         [AC_DEFINE(HAVE_SYS_UTIME_H,1, ["sys/utime.h" is present instead 
of "utime.h"])]
                                        where_toGet_utime_h='sys/utime.h',
          [AC_MSG_WARN(Could find neither "utime.h" nor "sys/utime.h")]
                      )]
)
--------------------------------8<---------------------------------

Now to make this re-usable i need to turn it into a stand-alone Autoconf 
macro (AC_DEFUN() it).

  TIA,
    Soren A


-- 
Just say NO to YAHAAPs!
(http://groups.google.com/groups?&selm=
Xns92991EB1F396ngrATT586ID%40204.127.36.1)






reply via email to

[Prev in Thread] Current Thread [Next in Thread]