- configure.ac: minor cleanups
authormichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>
Wed, 24 Dec 2014 13:37:32 +0000 (13:37 +0000)
committermichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>
Wed, 24 Dec 2014 13:37:32 +0000 (13:37 +0000)
git-svn-id: svn://svn.ircd-hybrid.org/svnroot/hopm/trunk@5110 82007160-df01-0410-b94d-b575c5fd34c7

configure
configure.ac
src/libopm/configure
src/libopm/configure.ac
src/libopm/src/setup.h.in
src/setup.h.in

index 09b9ba56f976ea202fbb4198cda291d5bd17a80a..22ff3939469157f184708e0757e3ab600c7d373d 100755 (executable)
--- a/configure
+++ b/configure
 done
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
-$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
-if ${ac_cv_c_const+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-#ifndef __cplusplus
-  /* Ultrix mips cc rejects this sort of thing.  */
-  typedef int charset[2];
-  const charset cs = { 0, 0 };
-  /* SunOS 4.1.1 cc rejects this.  */
-  char const *const *pcpcc;
-  char **ppc;
-  /* NEC SVR4.0.2 mips cc rejects this.  */
-  struct point {int x, y;};
-  static struct point const zero = {0,0};
-  /* AIX XL C 1.02.0.0 rejects this.
-     It does not let you subtract one const X* pointer from another in
-     an arm of an if-expression whose if-part is not a constant
-     expression */
-  const char *g = "string";
-  pcpcc = &g + (g ? g-g : 0);
-  /* HPUX 7.0 cc rejects these. */
-  ++pcpcc;
-  ppc = (char**) pcpcc;
-  pcpcc = (char const *const *) ppc;
-  { /* SCO 3.2v4 cc rejects this sort of thing.  */
-    char tx;
-    char *t = &tx;
-    char const *s = 0 ? (char *) 0 : (char const *) 0;
-
-    *t++ = 0;
-    if (s) return 0;
-  }
-  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
-    int x[] = {25, 17};
-    const int *foo = &x[0];
-    ++foo;
-  }
-  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
-    typedef const int *iptr;
-    iptr p = 0;
-    ++p;
-  }
-  { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
-       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
-    struct s { int j; const int *ap[3]; } bx;
-    struct s *b = &bx; b->j = 5;
-  }
-  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
-    const int foo = 10;
-    if (!foo) return 0;
-  }
-  return !cs[0] && !zero.x;
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_c_const=yes
-else
-  ac_cv_c_const=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
-$as_echo "$ac_cv_c_const" >&6; }
-if test $ac_cv_c_const = no; then
-
-$as_echo "#define const /**/" >>confdefs.h
-
-fi
-
 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
 if test "x$ac_cv_type_size_t" = xyes; then :
 
 done
 
 
-for ac_func in gethostbyname gethostbyname2
+for ac_func in gethostbyname
 do :
-  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
+if test "x$ac_cv_func_gethostbyname" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define HAVE_GETHOSTBYNAME 1
 _ACEOF
 
 fi
 
 
 
-echo "##############################################################################"
-echo "Everything is now configured, but you can find some more (infrequently"
-echo "changed) options in options.h.  To compile HOPM now, just type make.  It"
-echo "requires GNU Make, which may be installed as gmake on your system."
+echo "###############################################################################"
+echo "Configuration complete.  Type make (or gmake on some *BSD machines) to compile."
 echo
-echo "hopm will be installed in ${prefix}.  To change this, run:"
+echo "HOPM will be installed in ${prefix}.  To change this, run:"
 echo "   ./configure --prefix=DIRECTORY"
-echo "##############################################################################"
+echo "###############################################################################"
index f59324644f1856fd08b4aeec9ca355265c08700e..15011f2937b3859987854f5fa5a49f2d57134494 100644 (file)
@@ -41,7 +41,6 @@ AC_CHECK_HEADERS(sys/poll.h, have_poll_sys_h=yes, have_sys_poll_h=no)
 AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h strings.h)
 
 dnl Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST
 AC_TYPE_SIZE_T
 AC_HEADER_TIME
 AC_STRUCT_TM
@@ -65,7 +64,7 @@ AC_CHECK_FUNC(getnameinfo, [], AC_SEARCH_LIBS(getnameinfo, nsl))
 AC_CHECK_FUNCS(strlcpy strlcat inet_aton inet_pton socket strdup strstr)
 
 dnl Check if we can use gethostbyname2 for ipv6
-AC_CHECK_FUNCS(gethostbyname gethostbyname2)
+AC_CHECK_FUNCS(gethostbyname)
 
 dnl AIX fun
 AC_C_BIGENDIAN
@@ -96,11 +95,9 @@ AC_CONFIG_SUBDIRS(src/libopm)
 AC_OUTPUT(Makefile doc/Makefile src/Makefile)
 
 
-echo "##############################################################################"
-echo "Everything is now configured, but you can find some more (infrequently"
-echo "changed) options in options.h.  To compile HOPM now, just type make.  It"
-echo "requires GNU Make, which may be installed as gmake on your system."
+echo "###############################################################################"
+echo "Configuration complete.  Type make (or gmake on some *BSD machines) to compile."
 echo 
-echo "hopm will be installed in ${prefix}.  To change this, run:"
+echo "HOPM will be installed in ${prefix}.  To change this, run:"
 echo "   ./configure --prefix=DIRECTORY"
-echo "##############################################################################"
+echo "###############################################################################"
index e67e9b27cf6c1f4d17b34039f48e339423783c0c..6df73ba864f02243eaf50ba1430a693fb0a371e3 100755 (executable)
 done
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
-$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
-if ${ac_cv_c_const+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-#ifndef __cplusplus
-  /* Ultrix mips cc rejects this sort of thing.  */
-  typedef int charset[2];
-  const charset cs = { 0, 0 };
-  /* SunOS 4.1.1 cc rejects this.  */
-  char const *const *pcpcc;
-  char **ppc;
-  /* NEC SVR4.0.2 mips cc rejects this.  */
-  struct point {int x, y;};
-  static struct point const zero = {0,0};
-  /* AIX XL C 1.02.0.0 rejects this.
-     It does not let you subtract one const X* pointer from another in
-     an arm of an if-expression whose if-part is not a constant
-     expression */
-  const char *g = "string";
-  pcpcc = &g + (g ? g-g : 0);
-  /* HPUX 7.0 cc rejects these. */
-  ++pcpcc;
-  ppc = (char**) pcpcc;
-  pcpcc = (char const *const *) ppc;
-  { /* SCO 3.2v4 cc rejects this sort of thing.  */
-    char tx;
-    char *t = &tx;
-    char const *s = 0 ? (char *) 0 : (char const *) 0;
-
-    *t++ = 0;
-    if (s) return 0;
-  }
-  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
-    int x[] = {25, 17};
-    const int *foo = &x[0];
-    ++foo;
-  }
-  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
-    typedef const int *iptr;
-    iptr p = 0;
-    ++p;
-  }
-  { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
-       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
-    struct s { int j; const int *ap[3]; } bx;
-    struct s *b = &bx; b->j = 5;
-  }
-  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
-    const int foo = 10;
-    if (!foo) return 0;
-  }
-  return !cs[0] && !zero.x;
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_c_const=yes
-else
-  ac_cv_c_const=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
-$as_echo "$ac_cv_c_const" >&6; }
-if test $ac_cv_c_const = no; then
-
-$as_echo "#define const /**/" >>confdefs.h
-
-fi
-
 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
 if test "x$ac_cv_type_size_t" = xyes; then :
 
 done
 
 
-for ac_func in gethostbyname gethostbyname2
+for ac_func in gethostbyname
 do :
-  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
+if test "x$ac_cv_func_gethostbyname" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define HAVE_GETHOSTBYNAME 1
 _ACEOF
 
 fi
index ce36321fef9b317404cb779e036edd1064e1e5f6..deff3129bbb3d6b9aabba666943681e23a94ba30 100644 (file)
@@ -39,7 +39,6 @@ AC_CHECK_HEADERS(sys/poll.h, have_poll_sys_h=yes, have_sys_poll_h=no)
 AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h strings.h)
 
 dnl Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST
 AC_TYPE_SIZE_T
 AC_HEADER_TIME
 
@@ -55,7 +54,7 @@ fi
 AC_CHECK_FUNCS(inet_aton inet_pton)
 
 dnl Check if we can use gethostbyname2 for ipv6
-AC_CHECK_FUNCS(gethostbyname gethostbyname2)
+AC_CHECK_FUNCS(gethostbyname)
 
 dnl AIX fun
 AC_C_BIGENDIAN
index 02b48baecb093aef5bb274d61e3a3e6967c302af..afb7e78c2e48034c5a0699070b943faa923ab104 100644 (file)
@@ -12,9 +12,6 @@
 /* Define to 1 if you have the `gethostbyname' function. */
 #undef HAVE_GETHOSTBYNAME
 
-/* Define to 1 if you have the `gethostbyname2' function. */
-#undef HAVE_GETHOSTBYNAME2
-
 /* Define to 1 if you have the `inet_aton' function. */
 #undef HAVE_INET_ATON
 
 # endif
 #endif
 
-/* Define to empty if `const' does not conform to ANSI C. */
-#undef const
-
 /* Define to `unsigned int' if <sys/types.h> does not define. */
 #undef size_t
index 6b190f1a1f7a9fb018c9ae1442591d233a0f52f8..0e6a91b8fe7ba01c1a255a416cdfdc444da5c580 100644 (file)
@@ -12,9 +12,6 @@
 /* Define to 1 if you have the `gethostbyname' function. */
 #undef HAVE_GETHOSTBYNAME
 
-/* Define to 1 if you have the `gethostbyname2' function. */
-#undef HAVE_GETHOSTBYNAME2
-
 /* Define to 1 if you have the `inet_aton' function. */
 #undef HAVE_INET_ATON
 
    `char[]'. */
 #undef YYTEXT_POINTER
 
-/* Define to empty if `const' does not conform to ANSI C. */
-#undef const
-
 /* Define to `unsigned int' if <sys/types.h> does not define. */
 #undef size_t