diff options
author | jlam <jlam> | 2003-09-04 20:20:08 +0000 |
---|---|---|
committer | jlam <jlam> | 2003-09-04 20:20:08 +0000 |
commit | 8fab80c6cc567484f2fd3a377c77999fe97e16c4 (patch) | |
tree | ce41901eb46c14e6bc18714ec7f3979243c3246a /pkgtools | |
parent | a4c9280d8a3a40c1c961e272590b60a4d292acc8 (diff) | |
download | pkgsrc-8fab80c6cc567484f2fd3a377c77999fe97e16c4.tar.gz |
Use AH_TEMPLATE when we use AC_DEFINE so that autoheader can generate the
symbol and comment in nbconfig.h.in for us in the correct place. The
previous way of using AH_BOTTOM also worked but separated the symbol
definition from the accompanying C comment text, which was a little harder
to maintain.
Diffstat (limited to 'pkgtools')
-rwxr-xr-x | pkgtools/libnbcompat/files/configure | 42 | ||||
-rw-r--r-- | pkgtools/libnbcompat/files/configure.ac | 70 | ||||
-rw-r--r-- | pkgtools/libnbcompat/files/nbcompat/nbconfig.h.in | 44 |
3 files changed, 94 insertions, 62 deletions
diff --git a/pkgtools/libnbcompat/files/configure b/pkgtools/libnbcompat/files/configure index aae73b27503..f5e3d25ade8 100755 --- a/pkgtools/libnbcompat/files/configure +++ b/pkgtools/libnbcompat/files/configure @@ -3462,8 +3462,10 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include <sys/types.h> - #include <vis.h> + + #include <sys/types.h> + #include <vis.h> + int main () { @@ -3497,10 +3499,14 @@ fi echo "$as_me:$LINENO: result: $pkg_cv_have_vis_white" >&5 echo "${ECHO_T}$pkg_cv_have_vis_white" >&6 if test "x$pkg_cv_have_vis_white" = "xyes"; then - cat >>confdefs.h <<\_ACEOF + + cat >>confdefs.h <<\_ACEOF #define HAVE_VIS_H 1 _ACEOF + + + else pkg_use_nbcompat_vis=no : @@ -6461,6 +6467,8 @@ if test $pkg_use_nbcompat_vis = yes; then #define HAVE_NBCOMPAT_VIS 1 _ACEOF + + LIBOBJS="$LIBOBJS vis.$ac_objext" LIBOBJS="$LIBOBJS unvis.$ac_objext" fi @@ -7074,6 +7082,8 @@ if test $pkg_use_nbcompat_statfs = yes; then #define HAVE_NBCOMPAT_STATFS 1 _ACEOF + + LIBOBJS="$LIBOBJS statfs.$ac_objext" fi @@ -7174,6 +7184,8 @@ echo "${ECHO_T}yes" >&6 _ACEOF + + else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 @@ -7195,6 +7207,8 @@ fi _ACEOF + + for ac_func in strtoll do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` @@ -7300,8 +7314,9 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <stdlib.h> -#include <unistd.h> + #include <stdlib.h> + #include <unistd.h> + int main () { @@ -7337,10 +7352,14 @@ echo "${ECHO_T}$ftp_cv_HAVE_OPTARG_D" >&6 if test "x$ftp_cv_HAVE_OPTARG_D" = "xyes"; then : else - cat >>confdefs.h <<\_ACEOF + + cat >>confdefs.h <<\_ACEOF #define HAVE_OPTARG_D 1 _ACEOF + + + : fi @@ -7360,8 +7379,9 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <stdlib.h> -#include <unistd.h> + #include <stdlib.h> + #include <unistd.h> + int main () { @@ -7395,10 +7415,14 @@ fi echo "$as_me:$LINENO: result: $ftp_cv_HAVE_OPTIND_D" >&5 echo "${ECHO_T}$ftp_cv_HAVE_OPTIND_D" >&6 if test "x$ftp_cv_HAVE_OPTIND_D" = "xyes"; then - : cat >>confdefs.h <<\_ACEOF + : + cat >>confdefs.h <<\_ACEOF #define HAVE_OPTIND_D 1 _ACEOF + + + else : diff --git a/pkgtools/libnbcompat/files/configure.ac b/pkgtools/libnbcompat/files/configure.ac index 05be5695722..11f0ca88a16 100644 --- a/pkgtools/libnbcompat/files/configure.ac +++ b/pkgtools/libnbcompat/files/configure.ac @@ -46,11 +46,15 @@ dnl all of the functions that we need. dnl pkg_use_nbcompat_vis=yes AC_CHECK_HEADER(vis.h, [ - AC_MSG_TRY_COMPILE([for VIS_WHITE in vis.h], pkg_cv_have_vis_white, - [ #include <sys/types.h> - #include <vis.h> ], - [ int X = VIS_WHITE ], - [ AC_DEFINE(HAVE_VIS_H) ], [ pkg_use_nbcompat_vis=no ]) + AC_MSG_TRY_COMPILE([for VIS_WHITE in vis.h], pkg_cv_have_vis_white, [ + #include <sys/types.h> + #include <vis.h> + ], [ int X = VIS_WHITE ], [ + AC_DEFINE(HAVE_VIS_H) + AH_TEMPLATE([HAVE_VIS_H], [ + Define to 1 if you have the <vis.h> header file. + ]) + ], [ pkg_use_nbcompat_vis=no ]) ]) dnl Checks for typedefs, structures, and compiler characteristics. @@ -98,6 +102,9 @@ AC_CHECK_FUNCS([strunvis strvis strsvis], if test $pkg_use_nbcompat_vis = yes; then AC_DEFINE(HAVE_NBCOMPAT_VIS) + AH_TEMPLATE([HAVE_NBCOMPAT_VIS], [ + Define to 1 if the `vis' function is built into the library. + ]) AC_LIBOBJ(vis) AC_LIBOBJ(unvis) fi @@ -134,6 +141,9 @@ AC_CHECK_FUNC(statfs, [ if test $pkg_use_nbcompat_statfs = yes; then AC_DEFINE(HAVE_NBCOMPAT_STATFS, 1) + AH_TEMPLATE([HAVE_NBCOMPAT_STATFS], [ + Define to 1 if the `statfs' function is built into the library. + ]) AC_LIBOBJ(statfs) fi @@ -172,6 +182,10 @@ dnl support because we don't know how to display it. AC_MSG_RESULT(yes) can_printf_longlong=yes AC_DEFINE(HAVE_PRINTF_QD, 1) + AH_TEMPLATE([HAVE_PRINTF_QD], [ + Define to 1 if *printf() uses %qd to print + `long long' (otherwise uses %lld). + ]) ], [ AC_MSG_RESULT(no) ], [ : ]) @@ -179,44 +193,38 @@ dnl support because we don't know how to display it. if test $can_printf_longlong = yes; then AC_DEFINE(HAVE_QUAD_SUPPORT, 1) + AH_TEMPLATE([HAVE_QUAD_SUPPORT], [ + Define to 1 if `long long' is supported and + sizeof(off_t) >= 8. + ]) AC_REPLACE_FUNCS(strtoll) fi fi AC_MSG_TRY_COMPILE(for optarg declaration, ftp_cv_HAVE_OPTARG_D, [ -#include <stdlib.h> -#include <unistd.h> ], [ char *X = optarg ], [:], [AC_DEFINE(HAVE_OPTARG_D, 1)]) + #include <stdlib.h> + #include <unistd.h> +], [ char *X = optarg ], [:], [ + AC_DEFINE(HAVE_OPTARG_D, 1) + AH_TEMPLATE([HAVE_OPTARG_D], [ + Define to 1 if optarg is declared in <stdlib.h> or <unistd.h> + ]) +]) AC_MSG_TRY_COMPILE(for optind declaration, ftp_cv_HAVE_OPTIND_D, [ -#include <stdlib.h> -#include <unistd.h> ], [ int X = optind ], [:] [AC_DEFINE(HAVE_OPTIND_D, 1)]) + #include <stdlib.h> + #include <unistd.h> +], [ int X = optind ], [:] [ + AC_DEFINE(HAVE_OPTIND_D, 1) + AH_TEMPLATE([HAVE_OPTIND_D], [ + Define to 1 if optind is declared in <stdlib.h> or <unistd.h> + ]) +]) AH_BOTTOM([ -/* Define to 1 if you have the <vis.h> header file. */ -#undef HAVE_VIS_H - /* NBCOMPAT template section follows. */ -/* Define to 1 if the `vis' function is built into the library. */ -#undef HAVE_NBCOMPAT_VIS - -/* Define to 1 if the `statfs' function is built into the library. */ -#undef HAVE_NBCOMPAT_STATFS - -/* Define to 1 if *printf() uses %qd to print `long long' (otherwise uses - %lld) */ -#undef HAVE_PRINTF_QD - -/* Define to 1 if `long long' is supported and sizeof(off_t) >= 8 */ -#undef HAVE_QUAD_SUPPORT - -/* Define to 1 if optarg is declared in <stdlib.h> or <unistd.h> */ -#undef HAVE_OPTARG_D - -/* Define to 1 if optind is declared in <stdlib.h> or <unistd.h> */ -#undef HAVE_OPTIND_D - #ifndef HAVE___ATTRIBUTE__ # define __attribute__(x) #endif diff --git a/pkgtools/libnbcompat/files/nbcompat/nbconfig.h.in b/pkgtools/libnbcompat/files/nbcompat/nbconfig.h.in index f90acd51f47..e4e15c768cf 100644 --- a/pkgtools/libnbcompat/files/nbcompat/nbconfig.h.in +++ b/pkgtools/libnbcompat/files/nbcompat/nbconfig.h.in @@ -155,6 +155,12 @@ /* Define to 1 if you have the `mkstemp' function. */ #undef HAVE_MKSTEMP +/* Define to 1 if the `statfs' function is built into the library. */ +#undef HAVE_NBCOMPAT_STATFS + +/* Define to 1 if the `vis' function is built into the library. */ +#undef HAVE_NBCOMPAT_VIS + /* Define to 1 if you have the <ndir.h> header file. */ #undef HAVE_NDIR_H @@ -164,6 +170,12 @@ /* Define to 1 if you have the <netinet/in6_machtypes.h> header file. */ #undef HAVE_NETINET_IN6_MACHTYPES_H +/* Define to 1 if optarg is declared in <stdlib.h> or <unistd.h> */ +#undef HAVE_OPTARG_D + +/* Define to 1 if optind is declared in <stdlib.h> or <unistd.h> */ +#undef HAVE_OPTIND_D + /* Define to 1 if you have the <paths.h> header file. */ #undef HAVE_PATHS_H @@ -173,6 +185,10 @@ /* Define to 1 if you have the <poll.h> header file. */ #undef HAVE_POLL_H +/* Define to 1 if *printf() uses %qd to print `long long' (otherwise uses + %lld). */ +#undef HAVE_PRINTF_QD + /* Define to 1 if you have the `pwcache_groupdb' function. */ #undef HAVE_PWCACHE_GROUPDB @@ -182,6 +198,9 @@ /* Define to 1 if you have the <pwd.h> header file. */ #undef HAVE_PWD_H +/* Define to 1 if `long long' is supported and sizeof(off_t) >= 8. */ +#undef HAVE_QUAD_SUPPORT + /* Define to 1 if you have the `RMD160File' function. */ #undef HAVE_RMD160FILE @@ -380,6 +399,9 @@ /* Define to 1 if the system has the type `u_int8_t'. */ #undef HAVE_U_INT8_T +/* Define to 1 if you have the <vis.h> header file. */ +#undef HAVE_VIS_H + /* Define to 1 if you have the `vprintf' function. */ #undef HAVE_VPRINTF @@ -424,30 +446,8 @@ #undef size_t -/* Define to 1 if you have the <vis.h> header file. */ -#undef HAVE_VIS_H - /* NBCOMPAT template section follows. */ -/* Define to 1 if the `vis' function is built into the library. */ -#undef HAVE_NBCOMPAT_VIS - -/* Define to 1 if the `statfs' function is built into the library. */ -#undef HAVE_NBCOMPAT_STATFS - -/* Define to 1 if *printf() uses %qd to print `long long' (otherwise uses - %lld) */ -#undef HAVE_PRINTF_QD - -/* Define to 1 if `long long' is supported and sizeof(off_t) >= 8 */ -#undef HAVE_QUAD_SUPPORT - -/* Define to 1 if optarg is declared in <stdlib.h> or <unistd.h> */ -#undef HAVE_OPTARG_D - -/* Define to 1 if optind is declared in <stdlib.h> or <unistd.h> */ -#undef HAVE_OPTIND_D - #ifndef HAVE___ATTRIBUTE__ # define __attribute__(x) #endif |