Alexandre Lision | ddd731e | 2014-01-31 11:50:08 -0500 | [diff] [blame] | 1 | dnl Copyright (C) 1999-2005 Open Source Telecom Corporation. |
| 2 | dnl Copyright (C) 2006-2008 David Sugar, Tycho Softworks. |
| 3 | dnl |
| 4 | dnl This program is free software; you can redistribute it and/or modify |
| 5 | dnl it under the terms of the GNU General Public License as published by |
| 6 | dnl the Free Software Foundation; either version 2 of the License, or |
| 7 | dnl (at your option) any later version. |
| 8 | dnl |
| 9 | dnl This program is distributed in the hope that it will be useful, |
| 10 | dnl but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | dnl GNU General Public License for more details. |
| 13 | dnl |
| 14 | dnl You should have received a copy of the GNU General Public License |
| 15 | dnl along with this program; if not, write to the Free Software |
| 16 | dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 17 | dnl |
| 18 | dnl As a special exception to the GNU General Public License, if you |
| 19 | dnl distribute this file as part of a program that contains a configuration |
| 20 | dnl script generated by Autoconf, you may include it under the same |
| 21 | dnl distribution terms that you use for the rest of that program. |
| 22 | |
| 23 | AC_DEFUN([OST_SYS_POSIX],[ |
| 24 | AC_REQUIRE([OST_PROG_CC_POSIX]) |
| 25 | AC_CACHE_CHECK(whether system meets Posix.1, |
| 26 | ost_cv_sys_posix1, |
| 27 | AC_TRY_COMPILE(,[ |
| 28 | #include <sys/types.h> |
| 29 | #include <unistd.h> |
| 30 | #ifndef _POSIX_VERSION |
| 31 | fatal |
| 32 | #endif |
| 33 | ], |
| 34 | ost_cv_sys_posix1=yes, |
| 35 | ost_cv_sys_posix1=no |
| 36 | ) |
| 37 | ) |
| 38 | if test $ost_cv_sys_posix1 = no ; then |
| 39 | AC_CHECK_HEADERS(unistd.h) |
| 40 | else |
| 41 | AC_DEFINE(HAVE_UNISTD_H) |
| 42 | fi |
| 43 | ]) |
| 44 | |
| 45 | dnl ACCONFIG BOTTOM |
| 46 | dnl |
| 47 | dnl #ifdef HAVE_UNISTD_H |
| 48 | dnl #include <unistd.h> |
| 49 | dnl #endif |
| 50 | dnl |
| 51 | dnl END ACCONFIG |
| 52 | |