Commit 2358a4940b7f9b863fa8084960f40517985df8c1
Committed by
Anthony Liguori
1 parent
2f7bb878
Generate config-host.h from config-host.mak
Generate CONFIG_AUDIO_DRIVERS. Order is important here, because the first driver in the list is the one used by default. Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Showing
3 changed files
with
84 additions
and
58 deletions
audio/audio.c
@@ -37,8 +37,13 @@ | @@ -37,8 +37,13 @@ | ||
37 | 37 | ||
38 | #define SW_NAME(sw) (sw)->name ? (sw)->name : "unknown" | 38 | #define SW_NAME(sw) (sw)->name ? (sw)->name : "unknown" |
39 | 39 | ||
40 | + | ||
41 | +/* Order of CONFIG_AUDIO_DRIVERS is import. | ||
42 | + The 1st one is the one used by default, that is the reason | ||
43 | + that we generate the list. | ||
44 | +*/ | ||
40 | static struct audio_driver *drvtab[] = { | 45 | static struct audio_driver *drvtab[] = { |
41 | - AUDIO_DRIVERS | 46 | + CONFIG_AUDIO_DRIVERS |
42 | &no_audio_driver, | 47 | &no_audio_driver, |
43 | &wav_audio_driver | 48 | &wav_audio_driver |
44 | }; | 49 | }; |
configure
@@ -1486,9 +1486,8 @@ echo "# Automatically generated by configure - do not modify" > $config_host_mak | @@ -1486,9 +1486,8 @@ echo "# Automatically generated by configure - do not modify" > $config_host_mak | ||
1486 | printf "# Configured with:" >> $config_host_mak | 1486 | printf "# Configured with:" >> $config_host_mak |
1487 | printf " '%s'" "$0" "$@" >> $config_host_mak | 1487 | printf " '%s'" "$0" "$@" >> $config_host_mak |
1488 | echo >> $config_host_mak | 1488 | echo >> $config_host_mak |
1489 | -echo "/* Automatically generated by configure - do not modify */" > $config_host_h | ||
1490 | 1489 | ||
1491 | -echo "#define CONFIG_QEMU_SHAREDIR \"$prefix$datasuffix\"" >> $config_host_h | 1490 | +echo "CONFIG_QEMU_SHAREDIR=\"$prefix$datasuffix\"" >> $config_host_mak |
1492 | 1491 | ||
1493 | case "$cpu" in | 1492 | case "$cpu" in |
1494 | i386|x86_64|alpha|cris|hppa|ia64|m68k|microblaze|mips|mips64|ppc|ppc64|s390|sparc|sparc64) | 1493 | i386|x86_64|alpha|cris|hppa|ia64|m68k|microblaze|mips|mips64|ppc|ppc64|s390|sparc|sparc64) |
@@ -1503,26 +1502,21 @@ case "$cpu" in | @@ -1503,26 +1502,21 @@ case "$cpu" in | ||
1503 | ;; | 1502 | ;; |
1504 | esac | 1503 | esac |
1505 | echo "ARCH=$ARCH" >> $config_host_mak | 1504 | echo "ARCH=$ARCH" >> $config_host_mak |
1506 | -arch_name=`echo $ARCH | tr '[:lower:]' '[:upper:]'` | ||
1507 | -echo "#define HOST_$arch_name 1" >> $config_host_h | ||
1508 | - | ||
1509 | if test "$debug_tcg" = "yes" ; then | 1505 | if test "$debug_tcg" = "yes" ; then |
1510 | - echo "#define CONFIG_DEBUG_TCG 1" >> $config_host_h | 1506 | + echo "CONFIG_DEBUG_TCG=y" >> $config_host_mak |
1511 | fi | 1507 | fi |
1512 | if test "$debug" = "yes" ; then | 1508 | if test "$debug" = "yes" ; then |
1513 | - echo "#define CONFIG_DEBUG_EXEC 1" >> $config_host_h | 1509 | + echo "CONFIG_DEBUG_EXEC=y" >> $config_host_mak |
1514 | fi | 1510 | fi |
1515 | if test "$strip_opt" = "yes" ; then | 1511 | if test "$strip_opt" = "yes" ; then |
1516 | echo "STRIP_OPT=-s" >> $config_host_mak | 1512 | echo "STRIP_OPT=-s" >> $config_host_mak |
1517 | fi | 1513 | fi |
1518 | if test "$bigendian" = "yes" ; then | 1514 | if test "$bigendian" = "yes" ; then |
1519 | echo "HOST_WORDS_BIGENDIAN=y" >> $config_host_mak | 1515 | echo "HOST_WORDS_BIGENDIAN=y" >> $config_host_mak |
1520 | - echo "#define HOST_WORDS_BIGENDIAN 1" >> $config_host_h | ||
1521 | fi | 1516 | fi |
1522 | -echo "#define HOST_LONG_BITS $hostlongbits" >> $config_host_h | 1517 | +echo "HOST_LONG_BITS=$hostlongbits" >> $config_host_mak |
1523 | if test "$mingw32" = "yes" ; then | 1518 | if test "$mingw32" = "yes" ; then |
1524 | echo "CONFIG_WIN32=y" >> $config_host_mak | 1519 | echo "CONFIG_WIN32=y" >> $config_host_mak |
1525 | - echo "#define CONFIG_WIN32 1" >> $config_host_h | ||
1526 | else | 1520 | else |
1527 | echo "CONFIG_POSIX=y" >> $config_host_mak | 1521 | echo "CONFIG_POSIX=y" >> $config_host_mak |
1528 | cat > $TMPC << EOF | 1522 | cat > $TMPC << EOF |
@@ -1530,7 +1524,7 @@ else | @@ -1530,7 +1524,7 @@ else | ||
1530 | int main(void) { return bswap_32(0); } | 1524 | int main(void) { return bswap_32(0); } |
1531 | EOF | 1525 | EOF |
1532 | if $cc $ARCH_CFLAGS -o $TMPE $TMPC >/dev/null 2> /dev/null ; then | 1526 | if $cc $ARCH_CFLAGS -o $TMPE $TMPC >/dev/null 2> /dev/null ; then |
1533 | - echo "#define CONFIG_BYTESWAP_H 1" >> $config_host_h | 1527 | + echo "CONFIG_BYTESWAP_H=y" >> $config_host_mak |
1534 | fi | 1528 | fi |
1535 | cat > $TMPC << EOF | 1529 | cat > $TMPC << EOF |
1536 | #include <sys/endian.h> | 1530 | #include <sys/endian.h> |
@@ -1539,62 +1533,51 @@ EOF | @@ -1539,62 +1533,51 @@ EOF | ||
1539 | int main(void) { return bswap32(0); } | 1533 | int main(void) { return bswap32(0); } |
1540 | EOF | 1534 | EOF |
1541 | if $cc $ARCH_CFLAGS -o $TMPE $TMPC >/dev/null 2> /dev/null ; then | 1535 | if $cc $ARCH_CFLAGS -o $TMPE $TMPC >/dev/null 2> /dev/null ; then |
1542 | - echo "#define CONFIG_MACHINE_BSWAP_H 1" >> $config_host_h | 1536 | + echo "CONFIG_MACHINE_BSWAP_H=y" >> $config_host_mak |
1543 | fi | 1537 | fi |
1544 | fi | 1538 | fi |
1545 | 1539 | ||
1546 | if test "$darwin" = "yes" ; then | 1540 | if test "$darwin" = "yes" ; then |
1547 | echo "CONFIG_DARWIN=y" >> $config_host_mak | 1541 | echo "CONFIG_DARWIN=y" >> $config_host_mak |
1548 | - echo "#define CONFIG_DARWIN 1" >> $config_host_h | ||
1549 | fi | 1542 | fi |
1550 | 1543 | ||
1551 | if test "$aix" = "yes" ; then | 1544 | if test "$aix" = "yes" ; then |
1552 | echo "CONFIG_AIX=y" >> $config_host_mak | 1545 | echo "CONFIG_AIX=y" >> $config_host_mak |
1553 | - echo "#define CONFIG_AIX 1" >> $config_host_h | ||
1554 | fi | 1546 | fi |
1555 | 1547 | ||
1556 | if test "$solaris" = "yes" ; then | 1548 | if test "$solaris" = "yes" ; then |
1557 | echo "CONFIG_SOLARIS=y" >> $config_host_mak | 1549 | echo "CONFIG_SOLARIS=y" >> $config_host_mak |
1558 | - echo "#define CONFIG_SOLARIS 1" >> $config_host_h | ||
1559 | - echo "#define CONFIG_SOLARIS_VERSION $solarisrev" >> $config_host_h | 1550 | + echo "CONFIG_SOLARIS_VERSION=$solarisrev" >> $config_host_mak |
1560 | if test "$needs_libsunmath" = "yes" ; then | 1551 | if test "$needs_libsunmath" = "yes" ; then |
1561 | echo "CONFIG_NEEDS_LIBSUNMATH=y" >> $config_host_mak | 1552 | echo "CONFIG_NEEDS_LIBSUNMATH=y" >> $config_host_mak |
1562 | - echo "#define CONFIG_NEEDS_LIBSUNMATH 1" >> $config_host_h | ||
1563 | fi | 1553 | fi |
1564 | fi | 1554 | fi |
1565 | if test -n "$sparc_cpu"; then | 1555 | if test -n "$sparc_cpu"; then |
1566 | echo "CONFIG__sparc_${sparc_cpu}__=y" >> $config_host_mak | 1556 | echo "CONFIG__sparc_${sparc_cpu}__=y" >> $config_host_mak |
1567 | - echo "#define __sparc_${sparc_cpu}__ 1" >> $config_host_h | ||
1568 | fi | 1557 | fi |
1569 | if test "$gprof" = "yes" ; then | 1558 | if test "$gprof" = "yes" ; then |
1570 | echo "TARGET_GPROF=yes" >> $config_host_mak | 1559 | echo "TARGET_GPROF=yes" >> $config_host_mak |
1571 | - echo "#define TARGET_GPROF 1" >> $config_host_h | ||
1572 | fi | 1560 | fi |
1573 | if test "$static" = "yes" ; then | 1561 | if test "$static" = "yes" ; then |
1574 | echo "CONFIG_STATIC=y" >> $config_host_mak | 1562 | echo "CONFIG_STATIC=y" >> $config_host_mak |
1575 | - echo "#define CONFIG_STATIC 1" >> $config_host_h | ||
1576 | LDFLAGS="$LDFLAGS -static" | 1563 | LDFLAGS="$LDFLAGS -static" |
1577 | fi | 1564 | fi |
1578 | if test $profiler = "yes" ; then | 1565 | if test $profiler = "yes" ; then |
1579 | - echo "#define CONFIG_PROFILER 1" >> $config_host_h | 1566 | + echo "CONFIG_PROFILER=y" >> $config_host_mak |
1580 | fi | 1567 | fi |
1581 | if test "$slirp" = "yes" ; then | 1568 | if test "$slirp" = "yes" ; then |
1582 | echo "CONFIG_SLIRP=y" >> $config_host_mak | 1569 | echo "CONFIG_SLIRP=y" >> $config_host_mak |
1583 | - echo "#define CONFIG_SLIRP 1" >> $config_host_h | ||
1584 | fi | 1570 | fi |
1585 | if test "$vde" = "yes" ; then | 1571 | if test "$vde" = "yes" ; then |
1586 | echo "CONFIG_VDE=y" >> $config_host_mak | 1572 | echo "CONFIG_VDE=y" >> $config_host_mak |
1587 | - echo "#define CONFIG_VDE 1" >> $config_host_h | ||
1588 | echo "VDE_LIBS=$vde_libs" >> $config_host_mak | 1573 | echo "VDE_LIBS=$vde_libs" >> $config_host_mak |
1589 | fi | 1574 | fi |
1590 | for card in $audio_card_list; do | 1575 | for card in $audio_card_list; do |
1591 | def=CONFIG_`echo $card | tr '[:lower:]' '[:upper:]'` | 1576 | def=CONFIG_`echo $card | tr '[:lower:]' '[:upper:]'` |
1592 | echo "$def=y" >> $config_host_mak | 1577 | echo "$def=y" >> $config_host_mak |
1593 | - echo "#define $def 1" >> $config_host_h | ||
1594 | done | 1578 | done |
1595 | -echo "#define AUDIO_DRIVERS \\" >> $config_host_h | 1579 | +echo "CONFIG_AUDIO_DRIVERS=$audio_drv_list" >> $config_host_mak |
1596 | for drv in $audio_drv_list; do | 1580 | for drv in $audio_drv_list; do |
1597 | - echo " &${drv}_audio_driver, \\" >>$config_host_h | ||
1598 | def=CONFIG_`echo $drv | tr '[:lower:]' '[:upper:]'` | 1581 | def=CONFIG_`echo $drv | tr '[:lower:]' '[:upper:]'` |
1599 | echo "$def=y" >> $config_host_mak | 1582 | echo "$def=y" >> $config_host_mak |
1600 | if test "$drv" = "fmod"; then | 1583 | if test "$drv" = "fmod"; then |
@@ -1604,32 +1587,25 @@ for drv in $audio_drv_list; do | @@ -1604,32 +1587,25 @@ for drv in $audio_drv_list; do | ||
1604 | echo "OSS_LIBS=$oss_lib" >> $config_host_mak | 1587 | echo "OSS_LIBS=$oss_lib" >> $config_host_mak |
1605 | fi | 1588 | fi |
1606 | done | 1589 | done |
1607 | -echo "" >>$config_host_h | ||
1608 | if test "$mixemu" = "yes" ; then | 1590 | if test "$mixemu" = "yes" ; then |
1609 | echo "CONFIG_MIXEMU=y" >> $config_host_mak | 1591 | echo "CONFIG_MIXEMU=y" >> $config_host_mak |
1610 | - echo "#define CONFIG_MIXEMU 1" >> $config_host_h | ||
1611 | fi | 1592 | fi |
1612 | if test "$vnc_tls" = "yes" ; then | 1593 | if test "$vnc_tls" = "yes" ; then |
1613 | echo "CONFIG_VNC_TLS=y" >> $config_host_mak | 1594 | echo "CONFIG_VNC_TLS=y" >> $config_host_mak |
1614 | echo "VNC_TLS_CFLAGS=$vnc_tls_cflags" >> $config_host_mak | 1595 | echo "VNC_TLS_CFLAGS=$vnc_tls_cflags" >> $config_host_mak |
1615 | echo "VNC_TLS_LIBS=$vnc_tls_libs" >> $config_host_mak | 1596 | echo "VNC_TLS_LIBS=$vnc_tls_libs" >> $config_host_mak |
1616 | - echo "#define CONFIG_VNC_TLS 1" >> $config_host_h | ||
1617 | fi | 1597 | fi |
1618 | if test "$vnc_sasl" = "yes" ; then | 1598 | if test "$vnc_sasl" = "yes" ; then |
1619 | echo "CONFIG_VNC_SASL=y" >> $config_host_mak | 1599 | echo "CONFIG_VNC_SASL=y" >> $config_host_mak |
1620 | echo "VNC_SASL_CFLAGS=$vnc_sasl_cflags" >> $config_host_mak | 1600 | echo "VNC_SASL_CFLAGS=$vnc_sasl_cflags" >> $config_host_mak |
1621 | echo "VNC_SASL_LIBS=$vnc_sasl_libs" >> $config_host_mak | 1601 | echo "VNC_SASL_LIBS=$vnc_sasl_libs" >> $config_host_mak |
1622 | - echo "#define CONFIG_VNC_SASL 1" >> $config_host_h | ||
1623 | fi | 1602 | fi |
1624 | if test "$fnmatch" = "yes" ; then | 1603 | if test "$fnmatch" = "yes" ; then |
1625 | - echo "#define CONFIG_FNMATCH 1" >> $config_host_h | 1604 | + echo "CONFIG_FNMATCH=y" >> $config_host_mak |
1626 | fi | 1605 | fi |
1627 | qemu_version=`head $source_path/VERSION` | 1606 | qemu_version=`head $source_path/VERSION` |
1628 | echo "VERSION=$qemu_version" >>$config_host_mak | 1607 | echo "VERSION=$qemu_version" >>$config_host_mak |
1629 | -echo "#define QEMU_VERSION \"$qemu_version\"" >> $config_host_h | ||
1630 | - | ||
1631 | -echo "#define QEMU_PKGVERSION \"$pkgversion\"" >> $config_host_h | ||
1632 | - | 1608 | +echo "PKGVERSION=$pkgversion" >>$config_host_mak |
1633 | echo "SRC_PATH=$source_path" >> $config_host_mak | 1609 | echo "SRC_PATH=$source_path" >> $config_host_mak |
1634 | if [ "$source_path_used" = "yes" ]; then | 1610 | if [ "$source_path_used" = "yes" ]; then |
1635 | echo "VPATH=$source_path" >> $config_host_mak | 1611 | echo "VPATH=$source_path" >> $config_host_mak |
@@ -1639,84 +1615,75 @@ if [ "$build_docs" = "yes" ] ; then | @@ -1639,84 +1615,75 @@ if [ "$build_docs" = "yes" ] ; then | ||
1639 | echo "BUILD_DOCS=yes" >> $config_host_mak | 1615 | echo "BUILD_DOCS=yes" >> $config_host_mak |
1640 | fi | 1616 | fi |
1641 | if test "$sdl" = "yes" ; then | 1617 | if test "$sdl" = "yes" ; then |
1642 | - echo "#define CONFIG_SDL 1" >> $config_host_h | ||
1643 | echo "CONFIG_SDL=y" >> $config_host_mak | 1618 | echo "CONFIG_SDL=y" >> $config_host_mak |
1644 | echo "SDL_LIBS=$sdl_libs" >> $config_host_mak | 1619 | echo "SDL_LIBS=$sdl_libs" >> $config_host_mak |
1645 | echo "SDL_CFLAGS=$sdl_cflags" >> $config_host_mak | 1620 | echo "SDL_CFLAGS=$sdl_cflags" >> $config_host_mak |
1646 | fi | 1621 | fi |
1647 | if test "$cocoa" = "yes" ; then | 1622 | if test "$cocoa" = "yes" ; then |
1648 | - echo "#define CONFIG_COCOA 1" >> $config_host_h | ||
1649 | echo "CONFIG_COCOA=y" >> $config_host_mak | 1623 | echo "CONFIG_COCOA=y" >> $config_host_mak |
1650 | fi | 1624 | fi |
1651 | if test "$curses" = "yes" ; then | 1625 | if test "$curses" = "yes" ; then |
1652 | - echo "#define CONFIG_CURSES 1" >> $config_host_h | ||
1653 | echo "CONFIG_CURSES=y" >> $config_host_mak | 1626 | echo "CONFIG_CURSES=y" >> $config_host_mak |
1654 | echo "CURSES_LIBS=$curses_libs" >> $config_host_mak | 1627 | echo "CURSES_LIBS=$curses_libs" >> $config_host_mak |
1655 | fi | 1628 | fi |
1656 | if test "$atfile" = "yes" ; then | 1629 | if test "$atfile" = "yes" ; then |
1657 | - echo "#define CONFIG_ATFILE 1" >> $config_host_h | 1630 | + echo "CONFIG_ATFILE=y" >> $config_host_mak |
1658 | fi | 1631 | fi |
1659 | if test "$utimens" = "yes" ; then | 1632 | if test "$utimens" = "yes" ; then |
1660 | - echo "#define CONFIG_UTIMENSAT 1" >> $config_host_h | 1633 | + echo "CONFIG_UTIMENSAT=y" >> $config_host_mak |
1661 | fi | 1634 | fi |
1662 | if test "$pipe2" = "yes" ; then | 1635 | if test "$pipe2" = "yes" ; then |
1663 | - echo "#define CONFIG_PIPE2 1" >> $config_host_h | 1636 | + echo "CONFIG_PIPE2=y" >> $config_host_mak |
1664 | fi | 1637 | fi |
1665 | if test "$splice" = "yes" ; then | 1638 | if test "$splice" = "yes" ; then |
1666 | - echo "#define CONFIG_SPLICE 1" >> $config_host_h | 1639 | + echo "CONFIG_SPLICE=y" >> $config_host_mak |
1667 | fi | 1640 | fi |
1668 | if test "$inotify" = "yes" ; then | 1641 | if test "$inotify" = "yes" ; then |
1669 | - echo "#define CONFIG_INOTIFY 1" >> $config_host_h | 1642 | + echo "CONFIG_INOTIFY=y" >> $config_host_mak |
1670 | fi | 1643 | fi |
1671 | if test "$curl" = "yes" ; then | 1644 | if test "$curl" = "yes" ; then |
1672 | echo "CONFIG_CURL=y" >> $config_host_mak | 1645 | echo "CONFIG_CURL=y" >> $config_host_mak |
1673 | echo "CURL_LIBS=$curl_libs" >> $config_host_mak | 1646 | echo "CURL_LIBS=$curl_libs" >> $config_host_mak |
1674 | - echo "#define CONFIG_CURL 1" >> $config_host_h | ||
1675 | fi | 1647 | fi |
1676 | if test "$brlapi" = "yes" ; then | 1648 | if test "$brlapi" = "yes" ; then |
1677 | echo "CONFIG_BRLAPI=y" >> $config_host_mak | 1649 | echo "CONFIG_BRLAPI=y" >> $config_host_mak |
1678 | - echo "#define CONFIG_BRLAPI 1" >> $config_host_h | ||
1679 | echo "BRLAPI_LIBS=$brlapi_libs" >> $config_host_mak | 1650 | echo "BRLAPI_LIBS=$brlapi_libs" >> $config_host_mak |
1680 | fi | 1651 | fi |
1681 | if test "$bluez" = "yes" ; then | 1652 | if test "$bluez" = "yes" ; then |
1682 | echo "CONFIG_BLUEZ=y" >> $config_host_mak | 1653 | echo "CONFIG_BLUEZ=y" >> $config_host_mak |
1683 | echo "BLUEZ_CFLAGS=$bluez_cflags" >> $config_host_mak | 1654 | echo "BLUEZ_CFLAGS=$bluez_cflags" >> $config_host_mak |
1684 | echo "BLUEZ_LIBS=$bluez_libs" >> $config_host_mak | 1655 | echo "BLUEZ_LIBS=$bluez_libs" >> $config_host_mak |
1685 | - echo "#define CONFIG_BLUEZ 1" >> $config_host_h | ||
1686 | fi | 1656 | fi |
1687 | if test "$xen" = "yes" ; then | 1657 | if test "$xen" = "yes" ; then |
1688 | echo "CONFIG_XEN=y" >> $config_host_mak | 1658 | echo "CONFIG_XEN=y" >> $config_host_mak |
1689 | echo "XEN_LIBS=$xen_libs" >> $config_host_mak | 1659 | echo "XEN_LIBS=$xen_libs" >> $config_host_mak |
1690 | fi | 1660 | fi |
1691 | if test "$aio" = "yes" ; then | 1661 | if test "$aio" = "yes" ; then |
1692 | - echo "#define CONFIG_AIO 1" >> $config_host_h | ||
1693 | echo "CONFIG_AIO=y" >> $config_host_mak | 1662 | echo "CONFIG_AIO=y" >> $config_host_mak |
1694 | fi | 1663 | fi |
1695 | if test "$io_thread" = "yes" ; then | 1664 | if test "$io_thread" = "yes" ; then |
1696 | echo "CONFIG_IOTHREAD=y" >> $config_host_mak | 1665 | echo "CONFIG_IOTHREAD=y" >> $config_host_mak |
1697 | - echo "#define CONFIG_IOTHREAD 1" >> $config_host_h | ||
1698 | fi | 1666 | fi |
1699 | if test "$blobs" = "yes" ; then | 1667 | if test "$blobs" = "yes" ; then |
1700 | echo "INSTALL_BLOBS=yes" >> $config_host_mak | 1668 | echo "INSTALL_BLOBS=yes" >> $config_host_mak |
1701 | fi | 1669 | fi |
1702 | if test "$iovec" = "yes" ; then | 1670 | if test "$iovec" = "yes" ; then |
1703 | - echo "#define CONFIG_IOVEC 1" >> $config_host_h | 1671 | + echo "CONFIG_IOVEC=y" >> $config_host_mak |
1704 | fi | 1672 | fi |
1705 | if test "$preadv" = "yes" ; then | 1673 | if test "$preadv" = "yes" ; then |
1706 | - echo "#define CONFIG_PREADV 1" >> $config_host_h | 1674 | + echo "CONFIG_PREADV=y" >> $config_host_mak |
1707 | fi | 1675 | fi |
1708 | if test "$fdt" = "yes" ; then | 1676 | if test "$fdt" = "yes" ; then |
1709 | echo "CONFIG_FDT=y" >> $config_host_mak | 1677 | echo "CONFIG_FDT=y" >> $config_host_mak |
1710 | - echo "#define CONFIG_FDT 1" >> $config_host_h | ||
1711 | echo "FDT_LIBS=$fdt_libs" >> $config_host_mak | 1678 | echo "FDT_LIBS=$fdt_libs" >> $config_host_mak |
1712 | fi | 1679 | fi |
1713 | 1680 | ||
1714 | # XXX: suppress that | 1681 | # XXX: suppress that |
1715 | if [ "$bsd" = "yes" ] ; then | 1682 | if [ "$bsd" = "yes" ] ; then |
1716 | - echo "#define CONFIG_BSD 1" >> $config_host_h | 1683 | + echo "CONFIG_BSD=y" >> $config_host_mak |
1717 | fi | 1684 | fi |
1718 | 1685 | ||
1719 | -echo "#define CONFIG_UNAME_RELEASE \"$uname_release\"" >> $config_host_h | 1686 | +echo "CONFIG_UNAME_RELEASE=\"$uname_release\"" >> $config_host_mak |
1720 | 1687 | ||
1721 | # USB host support | 1688 | # USB host support |
1722 | case "$usb" in | 1689 | case "$usb" in |
@@ -1803,6 +1770,10 @@ echo "EXESUF=$EXESUF" >> $config_host_mak | @@ -1803,6 +1770,10 @@ echo "EXESUF=$EXESUF" >> $config_host_mak | ||
1803 | echo "PTHREADLIBS=$PTHREADLIBS" >> $config_host_mak | 1770 | echo "PTHREADLIBS=$PTHREADLIBS" >> $config_host_mak |
1804 | echo "CLOCKLIBS=$CLOCKLIBS" >> $config_host_mak | 1771 | echo "CLOCKLIBS=$CLOCKLIBS" >> $config_host_mak |
1805 | 1772 | ||
1773 | +echo "/* Automatically generated by configure - do not modify */" > $config_host_h | ||
1774 | + | ||
1775 | +$source_path/create_config < $config_host_mak >> $config_host_h | ||
1776 | + | ||
1806 | if test -f ${config_host_h}~ ; then | 1777 | if test -f ${config_host_h}~ ; then |
1807 | if cmp -s $config_host_h ${config_host_h}~ ; then | 1778 | if cmp -s $config_host_h ${config_host_h}~ ; then |
1808 | mv ${config_host_h}~ $config_host_h | 1779 | mv ${config_host_h}~ $config_host_h |
@@ -2069,7 +2040,10 @@ if test "$target_bsd_user" = "yes" ; then | @@ -2069,7 +2040,10 @@ if test "$target_bsd_user" = "yes" ; then | ||
2069 | echo "CONFIG_BSD_USER=y" >> $config_mak | 2040 | echo "CONFIG_BSD_USER=y" >> $config_mak |
2070 | fi | 2041 | fi |
2071 | 2042 | ||
2072 | -$source_path/create_config < $config_mak > $config_h | 2043 | +echo "/* Automatically generated by configure - do not modify */" > $config_h |
2044 | +echo "#include \"../config-host.h\"" >> $config_h | ||
2045 | + | ||
2046 | +$source_path/create_config < $config_mak >> $config_h | ||
2073 | 2047 | ||
2074 | if test -f ${config_h}~ ; then | 2048 | if test -f ${config_h}~ ; then |
2075 | if cmp -s $config_h ${config_h}~ ; then | 2049 | if cmp -s $config_h ${config_h}~ ; then |
create_config
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | -echo "/* Automatically generated by configure - do not modify */" | ||
4 | -echo "#include \"../config-host.h\"" | ||
5 | - | ||
6 | while read line; do | 3 | while read line; do |
7 | 4 | ||
8 | case $line in | 5 | case $line in |
6 | + VERSION=*) # configuration | ||
7 | + version=${line#*=} | ||
8 | + echo "#define QEMU_VERSION \"$version\"" | ||
9 | + ;; | ||
10 | + PKGVERSION=*) # configuration | ||
11 | + pkgversion=${line#*=} | ||
12 | + echo "#define QEMU_PKGVERSION \"$pkgversion\"" | ||
13 | + ;; | ||
14 | + ARCH=*) # configuration | ||
15 | + arch=${line#*=} | ||
16 | + arch_name=`echo $arch | tr '[:lower:]' '[:upper:]'` | ||
17 | + echo "#define HOST_$arch_name 1" | ||
18 | + ;; | ||
19 | + CONFIG__sparc_*=y) # configuration | ||
20 | + name=${line%=*} | ||
21 | + name=${name#CONFIG} | ||
22 | + value=${line#*=} | ||
23 | + echo "#define $name $value" | ||
24 | + ;; | ||
25 | + CONFIG_AUDIO_DRIVERS=*) | ||
26 | + drivers=${line#*=} | ||
27 | + echo "#define CONFIG_AUDIO_DRIVERS \\" | ||
28 | + for drv in $drivers; do | ||
29 | + echo " &${drv}_audio_driver,\\" | ||
30 | + done | ||
31 | + echo "" | ||
32 | + ;; | ||
9 | CONFIG_*=y) # configuration | 33 | CONFIG_*=y) # configuration |
10 | name=${line%=*} | 34 | name=${line%=*} |
11 | echo "#define $name 1" | 35 | echo "#define $name 1" |
@@ -15,6 +39,26 @@ case $line in | @@ -15,6 +39,26 @@ case $line in | ||
15 | value=${line#*=} | 39 | value=${line#*=} |
16 | echo "#define $name $value" | 40 | echo "#define $name $value" |
17 | ;; | 41 | ;; |
42 | + ARCH=*) # configuration | ||
43 | + arch=${line#*=} | ||
44 | + arch_name=`echo $arch | tr '[:lower:]' '[:upper:]'` | ||
45 | + echo "#define HOST_$arch_name 1" | ||
46 | + ;; | ||
47 | + HOST_USB=*) | ||
48 | + # do nothing | ||
49 | + ;; | ||
50 | + HOST_CC=*) | ||
51 | + # do nothing | ||
52 | + ;; | ||
53 | + HOST_*=y) # configuration | ||
54 | + name=${line%=*} | ||
55 | + echo "#define $name 1" | ||
56 | + ;; | ||
57 | + HOST_*=*) # configuration | ||
58 | + name=${line%=*} | ||
59 | + value=${line#*=} | ||
60 | + echo "#define $name $value" | ||
61 | + ;; | ||
18 | TARGET_ARCH=*) # configuration | 62 | TARGET_ARCH=*) # configuration |
19 | target_arch=${line#*=} | 63 | target_arch=${line#*=} |
20 | arch_name=`echo $target_arch | tr '[:lower:]' '[:upper:]'` | 64 | arch_name=`echo $target_arch | tr '[:lower:]' '[:upper:]'` |
@@ -37,6 +81,9 @@ case $line in | @@ -37,6 +81,9 @@ case $line in | ||
37 | TARGET_ARCH2=*) | 81 | TARGET_ARCH2=*) |
38 | # do nothing | 82 | # do nothing |
39 | ;; | 83 | ;; |
84 | + TARGET_DIRS=*) | ||
85 | + # do nothing | ||
86 | + ;; | ||
40 | TARGET_*=y) # configuration | 87 | TARGET_*=y) # configuration |
41 | name=${line%=*} | 88 | name=${line%=*} |
42 | echo "#define $name 1" | 89 | echo "#define $name 1" |