]> Git Repo - binutils.git/blobdiff - binutils/configure.in
* COPYING: Update FSF address.
[binutils.git] / binutils / configure.in
index 7c23cd339de81203338fcc271ddf64deb32b95c5..18e930ee938eaefac01c196844e508dafb9414f2 100644 (file)
@@ -11,6 +11,13 @@ AC_ARG_ENABLE(targets,
   no)       enable_targets= ;;
   *)        enable_targets=$enableval ;;
 esac])dnl
+AC_ARG_ENABLE(shared,
+[  --enable-shared         build shared BFD library],
+[case "${enableval}" in
+  yes) shared=true ;;
+  no)  shared=false ;;
+  *)   AC_MSG_ERROR([bad value ${enableval} for BFD shared option]) ;;
+esac])dnl
 
 AC_CONFIG_HEADER(config.h:config.in)
 
@@ -28,6 +35,8 @@ AC_ARG_PROGRAM
 
 HDEFINES=
 LDFLAGS=
+HLDFLAGS=
+RPATH_ENVVAR=LD_LIBRARY_PATH
 
 . ${srcdir}/../bfd/configure.host
 
@@ -35,11 +44,31 @@ AC_PROG_CC
 AC_SUBST(CFLAGS)
 AC_SUBST(HDEFINES)
 AC_SUBST(LDFLAGS)
+AC_SUBST(HLDFLAGS)
+AC_SUBST(RPATH_ENVVAR)
 AR=${AR-ar}
 AC_SUBST(AR)
 AC_PROG_RANLIB
 AC_PROG_INSTALL
 
+# For most hosts we can use a simple definition to pick up the BFD and
+# opcodes libraries.  However, if we are building shared libraries, we
+# need to handle some hosts specially.
+BFDLIB='-L../bfd -lbfd'
+OPCODES='-L../opcodes -lopcodes'
+if test "${shared}" = "true"; then
+  case "${host}" in
+  *-*-sunos*)
+    # On SunOS, we must link against the name we are going to install,
+    # not -lbfd, since SunOS does not support SONAME.
+    BFDLIB='-L../bfd -l`echo bfd | sed '"'"'$(program_transform_name)'"'"'`'
+    OPCODES='-L../opcodes -l`echo opcodes | sed '"'"'$(program_transform_name)'"'"'`'
+    ;;
+  esac
+fi
+AC_SUBST(BFDLIB)
+AC_SUBST(OPCODES)
+
 BFD_CC_FOR_BUILD
 
 AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h)
@@ -80,15 +109,7 @@ if test $bu_cv_header_utime_h = yes; then
   AC_DEFINE(HAVE_GOOD_UTIME_H)
 fi
 
-AC_MSG_CHECKING([whether fprintf must be declared])
-AC_CACHE_VAL(bu_cv_decl_needed_fprintf,
-[AC_TRY_COMPILE([#include <stdio.h>],
-[int (*pfn) = (int (*)) fprintf],
-bu_cv_decl_needed_fprintf=no, bu_cv_decl_needed_fprintf=yes)])
-AC_MSG_RESULT($bu_cv_decl_needed_fprintf)
-if test $bu_cv_decl_needed_fprintf = yes; then
-  AC_DEFINE(NEED_DECLARATION_FPRINTF)
-fi
+BFD_NEED_DECLARATION(fprintf)
 
 BFD_BINARY_FOPEN
 
@@ -152,11 +173,15 @@ changequote([,])dnl
          DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
         ;;
 changequote(,)dnl
-       i[3-6]86-*pe* | i[3-6]86-*-win32)
+       i[3-6]86-*pe* | i[3-6]86-*-cygwin32)
 changequote([,])dnl
          BUILD_DLLTOOL='$(DLLTOOL_PROG)'
          DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
         ;;
+       powerpc*-*-*pe* | powerpc*-*-cygwin32)
+         BUILD_DLLTOOL='$(DLLTOOL_PROG)'
+         DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_PPC"
+        ;;
        esac
     fi
 done
This page took 0.022392 seconds and 4 git commands to generate.