aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar ross <unknown>2005-09-20 22:54:33 +0000
committerGravatar ross <unknown>2005-09-20 22:54:33 +0000
commit46014f062a4963701631b77332adeabb67c09042 (patch)
treeafaec3fddc4209c5abf081b9dca7caa35f633131
parent9e07e664ff3381521b8e410e0dab9f7d742e2559 (diff)
[project @ 2005-09-20 22:54:33 by ross]
make the unix package independent.
-rw-r--r--configure.ac14
-rw-r--r--include/HsUnix.h2
-rw-r--r--unix.buildinfo.in1
-rw-r--r--unix.cabal55
4 files changed, 49 insertions, 23 deletions
diff --git a/configure.ac b/configure.ac
index 9a7932f..8fc7731 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5,7 +5,19 @@ AC_CONFIG_SRCDIR([include/HsUnix.h])
AC_CONFIG_HEADERS([include/HsUnixConfig.h])
-AC_CHECK_FUNCS([getgrgid_r getgrnam_r getpwnam_r getpwuid_r getpwnam getpwuid lchown setenv unsetenv])
+# Is this a Unix system?
+AC_CHECK_FUNC([creat], [BUILD_PACKAGE_BOOL=True], [BUILD_PACKAGE_BOOL=False])
+AC_SUBST([BUILD_PACKAGE_BOOL])
+
+AC_C_CONST
+
+AC_CHECK_HEADERS([dirent.h fcntl.h grp.h limits.h pwd.h signal.h string.h])
+AC_CHECK_HEADERS([sys/resource.h sys/stat.h sys/times.h sys/time.h])
+AC_CHECK_HEADERS([sys/utsname.h sys/wait.h])
+AC_CHECK_HEADERS([termios.h time.h unistd.h utime.h])
+
+AC_CHECK_FUNCS([getgrgid_r getgrnam_r getpwnam_r getpwuid_r getpwnam getpwuid])
+AC_CHECK_FUNCS([lchown setenv sysconf unsetenv])
AC_MSG_CHECKING([for _SC_GETGR_R_SIZE_MAX])
AC_EGREP_CPP(we_have_that_sysconf_thing,
diff --git a/include/HsUnix.h b/include/HsUnix.h
index 5b17359..8669b30 100644
--- a/include/HsUnix.h
+++ b/include/HsUnix.h
@@ -9,8 +9,6 @@
#ifndef HSUNIX_H
#define HSUNIX_H
-#include "ghcconfig.h"
-
#include "HsUnixConfig.h"
/* ultra-evil... */
diff --git a/unix.buildinfo.in b/unix.buildinfo.in
index 9fe31ef..7283015 100644
--- a/unix.buildinfo.in
+++ b/unix.buildinfo.in
@@ -1 +1,2 @@
+buildable: @BUILD_PACKAGE_BOOL@
extra-libraries: @EXTRA_LIBS@
diff --git a/unix.cabal b/unix.cabal
index 63e55c7..b38a655 100644
--- a/unix.cabal
+++ b/unix.cabal
@@ -4,25 +4,40 @@ license: BSD3
license-file: LICENSE
maintainer: libraries@haskell.org
synopsis: POSIX functionality
-build-depends: base
+description:
+ This package gives you access to the set of operating system
+ services standardised by POSIX 1003.1b (or the IEEE Portable
+ Operating System Interface for Computing Environments -
+ IEEE Std. 1003.1).
+ .
+ The package is not supported under Windows (except under Cygwin).
exposed-modules:
- System.Posix,
- System.Posix.DynamicLinker.Module,
- System.Posix.DynamicLinker.Prim,
- System.Posix.Directory,
- System.Posix.DynamicLinker,
- System.Posix.Env,
- System.Posix.Error,
- System.Posix.Files,
- System.Posix.IO,
- System.Posix.Process,
- System.Posix.Resource,
- System.Posix.Temp,
- System.Posix.Terminal,
- System.Posix.Time,
- System.Posix.Unistd,
- System.Posix.User,
- System.Posix.Signals.Exts
-include-dirs: include, ../../ghc/includes
-includes: HsUnix.h
+ System.Posix
+ System.Posix.DynamicLinker.Module
+ System.Posix.DynamicLinker.Prim
+ System.Posix.Directory
+ System.Posix.DynamicLinker
+ System.Posix.Env
+ System.Posix.Error
+ System.Posix.Files
+ System.Posix.IO
+ System.Posix.Process
+ System.Posix.Resource
+ System.Posix.Temp
+ System.Posix.Terminal
+ System.Posix.Time
+ System.Posix.Unistd
+ System.Posix.User
+ System.Posix.Signals.Exts
+extra-source-files:
+ configure.ac configure
+ unix.buildinfo.in include/HsUnixConfig.h.in
+ include/HsUnix.h
+extra-tmp-files:
+ config.log config.status autom4te.cache
+ unix.buildinfo include/HsUnixConfig.h
+build-depends: base
extensions: CPP
+include-dirs: include
+includes: HsUnix.h
+c-sources: cbits/HsUnix.c