libphobos: Remove --enable-unix configure option.
authorIain Buclaw <ibuclaw@gdcproject.org>
Wed, 8 Apr 2020 20:52:05 +0000 (22:52 +0200)
committerIain Buclaw <ibuclaw@gdcproject.org>
Wed, 8 Apr 2020 20:52:05 +0000 (22:52 +0200)
This option is not useful on its own as all posix modules require the
compiler to predefine version(Posix) anyway.  So the option has been
removed, and logic moved into DRUNTIME_OS_SOURCES, where the conditional
DRUNTIME_OS_POSIX is set instead.

libphobos/ChangeLog:

* configure: Regenerate.
* configure.ac: Remove DRUNTIME_OS_UNIX.
* libdruntime/Makefile.am: Add DRUNTIME_DSOURCES_POSIX if
DRUNTIME_OS_POSIX is true.
* libdruntime/Makefile.in: Regenerate.
* m4/druntime/os.m4 (DRUNTIME_OS_UNIX): Remove, move AM_CONDITIONAL
logic to...
(DRUNTIME_OS_SOURCES): ...here.  Rename conditional to
DRUNTIME_OS_POSIX.

libphobos/ChangeLog
libphobos/configure
libphobos/configure.ac
libphobos/libdruntime/Makefile.am
libphobos/libdruntime/Makefile.in
libphobos/m4/druntime/os.m4

index a67f2283533a371a1ef898ca9450a6af183e2b51..216cd61baf15eea155b82e818e17e98b066a8c60 100644 (file)
@@ -1,3 +1,15 @@
+2020-04-08  Iain Buclaw  <ibuclaw@gdcproject.org>
+
+       * configure: Regenerate.
+       * configure.ac: Remove DRUNTIME_OS_UNIX.
+       * libdruntime/Makefile.am: Add DRUNTIME_DSOURCES_POSIX if
+       DRUNTIME_OS_POSIX is true.
+       * libdruntime/Makefile.in: Regenerate.
+       * m4/druntime/os.m4 (DRUNTIME_OS_UNIX): Remove, move AM_CONDITIONAL
+       logic to...
+       (DRUNTIME_OS_SOURCES): ...here.  Rename conditional to
+       DRUNTIME_OS_POSIX.
+
 2020-04-08  Iain Buclaw  <ibuclaw@gdcproject.org>
 
        * Makefile.in: Regenerate.
index 65e32d88f4568b34a9466f0ffd0e0a3f89ced99b..108518d86aa23f93014dc7503476cf4061eb6d73 100755 (executable)
@@ -662,6 +662,8 @@ DRUNTIME_OS_ARM_EABI_UNWINDER_FALSE
 DRUNTIME_OS_ARM_EABI_UNWINDER_TRUE
 DCFG_ARM_EABI_UNWINDER
 DCFG_THREAD_MODEL
+DRUNTIME_OS_POSIX_FALSE
+DRUNTIME_OS_POSIX_TRUE
 DRUNTIME_OS_SOLARIS_FALSE
 DRUNTIME_OS_SOLARIS_TRUE
 DRUNTIME_OS_MINGW_FALSE
@@ -682,8 +684,6 @@ DRUNTIME_OS_ANDROID_FALSE
 DRUNTIME_OS_ANDROID_TRUE
 DRUNTIME_OS_AIX_FALSE
 DRUNTIME_OS_AIX_TRUE
-DRUNTIME_OS_UNIX_FALSE
-DRUNTIME_OS_UNIX_TRUE
 DRUNTIME_CPU_S390_FALSE
 DRUNTIME_CPU_S390_TRUE
 DRUNTIME_CPU_SYSTEMZ_FALSE
@@ -835,7 +835,6 @@ enable_libtool_lock
 with_gcc_major_version_only
 enable_werror
 enable_druntime_gc
-enable_unix
 enable_thread_lib
 with_libatomic
 with_libbacktrace
@@ -1486,8 +1485,6 @@ Optional Features:
   --disable-libtool-lock  avoid locking (might break parallel builds)
   --enable-werror         turns on -Werror [default=no]
   --enable-druntime-gc    enable D runtime garbage collector (default: yes)
-  --enable-unix           enables Unix runtime (default: yes, for Unix
-                          targets)
   --enable-thread-lib=<arg>
                           specify linker option for the system thread library
                           (default: autodetect)
@@ -11649,7 +11646,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11652 "configure"
+#line 11649 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11755,7 +11752,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11758 "configure"
+#line 11755 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
 
 
 
-  # Check whether --enable-unix was given.
-if test "${enable_unix+set}" = set; then :
-  enableval=$enable_unix; :
-else
-  enable_unix=auto
-fi
-
-
-  case "$druntime_cv_target_os" in
-    aix*|*bsd*|cygwin*|darwin*|gnu*|linux*|skyos*|*solaris*|sysv*) d_have_unix=1 ;;
-  esac
-  if test -n "$d_have_unix" && test "$enable_unix" = auto ; then
-    enable_unix=yes
-  fi
-   if test "$enable_unix" = "yes"; then
-  DRUNTIME_OS_UNIX_TRUE=
-  DRUNTIME_OS_UNIX_FALSE='#'
-else
-  DRUNTIME_OS_UNIX_TRUE='#'
-  DRUNTIME_OS_UNIX_FALSE=
-fi
-
-
-
-
 
   druntime_target_os_parsed=""
   case "$druntime_cv_target_os" in
@@ -14239,6 +14211,21 @@ else
 fi
 
 
+  druntime_target_posix="no"
+  case "$druntime_cv_target_os" in
+    aix*|*bsd*|cygwin*|darwin*|gnu*|linux*|skyos*|*solaris*|sysv*)
+      druntime_target_posix="yes"
+      ;;
+  esac
+   if test "$druntime_target_posix" = "yes"; then
+  DRUNTIME_OS_POSIX_TRUE=
+  DRUNTIME_OS_POSIX_FALSE='#'
+else
+  DRUNTIME_OS_POSIX_TRUE='#'
+  DRUNTIME_OS_POSIX_FALSE=
+fi
+
+
 
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread model used by GDC" >&5
@@ -15599,10 +15586,6 @@ if test -z "${DRUNTIME_CPU_S390_TRUE}" && test -z "${DRUNTIME_CPU_S390_FALSE}";
   as_fn_error $? "conditional \"DRUNTIME_CPU_S390\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${DRUNTIME_OS_UNIX_TRUE}" && test -z "${DRUNTIME_OS_UNIX_FALSE}"; then
-  as_fn_error $? "conditional \"DRUNTIME_OS_UNIX\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
 if test -z "${DRUNTIME_OS_AIX_TRUE}" && test -z "${DRUNTIME_OS_AIX_FALSE}"; then
   as_fn_error $? "conditional \"DRUNTIME_OS_AIX\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -15643,6 +15626,10 @@ if test -z "${DRUNTIME_OS_SOLARIS_TRUE}" && test -z "${DRUNTIME_OS_SOLARIS_FALSE
   as_fn_error $? "conditional \"DRUNTIME_OS_SOLARIS\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${DRUNTIME_OS_POSIX_TRUE}" && test -z "${DRUNTIME_OS_POSIX_FALSE}"; then
+  as_fn_error $? "conditional \"DRUNTIME_OS_POSIX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${DRUNTIME_OS_ARM_EABI_UNWINDER_TRUE}" && test -z "${DRUNTIME_OS_ARM_EABI_UNWINDER_FALSE}"; then
   as_fn_error $? "conditional \"DRUNTIME_OS_ARM_EABI_UNWINDER\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
index 09e334d2045a27cb9bf81e977e3a62b6fdc8c6da..594d2001b067c5376a122682cc79f3cde3e3a929 100644 (file)
@@ -122,7 +122,6 @@ DRUNTIME_MULTILIB
 DRUNTIME_WERROR
 DRUNTIME_GC
 DRUNTIME_CPU_SOURCES
-DRUNTIME_OS_UNIX
 DRUNTIME_OS_SOURCES
 DRUNTIME_OS_THREAD_MODEL
 DRUNTIME_OS_ARM_EABI_UNWINDER
index b7e4575e0f1698cc8a86bf0ee3e27d8231737e50..41ccfaa339c8c1206a5ac59922c78bad062e868f 100644 (file)
@@ -47,7 +47,7 @@ else
     DRUNTIME_SOURCES_CONFIGURED += $(DRUNTIME_DSOURCES_GCSTUB)
 endif
 # OS specific sources
-if DRUNTIME_OS_UNIX
+if DRUNTIME_OS_POSIX
     DRUNTIME_SOURCES_CONFIGURED += $(DRUNTIME_DSOURCES_POSIX)
 endif
 if DRUNTIME_OS_DARWIN
index 61dd0d496e3f58d81d6719bf0bdd808ce6b35a70..9277e0a16655c14b3070822f3108c623b47bbfad 100644 (file)
@@ -112,7 +112,7 @@ target_triplet = @target@
 @DRUNTIME_GC_ENABLE_TRUE@am__append_1 = $(DRUNTIME_DSOURCES_GC)
 @DRUNTIME_GC_ENABLE_FALSE@am__append_2 = $(DRUNTIME_DSOURCES_GCSTUB)
 # OS specific sources
-@DRUNTIME_OS_UNIX_TRUE@am__append_3 = $(DRUNTIME_DSOURCES_POSIX)
+@DRUNTIME_OS_POSIX_TRUE@am__append_3 = $(DRUNTIME_DSOURCES_POSIX)
 @DRUNTIME_OS_DARWIN_TRUE@am__append_4 = $(DRUNTIME_DSOURCES_DARWIN)
 @DRUNTIME_OS_DRAGONFLYBSD_TRUE@am__append_5 = $(DRUNTIME_DSOURCES_DRAGONFLYBSD)
 @DRUNTIME_OS_ANDROID_TRUE@am__append_6 = $(DRUNTIME_DSOURCES_BIONIC)
@@ -272,7 +272,7 @@ am__objects_7 = core/sys/posix/aio.lo core/sys/posix/arpa/inet.lo \
        core/sys/posix/syslog.lo core/sys/posix/termios.lo \
        core/sys/posix/time.lo core/sys/posix/ucontext.lo \
        core/sys/posix/unistd.lo core/sys/posix/utime.lo
-@DRUNTIME_OS_UNIX_TRUE@am__objects_8 = $(am__objects_7)
+@DRUNTIME_OS_POSIX_TRUE@am__objects_8 = $(am__objects_7)
 am__objects_9 = core/sys/darwin/crt_externs.lo \
        core/sys/darwin/dlfcn.lo core/sys/darwin/execinfo.lo \
        core/sys/darwin/mach/dyld.lo core/sys/darwin/mach/getsect.lo \
index 74167aa2cdee8bca45d7b34ceaaafdbf42baf927..47d4c6a6c800bf5728f0097edc84a9bb2b8f70a6 100644 (file)
@@ -52,33 +52,12 @@ AC_DEFUN([DRUNTIME_OS_DETECT],
 ])
 
 
-# DRUNTIME_OS_UNIX
-# ----------------
-# Add --enable-unix option or autodetects if system is unix
-# and create the DRUNTIME_OS_UNIX conditional.
-AC_DEFUN([DRUNTIME_OS_UNIX],
-[
-  AC_REQUIRE([DRUNTIME_OS_DETECT])
-  AC_ARG_ENABLE(unix,
-    AC_HELP_STRING([--enable-unix],
-                   [enables Unix runtime (default: yes, for Unix targets)]),
-    :,[enable_unix=auto])
-
-  case "$druntime_cv_target_os" in
-    aix*|*bsd*|cygwin*|darwin*|gnu*|linux*|skyos*|*solaris*|sysv*) d_have_unix=1 ;;
-  esac
-  if test -n "$d_have_unix" && test "$enable_unix" = auto ; then
-    enable_unix=yes
-  fi
-  AM_CONDITIONAL([DRUNTIME_OS_UNIX], [test "$enable_unix" = "yes"])
-])
-
-
 # DRUNTIME_OS_SOURCES
 # -------------------
 # Detect target OS and add DRUNTIME_OS_AIX DRUNTIME_OS_DARWIN
 # DRUNTIME_OS_FREEBSD DRUNTIME_OS_LINUX DRUNTIME_OS_MINGW
 # DRUNTIME_OS_SOLARIS DRUNTIME_OS_OPENBSD conditionals.
+# If the system is posix, add DRUNTIME_OS_POSIX conditional.
 AC_DEFUN([DRUNTIME_OS_SOURCES],
 [
   AC_REQUIRE([DRUNTIME_OS_DETECT])
@@ -130,6 +109,14 @@ AC_DEFUN([DRUNTIME_OS_SOURCES],
                  [test "$druntime_target_os_parsed" = "mingw"])
   AM_CONDITIONAL([DRUNTIME_OS_SOLARIS],
                  [test "$druntime_target_os_parsed" = "solaris"])
+
+  druntime_target_posix="no"
+  case "$druntime_cv_target_os" in
+    aix*|*bsd*|cygwin*|darwin*|gnu*|linux*|skyos*|*solaris*|sysv*)
+      druntime_target_posix="yes"
+      ;;
+  esac
+  AM_CONDITIONAL([DRUNTIME_OS_POSIX], [test "$druntime_target_posix" = "yes"])
 ])