Skip to content

Commit 7c17027

Browse files
committed
f config
1 parent a8666cc commit 7c17027

File tree

2 files changed

+212
-14
lines changed

2 files changed

+212
-14
lines changed

configure

Lines changed: 182 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,6 @@ build_os
637637
build_vendor
638638
build_cpu
639639
build
640-
BUILD_PACKAGE_BOOL
641640
EGREP
642641
GREP
643642
CPP
@@ -1770,6 +1769,60 @@ $as_echo "$ac_res" >&6; }
17701769
17711770
} # ac_fn_c_check_func
17721771
1772+
# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1773+
# -------------------------------------------
1774+
# Tests whether TYPE exists after having included INCLUDES, setting cache
1775+
# variable VAR accordingly.
1776+
ac_fn_c_check_type ()
1777+
{
1778+
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1779+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1780+
$as_echo_n "checking for $2... " >&6; }
1781+
if eval \${$3+:} false; then :
1782+
$as_echo_n "(cached) " >&6
1783+
else
1784+
eval "$3=no"
1785+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1786+
/* end confdefs.h. */
1787+
$4
1788+
int
1789+
main ()
1790+
{
1791+
if (sizeof ($2))
1792+
return 0;
1793+
;
1794+
return 0;
1795+
}
1796+
_ACEOF
1797+
if ac_fn_c_try_compile "$LINENO"; then :
1798+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1799+
/* end confdefs.h. */
1800+
$4
1801+
int
1802+
main ()
1803+
{
1804+
if (sizeof (($2)))
1805+
return 0;
1806+
;
1807+
return 0;
1808+
}
1809+
_ACEOF
1810+
if ac_fn_c_try_compile "$LINENO"; then :
1811+
1812+
else
1813+
eval "$3=yes"
1814+
fi
1815+
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1816+
fi
1817+
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1818+
fi
1819+
eval ac_res=\$$3
1820+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1821+
$as_echo "$ac_res" >&6; }
1822+
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1823+
1824+
} # ac_fn_c_check_type
1825+
17731826
# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
17741827
# ---------------------------------------------
17751828
# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
@@ -3664,17 +3717,6 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
36643717
ac_config_headers="$ac_config_headers include/HsUnixConfig.h"
36653718
36663719
3667-
# Is this a Unix system?
3668-
ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
3669-
if test "x$ac_cv_header_dlfcn_h" = xyes; then :
3670-
BUILD_PACKAGE_BOOL=True
3671-
else
3672-
BUILD_PACKAGE_BOOL=False
3673-
fi
3674-
3675-
3676-
3677-
36783720
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
36793721
$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
36803722
if ${ac_cv_c_const+:} false; then :
@@ -4105,6 +4147,133 @@ fi
41054147
done
41064148
41074149
4150+
for ac_func in alarm
4151+
do :
4152+
ac_fn_c_check_func "$LINENO" "alarm" "ac_cv_func_alarm"
4153+
if test "x$ac_cv_func_alarm" = xyes; then :
4154+
cat >>confdefs.h <<_ACEOF
4155+
#define HAVE_ALARM 1
4156+
_ACEOF
4157+
4158+
fi
4159+
done
4160+
4161+
for ac_func in dup
4162+
do :
4163+
ac_fn_c_check_func "$LINENO" "dup" "ac_cv_func_dup"
4164+
if test "x$ac_cv_func_dup" = xyes; then :
4165+
cat >>confdefs.h <<_ACEOF
4166+
#define HAVE_DUP 1
4167+
_ACEOF
4168+
4169+
fi
4170+
done
4171+
4172+
for ac_func in execv
4173+
do :
4174+
ac_fn_c_check_func "$LINENO" "execv" "ac_cv_func_execv"
4175+
if test "x$ac_cv_func_execv" = xyes; then :
4176+
cat >>confdefs.h <<_ACEOF
4177+
#define HAVE_EXECV 1
4178+
_ACEOF
4179+
4180+
fi
4181+
done
4182+
4183+
for ac_func in getpid
4184+
do :
4185+
ac_fn_c_check_func "$LINENO" "getpid" "ac_cv_func_getpid"
4186+
if test "x$ac_cv_func_getpid" = xyes; then :
4187+
cat >>confdefs.h <<_ACEOF
4188+
#define HAVE_GETPID 1
4189+
_ACEOF
4190+
4191+
fi
4192+
done
4193+
4194+
for ac_func in mknod
4195+
do :
4196+
ac_fn_c_check_func "$LINENO" "mknod" "ac_cv_func_mknod"
4197+
if test "x$ac_cv_func_mknod" = xyes; then :
4198+
cat >>confdefs.h <<_ACEOF
4199+
#define HAVE_MKNOD 1
4200+
_ACEOF
4201+
4202+
fi
4203+
done
4204+
4205+
for ac_func in mkstemp
4206+
do :
4207+
ac_fn_c_check_func "$LINENO" "mkstemp" "ac_cv_func_mkstemp"
4208+
if test "x$ac_cv_func_mkstemp" = xyes; then :
4209+
cat >>confdefs.h <<_ACEOF
4210+
#define HAVE_MKSTEMP 1
4211+
_ACEOF
4212+
4213+
fi
4214+
done
4215+
4216+
for ac_func in pipe
4217+
do :
4218+
ac_fn_c_check_func "$LINENO" "pipe" "ac_cv_func_pipe"
4219+
if test "x$ac_cv_func_pipe" = xyes; then :
4220+
cat >>confdefs.h <<_ACEOF
4221+
#define HAVE_PIPE 1
4222+
_ACEOF
4223+
4224+
fi
4225+
done
4226+
4227+
for ac_func in times
4228+
do :
4229+
ac_fn_c_check_func "$LINENO" "times" "ac_cv_func_times"
4230+
if test "x$ac_cv_func_times" = xyes; then :
4231+
cat >>confdefs.h <<_ACEOF
4232+
#define HAVE_TIMES 1
4233+
_ACEOF
4234+
4235+
fi
4236+
done
4237+
4238+
4239+
ac_fn_c_check_type "$LINENO" "struct rlimit" "ac_cv_type_struct_rlimit" "#include <sys/resource.h>
4240+
"
4241+
if test "x$ac_cv_type_struct_rlimit" = xyes; then :
4242+
4243+
$as_echo "#define HAVE_STRUCT_RLIMIT 1" >>confdefs.h
4244+
4245+
fi
4246+
4247+
4248+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for F_GETLK from fcntl.h" >&5
4249+
$as_echo_n "checking for F_GETLK from fcntl.h... " >&6; }
4250+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4251+
/* end confdefs.h. */
4252+
4253+
#include <fcntl.h>
4254+
#ifdef F_GETLK
4255+
yes
4256+
#endif
4257+
4258+
_ACEOF
4259+
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4260+
$EGREP "yes" >/dev/null 2>&1; then :
4261+
4262+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4263+
$as_echo "yes" >&6; }
4264+
4265+
$as_echo "#define HAVE_F_GETLK 1" >>confdefs.h
4266+
4267+
4268+
else
4269+
4270+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4271+
$as_echo "no" >&6; }
4272+
4273+
fi
4274+
rm -f conftest*
4275+
4276+
41084277
ac_aux_dir=
41094278
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
41104279
if test -f "$ac_dir/install-sh"; then
@@ -4507,7 +4676,7 @@ done
45074676
45084677
45094678
# Additional temp functions
4510-
# We explicilty check for android, as the check AC_CHECK_FUNCS performs returns "yes" for mkstemps
4679+
# We explicitly check for android, as the check AC_CHECK_FUNCS performs returns "yes" for mkstemps
45114680
# when targetting android. See similar conditionals for seekdir and telldir.
45124681
case $target_os in #(
45134682
*-android*) :
@@ -4729,7 +4898,6 @@ else
47294898
fp_check_const_result='-1'
47304899
fi
47314900
4732-
47334901
eval "$as_fp_Cache=\$fp_check_const_result"
47344902
fi
47354903
eval ac_res=\$$as_fp_Cache

include/HsUnixConfig.h.in

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@
9999
/* The value of SIG_UNBLOCK. */
100100
#undef CONST_SIG_UNBLOCK
101101

102+
/* Define to 1 if you have the `alarm' function. */
103+
#undef HAVE_ALARM
104+
102105
/* Define to 1 if you have the <bsd/libutil.h> header file. */
103106
#undef HAVE_BSD_LIBUTIL_H
104107

@@ -133,6 +136,12 @@
133136
/* Define to 1 if you have the <dirent.h> header file. */
134137
#undef HAVE_DIRENT_H
135138

139+
/* Define to 1 if you have the `dup' function. */
140+
#undef HAVE_DUP
141+
142+
/* Define to 1 if you have the `execv' function. */
143+
#undef HAVE_EXECV
144+
136145
/* Define to 1 if you have the `execvpe' function. */
137146
#undef HAVE_EXECVPE
138147

@@ -151,6 +160,9 @@
151160
/* Define to 1 if you have the `futimes' function. */
152161
#undef HAVE_FUTIMES
153162

163+
/* Define to 1 if F_GETLK is available. */
164+
#undef HAVE_F_GETLK
165+
154166
/* Define to 1 if you have the `getgrent' function. */
155167
#undef HAVE_GETGRENT
156168

@@ -160,6 +172,9 @@
160172
/* Define to 1 if you have the `getgrnam_r' function. */
161173
#undef HAVE_GETGRNAM_R
162174

175+
/* Define to 1 if you have the `getpid' function. */
176+
#undef HAVE_GETPID
177+
163178
/* Define to 1 if you have the `getpwent' function. */
164179
#undef HAVE_GETPWENT
165180

@@ -199,6 +214,12 @@
199214
/* Define to 1 if you have the `mkdtemp' function. */
200215
#undef HAVE_MKDTEMP
201216

217+
/* Define to 1 if you have the `mknod' function. */
218+
#undef HAVE_MKNOD
219+
220+
/* Define to 1 if you have the `mkstemp' function. */
221+
#undef HAVE_MKSTEMP
222+
202223
/* Define to 1 if you have the `mkstemps' function. */
203224
#undef HAVE_MKSTEMPS
204225

@@ -211,6 +232,9 @@
211232
/* Define to 1 if you have the `openpty' function. */
212233
#undef HAVE_OPENPTY
213234

235+
/* Define to 1 if you have the `pipe' function. */
236+
#undef HAVE_PIPE
237+
214238
/* Define to 1 if you have the `posix_fadvise' function. */
215239
#undef HAVE_POSIX_FADVISE
216240

@@ -271,6 +295,9 @@
271295
/* Define to 1 if you have the <string.h> header file. */
272296
#undef HAVE_STRING_H
273297

298+
/* HAVE_STRUCT_RLIMIT */
299+
#undef HAVE_STRUCT_RLIMIT
300+
274301
/* Define to 1 if `st_atim' is a member of `struct stat'. */
275302
#undef HAVE_STRUCT_STAT_ST_ATIM
276303

@@ -355,6 +382,9 @@
355382
/* Define to 1 if you have the <termios.h> header file. */
356383
#undef HAVE_TERMIOS_H
357384

385+
/* Define to 1 if you have the `times' function. */
386+
#undef HAVE_TIMES
387+
358388
/* Define to 1 if you have the <time.h> header file. */
359389
#undef HAVE_TIME_H
360390

0 commit comments

Comments
 (0)