pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/libnbcompat/files Use AH_TEMPLATE when we use...
details: https://anonhg.NetBSD.org/pkgsrc/rev/7872284976ae
branches: trunk
changeset: 460815:7872284976ae
user: jlam <jlam%pkgsrc.org@localhost>
date: Thu Sep 04 20:20:08 2003 +0000
description:
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:
pkgtools/libnbcompat/files/configure | 42 ++++++++++--
pkgtools/libnbcompat/files/configure.ac | 70 ++++++++++++----------
pkgtools/libnbcompat/files/nbcompat/nbconfig.h.in | 44 +++++++-------
3 files changed, 94 insertions(+), 62 deletions(-)
diffs (truncated from 335 to 300 lines):
diff -r 9037e567bbf4 -r 7872284976ae pkgtools/libnbcompat/files/configure
--- a/pkgtools/libnbcompat/files/configure Thu Sep 04 19:38:06 2003 +0000
+++ b/pkgtools/libnbcompat/files/configure Thu Sep 04 20:20:08 2003 +0000
@@ -3462,8 +3462,10 @@
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 @@
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 @@
#define HAVE_NBCOMPAT_VIS 1
_ACEOF
+
+
LIBOBJS="$LIBOBJS vis.$ac_objext"
LIBOBJS="$LIBOBJS unvis.$ac_objext"
fi
@@ -7074,6 +7082,8 @@
#define HAVE_NBCOMPAT_STATFS 1
_ACEOF
+
+
LIBOBJS="$LIBOBJS statfs.$ac_objext"
fi
@@ -7174,6 +7184,8 @@
_ACEOF
+
+
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
@@ -7195,6 +7207,8 @@
_ACEOF
+
+
for ac_func in strtoll
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -7300,8 +7314,9 @@
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 @@
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 >>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 @@
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 -r 9037e567bbf4 -r 7872284976ae pkgtools/libnbcompat/files/configure.ac
--- a/pkgtools/libnbcompat/files/configure.ac Thu Sep 04 19:38:06 2003 +0000
+++ b/pkgtools/libnbcompat/files/configure.ac Thu Sep 04 20:20:08 2003 +0000
@@ -46,11 +46,15 @@
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 @@
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 @@
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 @@
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 @@
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 -r 9037e567bbf4 -r 7872284976ae pkgtools/libnbcompat/files/nbcompat/nbconfig.h.in
--- a/pkgtools/libnbcompat/files/nbcompat/nbconfig.h.in Thu Sep 04 19:38:06 2003 +0000
+++ b/pkgtools/libnbcompat/files/nbcompat/nbconfig.h.in Thu Sep 04 20:20:08 2003 +0000
@@ -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
Home |
Main Index |
Thread Index |
Old Index