Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
0001-merge-to-https-github.com-linux-usb-gadgets-libusbgx.patch 390 KiB
Newer Older
Robert Nelson's avatar
Robert Nelson committed
From 856e2ae32fe39ba8116cc3870068b383199c2c73 Mon Sep 17 00:00:00 2001
From: Robert Nelson <robertcnelson@gmail.com>
Date: Wed, 17 Apr 2024 13:27:55 -0500
Subject: [PATCH] merge: to
 https://github.com/linux-usb-gadgets/libusbgx/commit/a5bfa81017a9b2064bc449cf74f5f9d106445f62

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
---
 .gitignore                             |   16 +-
 DoxygenLayout.xml                      |    1 -
 LibUsbgxConfig.cmake.in                |   24 +
 Makefile.am                            |    4 +-
 README                                 |    5 +
 configure.ac                           |    9 +-
 examples/Makefile.am                   |    6 +-
 examples/gadget-acm-ecm.c              |    1 +
 examples/gadget-import.c               |    1 +
 examples/gadget-ms.c                   |    3 +
 examples/gadget-printer.c              |  117 +
 examples/gadget-uvc.c                  |  182 +
 examples/gadget-vid-pid-remove.c       |   24 +-
 examples/show-gadgets.c                |    2 +
 examples/show-udcs.c                   |    1 +
 include/usbg/function/ms.h             |   36 +
 include/usbg/function/net.h            |   91 +-
 include/usbg/function/printer.h        |   56 +
 include/usbg/function/uac2.h           |   57 +
 include/usbg/function/uvc.h            |  156 +
 include/usbg/usbg.h                    |    2 +
 include/usbg/usbg_internal_libconfig.h |    1 +
 libusbgx.pc.in                         |    2 +-
 m4/.gitignore                          |    2 +
 m4/libtool.m4                          | 8001 ------------------------
 m4/ltoptions.m4                        |  384 --
 m4/ltsugar.m4                          |  123 -
 m4/ltversion.m4                        |   23 -
 m4/lt~obsolete.m4                      |   98 -
 packaging/libusbgx.spec                |    1 +
 src/Makefile.am                        |    4 +-
 src/function/ether.c                   |    3 +
 src/function/hid.c                     |    4 +-
 src/function/midi.c                    |    4 +-
 src/function/ms.c                      |    1 +
 src/function/printer.c                 |   34 +
 src/function/uac2.c                    |   36 +
 src/function/uvc.c                     | 1219 ++++
 src/usbg.c                             |    7 +-
 src/usbg_common.c                      |    2 +
 tests/usbg-test.c                      |   27 +
 41 files changed, 2112 insertions(+), 8658 deletions(-)
 create mode 100644 LibUsbgxConfig.cmake.in
 create mode 100644 examples/gadget-printer.c
 create mode 100644 examples/gadget-uvc.c
 create mode 100644 include/usbg/function/printer.h
 create mode 100644 include/usbg/function/uvc.h
 create mode 100644 m4/.gitignore
 delete mode 100644 m4/libtool.m4
 delete mode 100644 m4/ltoptions.m4
 delete mode 100644 m4/ltsugar.m4
 delete mode 100644 m4/ltversion.m4
 delete mode 100644 m4/lt~obsolete.m4
 create mode 100644 src/function/printer.c
 create mode 100644 src/function/uvc.c

diff --git a/.gitignore b/.gitignore
index 7dfeaed..671c0a4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,12 +1,15 @@
 /examples/*
 !/examples/*.*
-/examples/.deps
-/examples/.libs
-/src/.deps
-/src/.libs
+/examples/.deps/
+/examples/.libs/
+/include/usbg/usbg_version.h
+/src/.deps/
+/src/.libs/
+/src/function/.deps/
+/src/function/.dirstamp
 /tests/*
 !/tests/*.*
-/tests/.deps
+/tests/.deps/
 *.o
 *.lo
 *.la
@@ -26,4 +29,5 @@ Makefile.in
 /missing
 /install-sh
 /doxygen.cfg
-/libusbg.pc
+/libusbgx.pc
+/LibUsbgxConfig.cmake
diff --git a/DoxygenLayout.xml b/DoxygenLayout.xml
index 5b60278..92949fd 100644
--- a/DoxygenLayout.xml
+++ b/DoxygenLayout.xml
@@ -18,7 +18,6 @@
       <tab type="filelist" visible="yes" title="" intro=""/>
       <tab type="globals" visible="yes" title="" intro=""/>
     </tab>
-    <tab type="dirs" visible="yes" title="" intro=""/>
     <tab type="examples" visible="yes" title="" intro=""/>  
   </navindex>
 
diff --git a/LibUsbgxConfig.cmake.in b/LibUsbgxConfig.cmake.in
new file mode 100644
index 0000000..bbef363
--- /dev/null
+++ b/LibUsbgxConfig.cmake.in
@@ -0,0 +1,24 @@
+get_filename_component(LibUsbgx_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+include(CMakeFindDependencyMacro)
+
+# Compute the installation prefix relative to this file.
+get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
+get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
+get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
+get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
+if(_IMPORT_PREFIX STREQUAL "/")
+  set(_IMPORT_PREFIX "")
+endif()
+
+set(LibUsbgx_INCLUDE_DIRS "${_IMPORT_PREFIX}/include")
+
+if(NOT TARGET LibUsbgx::LibUsbgx)
+	add_library(LibUsbgx::LibUsbgx SHARED IMPORTED)
+	set_property(TARGET LibUsbgx::LibUsbgx APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
+
+	set_target_properties(LibUsbgx::LibUsbgx PROPERTIES 
+		IMPORTED_LOCATION "${_IMPORT_PREFIX}/lib/libusbgx.so"
+		INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include")
+endif()
+
+set(LibUsbgx_LIBRARIES LibUsbgx::LibUsbgx)
diff --git a/Makefile.am b/Makefile.am
index a3cc337..c12628b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -14,6 +14,8 @@ EXTRA_DIST = doxygen.cfg
 library_includedir=$(includedir)/usbg
 library_include_HEADERS = include/usbg/usbg.h include/usbg/usbg_version.h
 function_includedir=$(includedir)/usbg/function
-function_include_HEADERS = include/usbg/function/ffs.h include/usbg/function/loopback.h include/usbg/function/midi.h include/usbg/function/ms.h include/usbg/function/net.h include/usbg/function/phonet.h include/usbg/function/serial.h include/usbg/function/hid.h include/usbg/function/uac2.h
+function_include_HEADERS = include/usbg/function/ffs.h include/usbg/function/loopback.h include/usbg/function/midi.h include/usbg/function/ms.h include/usbg/function/net.h include/usbg/function/phonet.h include/usbg/function/serial.h include/usbg/function/hid.h include/usbg/function/uac2.h include/usbg/function/uvc.h include/usbg/function/printer.h
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libusbgx.pc
+cmakeconfigdir = $(libdir)/cmake/LibUsbgx
+cmakeconfig_DATA = LibUsbgxConfig.cmake
diff --git a/README b/README
index 08622a3..8f84e3e 100644
--- a/README
+++ b/README
@@ -12,8 +12,13 @@ See the Doxygen docs and examples for complete details on the
 programming API and INSTALL for installation of the library and
 examples.
 
+The library is licensed under the GNU LGPL-2.1 (or later) and
+the examples are licensed under the GNU GPL-2.0 (or later).
+
 To run the examples:
 
+$ modprobe configfs
+$ modprobe libcomposite
 $ mount -t configfs none /sys/kernel/config
 $ gadget-acm-ecm
 $ show-gadgets
diff --git a/configure.ac b/configure.ac
index 5a59b2b..3995556 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,18 +36,23 @@ AS_IF([test "x$with_libconfig" = xyes], [
 			    AC_DEFINE(HAVE_LIBCONFIG_15, 1, [detected libconfig equal to or greater than 1.5]),
 			    AC_DEFINE(HAVE_LIBCONFIG_15, 0, []))
 			  ])
+	libconfig_req="libconfig"
 	CFLAGS="$CFLAGS $LIBCONFIG_CFLAGS"
 	LIBS="$LIBS $LIBCONFIG_LIBS"
 ], [
+	libconfig_req=""
 	enable_gadget_schemes=no
 ])
 
+REQUIRES="$libconfig_req"
+
+AC_SUBST([REQUIRES])
+
 AM_CONDITIONAL(BUILD_EXAMPLES, [test "x$enable_examples" = xyes])
 
 AS_IF([test "x$enable_tests" = xyes], [
 	PKG_CHECK_MODULES([CMOCKA], [cmocka >= 1.0.0],
 			  AC_DEFINE(HAS_CMOCKA, 1, [detected cmocka]))
-	AC_CONFIG_FILES([tests/Makefile])
 ])
 AM_CONDITIONAL(BUILD_TESTS, [test "x$enable_tests" = xyes])
 
@@ -56,6 +61,6 @@ AS_IF([test "x$enable_gadget_schemes" = xyes],
Robert Nelson's avatar
Robert Nelson committed
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200
 AM_CONDITIONAL(TEST_GADGET_SCHEMES, [test "x$enable_gadget_schemes" != xno])
 
 LT_INIT
-AC_CONFIG_FILES([Makefile src/Makefile examples/Makefile include/usbg/usbg_version.h libusbgx.pc doxygen.cfg])
+AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile examples/Makefile include/usbg/usbg_version.h libusbgx.pc doxygen.cfg LibUsbgxConfig.cmake])
 DX_INIT_DOXYGEN([$PACKAGE_NAME],[doxygen.cfg])
 AC_OUTPUT
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 9934321..a5961eb 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -1,11 +1,13 @@
-bin_PROGRAMS = show-gadgets gadget-acm-ecm gadget-vid-pid-remove gadget-ffs gadget-export gadget-import show-udcs gadget-ms gadget-midi gadget-hid gadget-rndis-os-desc gadget-uac2
+bin_PROGRAMS = show-gadgets gadget-acm-ecm gadget-vid-pid-remove gadget-uvc gadget-ffs gadget-export gadget-import show-udcs gadget-ms gadget-midi gadget-hid gadget-rndis-os-desc gadget-uac2 gadget-printer
 gadget_acm_ecm_SOURCES = gadget-acm-ecm.c
+gadget_uvc_SOURCES = gadget-uvc.c
 show_gadgets_SOURCES = show-gadgets.c
 gadget_vid_pid_remove_SOURCES = gadget-vid-pid-remove.c
 gadget_ffs_SOURCES = gadget-ffs.c
 gadget_export_SOURCE = gadget-export.c
 gadget_import_SOURCE = gadget-import.c
 gadget_rndis_os_desc_SOURCES = gadget-rndis-os-desc.c
+gadget_printer_SOURCE = gadget_printer.c
 show_udcs_SOURCE = show-udcs.c
-AM_CPPFLAGS=-I$(top_srcdir)/include/
+AM_CPPFLAGS=-I$(top_srcdir)/include/ -I$(top_builddir)/include/usbg
 AM_LDFLAGS=-L../src/ -lusbgx
diff --git a/examples/gadget-acm-ecm.c b/examples/gadget-acm-ecm.c
index 1c5e2ca..29360da 100644
--- a/examples/gadget-acm-ecm.c
+++ b/examples/gadget-acm-ecm.c
@@ -20,6 +20,7 @@
 
 #include <errno.h>
 #include <stdio.h>
+#include <sys/sysmacros.h>
 #include <linux/usb/ch9.h>
 #include <usbg/usbg.h>
 
diff --git a/examples/gadget-import.c b/examples/gadget-import.c
index e684fdb..63df449 100644
--- a/examples/gadget-import.c
+++ b/examples/gadget-import.c
@@ -25,6 +25,7 @@
 #include <errno.h>
 #include <string.h>
 #include <stdio.h>
+#include <sys/sysmacros.h>
 #include <usbg/usbg.h>
 
 int main(int argc, char **argv)
diff --git a/examples/gadget-ms.c b/examples/gadget-ms.c
index 478c370..09fd212 100644
--- a/examples/gadget-ms.c
+++ b/examples/gadget-ms.c
@@ -23,6 +23,7 @@
 
 #include <errno.h>
 #include <stdio.h>
+#include <sys/sysmacros.h>
 #include <linux/usb/ch9.h>
 #include <usbg/usbg.h>
 #include <usbg/function/ms.h>
@@ -64,6 +65,7 @@ int main(int argc, char **argv)
 			.nofua = 0,
 			.removable = 1,
 			.file = "",
+			.inquiry_string = "Empty"
 		}, {
 			.id = -1, /* allows to place in any position */
 			.cdrom = 0,
@@ -71,6 +73,7 @@ int main(int argc, char **argv)
 			.nofua = 0,
 			.removable = 1,
 			.file = argv[1],
+			.inquiry_string = "Non-empty"
 		}
 	};
 
diff --git a/examples/gadget-printer.c b/examples/gadget-printer.c
new file mode 100644
index 0000000..4ba0b49
--- /dev/null
+++ b/examples/gadget-printer.c
@@ -0,0 +1,117 @@
+/*
+ * Copyright (C) 2021
+ *
+ * Aristo Chen <wmchen.aristo@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include <errno.h>
+#include <stdio.h>
+#include <linux/usb/ch9.h>
+#include <usbg/usbg.h>
+#include <usbg/function/printer.h>
+
+#define VENDOR 0x1d6b
+#define PRODUCT 0x0104
+
+int main(void)
+{
+	usbg_state *s;
+	usbg_gadget *g;
+	usbg_config *c;
+	usbg_function *f_printer;
+	int ret = -EINVAL;
+	int usbg_ret;
+
+	struct usbg_gadget_attrs g_attrs = {
+		.bcdUSB = 0x0200,
+		.bDeviceClass = USB_CLASS_PER_INTERFACE,
+		.bDeviceSubClass = 0x00,
+		.bDeviceProtocol = 0x00,
+		.bMaxPacketSize0 = 64, /* Max allowed ep0 packet size */
+		.idVendor = VENDOR,
+		.idProduct = PRODUCT,
+		.bcdDevice = 0x0001, /* Verson of device */
+	};
+
+	struct usbg_gadget_strs g_strs = {
+		.serial = "0123456789",		/* Serial number */
+		.manufacturer = "Foo Inc.", /* Manufacturer */
+		.product = "Bar Gadget"		/* Product string */
+	};
+
+	struct usbg_config_strs c_strs = {
+		.configuration = "PRINTER"};
+
+	usbg_ret = usbg_init("/sys/kernel/config", &s);
+	if (usbg_ret != USBG_SUCCESS)
+	{
+		fprintf(stderr, "Error on USB gadget init\n");
+		fprintf(stderr, "Error: %s : %s\n", usbg_error_name(usbg_ret),
+				usbg_strerror(usbg_ret));
+		goto out1;
+	}
+
+	usbg_ret = usbg_create_gadget(s, "g1", &g_attrs, &g_strs, &g);
+	if (usbg_ret != USBG_SUCCESS)
+	{
+		fprintf(stderr, "Error on create gadget\n");
+		fprintf(stderr, "Error: %s : %s\n", usbg_error_name(usbg_ret),
+				usbg_strerror(usbg_ret));
+		goto out2;
+	}
+
+	usbg_ret = usbg_create_function(g, USBG_F_PRINTER, "usb0", NULL, &f_printer);
+	if (usbg_ret != USBG_SUCCESS)
+	{
+		fprintf(stderr, "Error creating printer function\n");
+		fprintf(stderr, "Error: %s : %s\n", usbg_error_name(usbg_ret),
+				usbg_strerror(usbg_ret));
+		goto out2;
+	}
+
+	/* NULL can be passed to use kernel defaults */
+	usbg_ret = usbg_create_config(g, 1, "The only one", NULL, &c_strs, &c);
+	if (usbg_ret != USBG_SUCCESS)
+	{
+		fprintf(stderr, "Error creating config\n");
+		fprintf(stderr, "Error: %s : %s\n", usbg_error_name(usbg_ret),
+				usbg_strerror(usbg_ret));
+		goto out2;
+	}
+
+	usbg_ret = usbg_add_config_function(c, "printer.1", f_printer);
+	if (usbg_ret != USBG_SUCCESS)
+	{
+		fprintf(stderr, "Error adding function\n");
+		fprintf(stderr, "Error: %s : %s\n", usbg_error_name(usbg_ret),
+				usbg_strerror(usbg_ret));
+		goto out2;
+	}
+
+	usbg_ret = usbg_enable_gadget(g, DEFAULT_UDC);
+	if (usbg_ret != USBG_SUCCESS)
+	{
+		fprintf(stderr, "Error enabling gadget\n");
+		fprintf(stderr, "Error: %s : %s\n", usbg_error_name(usbg_ret),
+				usbg_strerror(usbg_ret));
+		goto out2;
+	}
+
+	ret = 0;
+
+out2:
+	usbg_cleanup(s);
+
+out1:
+	return ret;
+}
diff --git a/examples/gadget-uvc.c b/examples/gadget-uvc.c
new file mode 100644
index 0000000..e61a505
--- /dev/null
+++ b/examples/gadget-uvc.c
@@ -0,0 +1,182 @@
+/*
+ * Copyright (C) 2021 Pengutronix
+ *
+ * Michael Grzeschik <mgr@pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include <errno.h>
+#include <stdio.h>
+#include <sys/sysmacros.h>
+#include <linux/usb/ch9.h>
+#include <usbg/usbg.h>
+#include <usbg/function/uvc.h>
+
+/**
+ * @file gadget-uvc.c
+ * @example gadget-uvc.c
+ * This is an example of how to create an UVC gadget device.
+ */
+
+#define VENDOR		0x1d6b
+#define PRODUCT		0x0104
+
+int main(void)
+{
+	usbg_state *s;
+	usbg_gadget *g;
+	usbg_config *c;
+	usbg_function *f_uvc;
+	int ret = -EINVAL;
+	int usbg_ret;
+
+	struct usbg_gadget_attrs g_attrs = {
+		.bcdUSB = 0x0200,
+		.bDeviceClass =	USB_CLASS_PER_INTERFACE,
+		.bDeviceSubClass = 0x00,
+		.bDeviceProtocol = 0x00,
+		.bMaxPacketSize0 = 64, /* Max allowed ep0 packet size */
+		.idVendor = VENDOR,
+		.idProduct = PRODUCT,
+		.bcdDevice = 0x0001, /* Verson of device */
+	};
+
+	struct usbg_gadget_strs g_strs = {
+		.serial = "0123456789", /* Serial number */
+		.manufacturer = "Foo Inc.", /* Manufacturer */
+		.product = "Bar Gadget" /* Product string */
+	};
+
+	struct usbg_config_strs c_strs = {
+		.configuration = "UVC"
+	};
+
+	struct usbg_f_uvc_frame_attrs uvc_frame_attrs_array[] = {
+		{
+			.bFrameIndex = 1,
+			.dwFrameInterval = 2000000,
+			.wHeight = 480,
+			.wWidth = 640,
+		}, {
+			.bFrameIndex = 2,
+			.dwFrameInterval = 2000000,
+			.wHeight = 1080,
+			.wWidth = 1920,
+		}, {
+			.bFrameIndex = 3,
+			.dwFrameInterval = 333333,
+			.wHeight = 1080,
+			.wWidth = 1920,
+		}, {
+			.bFrameIndex = 4,
+			.dwFrameInterval = 333333,
+			.wHeight = 2160,
+			.wWidth = 3840,
+		}
+	};
+
+	struct usbg_f_uvc_frame_attrs *uvc_frame_mjpeg_attrs[] = {
+		&uvc_frame_attrs_array[0],
+		&uvc_frame_attrs_array[1],
+		&uvc_frame_attrs_array[2],
+		&uvc_frame_attrs_array[3],
+		NULL,
+	};
+
+	struct usbg_f_uvc_frame_attrs *uvc_frame_uncompressed_attrs[] = {
+		&uvc_frame_attrs_array[0],
+		&uvc_frame_attrs_array[1],
+		&uvc_frame_attrs_array[2],
+		&uvc_frame_attrs_array[3],
+		NULL,
+	};
+
+	struct usbg_f_uvc_format_attrs uvc_format_attrs_array[] = {
+		{
+			.frames = uvc_frame_mjpeg_attrs,
+			.format = "mjpeg/m",
+			.bDefaultFrameIndex = 3,
+		}, {
+			.frames = uvc_frame_uncompressed_attrs,
+			.format = "uncompressed/u",
+			.bDefaultFrameIndex = 2,
+		}
+	};
+
+	struct usbg_f_uvc_format_attrs *uvc_format_attrs[] = {
+		&uvc_format_attrs_array[0],
+		&uvc_format_attrs_array[1],
+		NULL,
+	};
+
+	struct usbg_f_uvc_attrs uvc_attrs = {
+		.formats = uvc_format_attrs,
+	};
+
+	usbg_ret = usbg_init("/sys/kernel/config", &s);
+	if (usbg_ret != USBG_SUCCESS) {
+		fprintf(stderr, "Error on USB gadget init\n");
+		fprintf(stderr, "Error: %s : %s\n", usbg_error_name(usbg_ret),
+				usbg_strerror(usbg_ret));
+		goto out1;
+	}
+
+	usbg_ret = usbg_create_gadget(s, "g1", &g_attrs, &g_strs, &g);
+	if (usbg_ret != USBG_SUCCESS) {
+		fprintf(stderr, "Error on create gadget\n");
+		fprintf(stderr, "Error: %s : %s\n", usbg_error_name(usbg_ret),
+				usbg_strerror(usbg_ret));
+		goto out2;
+	}
+
+        usbg_ret = usbg_create_function(g, USBG_F_UVC, "uvc", &uvc_attrs, &f_uvc);
+        if(usbg_ret != USBG_SUCCESS)
+        {
+		fprintf(stderr, "Error creating uvc function\n");
+		fprintf(stderr, "Error: %s : %s\n", usbg_error_name(usbg_ret),
+				usbg_strerror(usbg_ret));
+		goto out2;
+	}
+
+	/* NULL can be passed to use kernel defaults */
+	usbg_ret = usbg_create_config(g, 1, "The only one", NULL, &c_strs, &c);
+	if (usbg_ret != USBG_SUCCESS) {
+		fprintf(stderr, "Error creating config\n");
+		fprintf(stderr, "Error: %s : %s\n", usbg_error_name(usbg_ret),
+				usbg_strerror(usbg_ret));
+		goto out2;
+	}
+
+        usbg_ret = usbg_add_config_function(c, "uvc.cam", f_uvc);
+	if (usbg_ret != USBG_SUCCESS) {
+		fprintf(stderr, "Error adding acm.GS0\n");
+		fprintf(stderr, "Error: %s : %s\n", usbg_error_name(usbg_ret),
+				usbg_strerror(usbg_ret));
+		goto out2;
+	}
+
+	usbg_ret = usbg_enable_gadget(g, DEFAULT_UDC);
+	if (usbg_ret != USBG_SUCCESS) {
+		fprintf(stderr, "Error enabling gadget\n");
+		fprintf(stderr, "Error: %s : %s\n", usbg_error_name(usbg_ret),
+				usbg_strerror(usbg_ret));
+		goto out2;
+	}
+
+	ret = 0;
+
+out2:
+	usbg_cleanup(s);
+
+out1:
+	return ret;
+}
diff --git a/examples/gadget-vid-pid-remove.c b/examples/gadget-vid-pid-remove.c
index f6b950b..dd3879b 100644
--- a/examples/gadget-vid-pid-remove.c
+++ b/examples/gadget-vid-pid-remove.c
@@ -23,6 +23,8 @@
 
 #include <errno.h>
 #include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
 #include <usbg/usbg.h>
 
 #define VENDOR		0x1d6b
@@ -60,13 +62,29 @@ out:
 	return usbg_ret;
 }
 
-int main(void)
+int main(int argc, char **argv)
 {
 	int usbg_ret;
 	int ret = -EINVAL;
 	usbg_state *s;
 	usbg_gadget *g;
 	struct usbg_gadget_attrs g_attrs;
+	char *cp;
+	int vendor = VENDOR, product = PRODUCT;
+
+	if (argc >= 2) {
+		cp = strchr(argv[1], ':');
+		if (!cp) {
+			ret = -EINVAL;
+			fprintf(stderr, "Usage: gadget-vid-pid-remove vid:pid\n");
+			goto out1;
+		}
+		*cp++ = 0;
+		if (&argv[1])
+			vendor = strtoul(argv[1], NULL, 16);
+		if (*cp)
+			product = strtoul(cp, NULL, 16);
+	}
 
 	usbg_ret = usbg_init("/sys/kernel/config", &s);
 	if (usbg_ret != USBG_SUCCESS) {
@@ -88,7 +106,7 @@ int main(void)
 		}
 
 		/* Compare attrs with given values and remove if suitable */
-		if (g_attrs.idVendor == VENDOR && g_attrs.idProduct == PRODUCT) {
+		if (g_attrs.idVendor == vendor && g_attrs.idProduct == product) {
 			usbg_gadget *g_next = usbg_get_next_gadget(g);
 
 			usbg_ret = remove_gadget(g);
@@ -101,6 +119,8 @@ int main(void)
 		}
 	}
 
+	ret = 0;
+
 out2:
 	usbg_cleanup(s);
 out1:
diff --git a/examples/show-gadgets.c b/examples/show-gadgets.c
index 707d448..0f2058b 100644
--- a/examples/show-gadgets.c
+++ b/examples/show-gadgets.c
@@ -21,6 +21,7 @@
 #include <errno.h>
 #include <stdio.h>
 #include <string.h>
+#include <sys/sysmacros.h>
 #include <netinet/ether.h>
 #include <usbg/usbg.h>
 #include <usbg/function/ms.h>
@@ -197,6 +198,7 @@ void show_function(usbg_function *f)
 			fprintf(stdout, "      nofua\t\t%d\n", attrs->luns[i]->nofua);
 			fprintf(stdout, "      removable\t\t%d\n", attrs->luns[i]->removable);
 			fprintf(stdout, "      file\t\t%s\n", attrs->luns[i]->file);
+			fprintf(stdout, "      inquiry_string\t\t%s\n", attrs->luns[i]->inquiry_string);
 		}
 		break;
 	}
diff --git a/examples/show-udcs.c b/examples/show-udcs.c
index 66e950f..2f5cc45 100644
--- a/examples/show-udcs.c
+++ b/examples/show-udcs.c
@@ -23,6 +23,7 @@
 
 #include <errno.h>
 #include <stdio.h>
+#include <sys/sysmacros.h>
 #include <usbg/usbg.h>
 
 int main(void)
diff --git a/include/usbg/function/ms.h b/include/usbg/function/ms.h
index 780464c..0715d38 100644
--- a/include/usbg/function/ms.h
+++ b/include/usbg/function/ms.h
@@ -30,6 +30,7 @@ struct usbg_f_ms_lun_attrs {
 	bool nofua;
 	bool removable;
 	const char *file;
+	const char *inquiry_string;
 };
 
 struct usbg_f_ms_attrs {
@@ -45,6 +46,7 @@ enum usbg_f_ms_lun_attr {
 	USBG_F_MS_LUN_NOFUA,
 	USBG_F_MS_LUN_REMOVABLE,
 	USBG_F_MS_LUN_FILE,
+	USBG_F_MS_LUN_INQUIRY_STRING,
 	USBG_F_MS_LUN_ATTR_MAX
 };
 
@@ -54,6 +56,7 @@ union usbg_f_ms_lun_attr_val {
 	bool nofua;
 	bool removable;
 	const char *file;
+	const char *inquiry_string;
 };
 
 #define USBG_F_MS_LUN_BOOL_TO_ATTR_VAL(WHAT)		\
@@ -132,6 +135,8 @@ static inline void usbg_f_ms_cleanup_lun_attrs(struct usbg_f_ms_lun_attrs *lattr
 	if (lattrs) {
 		free((char *)lattrs->file);
 		lattrs->file = NULL;
+		free((char *)lattrs->inquiry_string);
+		lattrs->inquiry_string = NULL;
 	}
 }
 
@@ -317,6 +322,37 @@ static inline int usbg_f_ms_set_lun_file(usbg_f_ms *mf, int lun_id,
 					  USBG_F_MS_LUN_CCHAR_PTR_TO_ATTR_VAL(file));
 }
 
+/**
+ * @brief Get the inquiry string of LUN which is used as name in SCSI inquiry
+ *         by this LUN into newly allocated storage
+ * @param[in] mf Pointer to ms function
+ * @param[in] lun_id ID of lun
+ * @param[out] inquiry_string Newly allocated string name of LUN used in SCSI
+ *         inquiry
+ * @return 0 on success usbg_error if error occurred.
+ * @note returned inquiry_string should be free() by caller
+ */
+static inline int usbg_f_ms_get_lun_inquiry_string(usbg_f_ms *mf, int lun_id,
+			       char **inquiry_string)
+{
+	return usbg_f_ms_get_lun_attr_val(mf, lun_id, USBG_F_MS_LUN_INQUIRY_STRING,
+					  (union usbg_f_ms_lun_attr_val *)inquiry_string);
+}
+
+/**
+ * @brief Set the inquiry string which is used as name in SCSI inquiry by this LUN
+ * @param[in] mf Pointer to ms function
+ * @param[in] lun_id ID of lun
+ * @param[in] inquiry_string Name of LUN which used in SCSI inquiry
+ * @return 0 on success usbg_error if error occurred.
+ */
+static inline int usbg_f_ms_set_lun_inquiry_string(usbg_f_ms *mf, int lun_id,
+			   const char *inquiry_string)
+{
+	return usbg_f_ms_set_lun_attr_val(mf, lun_id, USBG_F_MS_LUN_INQUIRY_STRING,
+					  USBG_F_MS_LUN_CCHAR_PTR_TO_ATTR_VAL(inquiry_string));
+}
+
 /**
  * @brief Get attributes of given ms function
  * @param[in] mf Pointer to ms function
diff --git a/include/usbg/function/net.h b/include/usbg/function/net.h
index 646736b..b0409f1 100644
--- a/include/usbg/function/net.h
+++ b/include/usbg/function/net.h
@@ -29,6 +29,9 @@ struct usbg_f_net_attrs {
 	struct ether_addr host_addr;
 	const char *ifname;
 	int qmult;
+	unsigned int class_;
+	unsigned int subclass;
+	unsigned int protocol;
 };
 
 enum usbg_f_net_attr {
@@ -37,6 +40,9 @@ enum usbg_f_net_attr {
 	USBG_F_NET_HOST_ADDR,
 	USBG_F_NET_IFNAME,
 	USBG_F_NET_QMULT,
+	USBG_F_NET_CLASS,
+	USBG_F_NET_SUBCLASS,
+	USBG_F_NET_PROTOCOL,
 	USBG_F_NET_ATTR_MAX
 };
 
@@ -45,6 +51,9 @@ union usbg_f_net_attr_val {
 	struct ether_addr host_addr;
 	const char *ifname;
 	int qmult;
+	unsigned int class_;
+	unsigned int subclass;
+	unsigned int protocol;
 };
 
 #define USBG_F_NET_ETHER_ADDR_TO_ATTR_VAL(WHAT)		\
@@ -127,8 +136,8 @@ int usbg_f_net_set_attr_val(usbg_f_net *nf, enum usbg_f_net_attr attr,
 static inline int usbg_f_net_get_dev_addr(usbg_f_net *nf,
 					  struct ether_addr *addr)
 {
-	return usbg_f_net_get_attr_val(nf, USBG_F_NET_DEV_ADDR,
-				       (union usbg_f_net_attr_val *)addr);
+	union usbg_f_net_attr_val val = { .dev_addr = *addr, };
+	return usbg_f_net_get_attr_val(nf, USBG_F_NET_DEV_ADDR, &val);
 }
 
 /**
@@ -153,12 +162,12 @@ static inline int usbg_f_net_set_dev_addr(usbg_f_net *nf,
 static inline int usbg_f_net_get_host_addr(usbg_f_net *nf,
 					   struct ether_addr *addr)
 {
-	return usbg_f_net_get_attr_val(nf, USBG_F_NET_HOST_ADDR,
-				       (union usbg_f_net_attr_val *)addr);
+	union usbg_f_net_attr_val val = { .host_addr = *addr, };
+	return usbg_f_net_get_attr_val(nf, USBG_F_NET_HOST_ADDR, &val);
 }
 
 /**
- * @brief Set the value of device side MAC address
+ * @brief Set the value of host side MAC address
  * @param[in] nf Pointer to net function
  * @param[in] val Value of attribute which should be set
  * @return 0 on success usbg_error if error occurred.
@@ -221,6 +230,78 @@ static inline int usbg_f_net_set_qmult(usbg_f_net *nf, int qmult)
 				       USBG_F_NET_INT_TO_ATTR_VAL(qmult));
 }
 
+/**
+ * @brief Get the value of usb function class
+ * @param[in] nf Pointer to net function
+ * @param[out] class_ Current class identification
+ * @return 0 on success usbg_error if error occurred.
+ */
+static inline int usbg_f_net_get_class(usbg_f_net *nf, unsigned int *class_)
+{
+	return usbg_f_net_get_attr_val(nf, USBG_F_NET_CLASS,
+				       (union usbg_f_net_attr_val *)class_);
+}
+
+/**
+ * @brief Set the value of usb function class
+ * @param[in] nf Pointer to net function
+ * @param[in] class_ Class identification
+ * @return 0 on success usbg_error if error occurred.
+ */
+static inline int usbg_f_net_set_class(usbg_f_net *nf, unsigned int class_)
+{
+	return usbg_f_net_set_attr_val(nf, USBG_F_NET_CLASS,
+				       USBG_F_NET_INT_TO_ATTR_VAL(class_));
+}
+
+/**
+ * @brief Get the value of usb function subclass
+ * @param[in] nf Pointer to net function
+ * @param[out] subclass Current subclass identification
+ * @return 0 on success usbg_error if error occurred.
+ */
+static inline int usbg_f_net_get_subclass(usbg_f_net *nf, int *subclass)
+{
+	return usbg_f_net_get_attr_val(nf, USBG_F_NET_SUBCLASS,
+				       (union usbg_f_net_attr_val *)subclass);
+}
+
+/**
+ * @brief Set the value of usb function subclass
+ * @param[in] nf Pointer to net function
+ * @param[in] subclass Subclass identification
+ * @return 0 on success usbg_error if error occurred.
+ */
+static inline int usbg_f_net_set_subclass(usbg_f_net *nf, unsigned int subclass)
+{
+	return usbg_f_net_set_attr_val(nf, USBG_F_NET_SUBCLASS,
+				       USBG_F_NET_INT_TO_ATTR_VAL(subclass));
+}
+
+/**
+ * @brief Get the value of usb function protocol
+ * @param[in] nf Pointer to net function
+ * @param[out] protocol Current protocol identification
+ * @return 0 on success usbg_error if error occurred.
+ */
+static inline int usbg_f_net_get_protocol(usbg_f_net *nf, int *protocol)
+{
+	return usbg_f_net_get_attr_val(nf, USBG_F_NET_PROTOCOL,
+				       (union usbg_f_net_attr_val *)protocol);
+}
+
+/**
+ * @brief Set the value of usb function protocol
+ * @param[in] nf Pointer to net function
+ * @param[in] protocol protocol identification
+ * @return 0 on success usbg_error if error occurred.
+ */
+static inline int usbg_f_net_set_protocol(usbg_f_net *nf, unsigned int protocol)
+{
+	return usbg_f_net_set_attr_val(nf, USBG_F_NET_PROTOCOL,
+				       USBG_F_NET_INT_TO_ATTR_VAL(protocol));
+}
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/usbg/function/printer.h b/include/usbg/function/printer.h
new file mode 100644
index 0000000..b556f39
--- /dev/null
+++ b/include/usbg/function/printer.h
@@ -0,0 +1,56 @@
+/*
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ */
+
+#ifndef USBG_FUNCTION_PRINTER__
+#define USBG_FUNCTION_PRINTER__
+
+#include <usbg/usbg.h>
+
+#include <malloc.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+struct usbg_f_printer;
+typedef struct usbg_f_printer usbg_f_printer;
+
+struct usbg_f_printer_attrs {
+	const char *pnp_string;
+	int q_len;
+};
+
+enum usbg_f_printer_attr {
+	USBG_F_PRINTER_ATTR_MIN = 0,
+	USBG_F_PRINTER_PNP_STRING = USBG_F_PRINTER_ATTR_MIN,
+	USBG_F_PRINTER_Q_LEN,
+	USBG_F_PRINTER_ATTR_MAX
+};
+
+union usbg_f_printer_attr_val {
+	const char *pnp_string;
+	int q_len;
+};
+
+#define USBG_F_PRINTER_ETHER_ADDR_TO_ATTR_VAL(WHAT) \
+	USBG_TO_UNION(usbg_f_printer_attr_val, dev_addr, WHAT)
+
+#define USBG_F_PRINTER_INT_TO_ATTR_VAL(WHAT) \
+	USBG_TO_UNION(usbg_f_printer_attr_val, qmult, WHAT)
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* USBG_FUNCTION_PRINTER__ */
diff --git a/include/usbg/function/uac2.h b/include/usbg/function/uac2.h
index c1bbb14..6fc4d24 100644
--- a/include/usbg/function/uac2.h
+++ b/include/usbg/function/uac2.h
@@ -31,6 +31,26 @@ struct usbg_f_uac2_attrs {
 	int p_chmask;
 	int p_srate;
 	int p_ssize;
+	unsigned char p_hs_bint;
+	unsigned char c_hs_bint;
+
+	const char * c_sync;
+	unsigned int req_number;
+	unsigned int fb_max;
+
+	bool p_mute_present;
+	bool p_volume_present;
+	short p_volume_min;
+	short p_volume_max;
+	short p_volume_res;
+
+	bool c_mute_present;
+	bool c_volume_present;
+	short c_volume_min;
+	short c_volume_max;
+	short c_volume_res;
+
+	const char *function_name;
 };
 
 enum usbg_f_uac2_attr {
@@ -41,6 +61,22 @@ enum usbg_f_uac2_attr {
 	USBG_F_UAC2_P_CHMASK,
 	USBG_F_UAC2_P_SRATE,
 	USBG_F_UAC2_P_SSIZE,
+	USBG_F_UAC2_P_HS_BINT,
+	USBG_F_UAC2_C_HS_BINT,
+	USBG_F_UAC2_C_SYNC,
+	USBG_F_UAC2_REQ_NUMBER,
+	USBG_F_UAC2_FB_MAX,
+	USBG_F_UAC2_P_MUTE_PRESENT,
+	USBG_F_UAC2_P_VOLUME_PRESENT,
+	USBG_F_UAC2_P_VOLUME_MIN,
+	USBG_F_UAC2_P_VOLUME_MAX,
+	USBG_F_UAC2_P_VOLUME_RES,
+	USBG_F_UAC2_C_MUTE_PRESENT,
+	USBG_F_UAC2_C_VOLUME_PRESENT,
+	USBG_F_UAC2_C_VOLUME_MIN,
+	USBG_F_UAC2_C_VOLUME_MAX,
+	USBG_F_UAC2_C_VOLUME_RES,
+	USBG_F_UAC2_FUNCTION_NAME,
 	USBG_F_UAC2_ATTR_MAX
 };
 
@@ -51,6 +87,27 @@ union usbg_f_uac2_attr_val {
 	int p_chmask;
 	int p_srate;
 	int p_ssize;
+
+	char p_hs_bint;
+	char c_hs_bint;
+
+	const char * c_sync;
+	unsigned int req_number;
+	unsigned int fb_max;
+
+	bool p_mute_present;
+	bool p_volume_present;
+	int p_volume_min;
+	int p_volume_max;
+	int p_volume_res;
+
+	bool c_mute_present;
+	bool c_volume_present;
+	int c_volume_min;
+	int c_volume_max;
+	int c_volume_res;
+
+	const char * function_name;
 };
 
 #define USBG_F_UAC2_INT_TO_ATTR_VAL(WHAT)			\
diff --git a/include/usbg/function/uvc.h b/include/usbg/function/uvc.h
new file mode 100644
index 0000000..7e91da3
--- /dev/null
+++ b/include/usbg/function/uvc.h
@@ -0,0 +1,156 @@
+/*
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ */
+
+#ifndef USBG_FUNCTION_UVC__
+#define USBG_FUNCTION_UVC__
+
+#include <usbg/usbg.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct usbg_f_uvc;
+typedef struct usbg_f_uvc usbg_f_uvc;
+
+struct usbg_f_uvc_config_attrs
+{
+	int streaming_maxburst;
+	int streaming_maxpacket;
+	int streaming_interval;
+	const char *function_name;
+};
+
+struct usbg_f_uvc_frame_attrs
+{
+	int bFrameIndex;
+	int bmCapabilities;
+	int dwMinBitRate;
+	int dwMaxBitRate;
+	int dwMaxVideoFrameBufferSize;
+	int dwDefaultFrameInterval;
+	int dwFrameInterval;
+	int wWidth;
+	int wHeight;
+};
+
+struct usbg_f_uvc_format_attrs
+{
+	int bmaControls;
+	int bFormatIndex;
+	int bDefaultFrameIndex;
+	int bAspectRatioX;
+	int bAspectRatioY;
+	int bmInterfaceFlags;
+	const char *format;
+	struct usbg_f_uvc_frame_attrs **frames;
+};
+
+struct usbg_f_uvc_attrs
+{
+	struct usbg_f_uvc_format_attrs **formats;
+};
+
+enum usbg_f_uvc_config_attr {
+	USBG_F_UVC_CONFIG_ATTR_MIN = 0,
+	USBG_F_UVC_CONFIG_MAXBURST = USBG_F_UVC_CONFIG_ATTR_MIN,
+	USBG_F_UVC_CONFIG_MAXPACKET,
+	USBG_F_UVC_CONFIG_INTERVAL,
+	USBG_F_UVC_CONFIG_FUNCTION_NAME,
+	USBG_F_UVC_CONFIG_ATTR_MAX
+};
+
+enum usbg_f_uvc_frame_attr {
+	USBG_F_UVC_FRAME_ATTR_MIN = 0,
+	USBG_F_UVC_FRAME_INDEX = USBG_F_UVC_FRAME_ATTR_MIN,
+	USBG_F_UVC_FRAME_CAPABILITIES,
+	USBG_F_UVC_FRAME_MIN_BITRATE,
+	USBG_F_UVC_FRAME_MAX_BITRATE,
+	USBG_F_UVC_FRAME_MAX_VIDEO_BUFFERSIZE,
+	USBG_F_UVC_FRAME_DEFAULT_INTERVAL,
+	USBG_F_UVC_FRAME_INTERVAL,
+	USBG_F_UVC_FRAME_HEIGHT,
+	USBG_F_UVC_FRAME_WIDTH,
+	USBG_F_UVC_FRAME_ATTR_MAX
+};
+
+enum usbg_f_uvc_format_attr {
+	USBG_F_UVC_FORMAT_ATTR_MIN = 0,
+	USBG_F_UVC_FORMAT_CONTROLS = USBG_F_UVC_FORMAT_ATTR_MIN,
+	USBG_F_UVC_FORMAT_INTERFACE_FLAGS,
+	USBG_F_UVC_FORMAT_ASPECTRATIO_Y,
+	USBG_F_UVC_FORMAT_ASPECTRATIO_X,
+	USBG_F_UVC_FORMAT_DEFAULT_FRAME_INDEX,
+	USBG_F_UVC_FORMAT_FORMAT_INDEX,
+	USBG_F_UVC_FORMAT_ATTR_MAX
+};
+
+union usbg_f_uvc_config_attr_val {
+	int streaming_maxburst;
+	int streaming_maxpacket;
+	int streaming_interval;
+	const char *function_name;
+};
+
+union usbg_f_uvc_frame_attr_val {
+	int bmCapabilities;
+	int dwMinBitRate;
+	int dwMaxBitRate;
+	int dwMaxVideoFrameBufferSize;
+	int dwDefaultFrameInterval;
+	int dwFrameInterval;
+	int wWidth;
+	int wHeight;
+};
+
+union usbg_f_uvc_format_attr_val {
+	int bmaControls;
+	int bFormatIndex;
+	int bDefaultFrameIndex;
+	int bAspectRatioX;
+	int bAspectRatioY;
+	int bmInterfaceFlags;
+};
+
+/**
+ * @brief Cast from generic function to uvc function
+ * @param[in] f function to be converted to uvc funciton.
+ *         Should be one of types:
+ *         ecm, subset, ncm, eem, rndis
+ * @return Converted uvc function or NULL if function hasn't suitable type
+ */
+usbg_f_uvc *usbg_to_uvc_function(usbg_function *f);
+
+/**
+ * @brief Cast form uvc function to generic one
+ * @param[in] uvc function to be converted to generic one
+ * @return Generic usbg function
+ */
+usbg_function *usbg_from_uvc_function(usbg_f_uvc *ff);
+
+/**
+ * @brief Cleanup attributes structure after usage
+ * @param[in] attrs to be cleaned up
+ */
+static inline void usbg_f_uvc_cleanup_attrs(struct usbg_f_uvc_attrs *attrs)
+{
+}
+
+int usbg_f_uvc_get_attrs(usbg_f_uvc *uvcf, struct usbg_f_uvc_attrs *attrs);
+int usbg_f_uvc_set_attrs(usbg_f_uvc *uvcf, const struct usbg_f_uvc_attrs *attrs);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* USBG_FUNCTION_UVC__ */
diff --git a/include/usbg/usbg.h b/include/usbg/usbg.h
index 55c52a1..552848b 100644
--- a/include/usbg/usbg.h
+++ b/include/usbg/usbg.h
@@ -219,6 +219,8 @@ typedef enum
 	USBG_F_LOOPBACK,
 	USBG_F_HID,
 	USBG_F_UAC2,
+	USBG_F_UVC,
+	USBG_F_PRINTER,
 	USBG_FUNCTION_TYPE_MAX,
 } usbg_function_type;
 
diff --git a/include/usbg/usbg_internal_libconfig.h b/include/usbg/usbg_internal_libconfig.h
index ac51758..3fa55c0 100644
--- a/include/usbg/usbg_internal_libconfig.h
+++ b/include/usbg/usbg_internal_libconfig.h
@@ -12,6 +12,7 @@
 #ifndef USBG_INTERNAL_LIBCONFIG_H
 #define USBG_INTERNAL_LIBCONFIG_H
 
+#include <sys/sysmacros.h>
 #include <libconfig.h>
 #ifdef __cplusplus
 extern "C" {
diff --git a/libusbgx.pc.in b/libusbgx.pc.in
index c591658..60e4093 100644
--- a/libusbgx.pc.in
+++ b/libusbgx.pc.in
@@ -5,7 +5,7 @@ includedir=@includedir@
 
 Name: libusbgx
 Description: USB gadget-configfs library
-Requires: libconfig
+Requires: @REQUIRES@
 Version: @PACKAGE_VERSION@
 Libs: -L${libdir} -lusbgx
 Cflags: -I${includedir}
diff --git a/m4/.gitignore b/m4/.gitignore
new file mode 100644
index 0000000..c96a04f
--- /dev/null
+++ b/m4/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
\ No newline at end of file
diff --git a/m4/libtool.m4 b/m4/libtool.m4
deleted file mode 100644
index 828104c..0000000
--- a/m4/libtool.m4
+++ /dev/null
@@ -1,8001 +0,0 @@
-# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
-#
-#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-#                 Foundation, Inc.
-#   Written by Gordon Matzigkeit, 1996
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-m4_define([_LT_COPYING], [dnl
-#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-#                 Foundation, Inc.
-#   Written by Gordon Matzigkeit, 1996
-#
-#   This file is part of GNU Libtool.
-#
-# GNU Libtool is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# As a special exception to the GNU General Public License,
-# if you distribute this file as part of a program or library that
-# is built using GNU Libtool, you may include this file under the
-# same distribution terms that you use for the rest of that program.
-#
-# GNU Libtool is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Libtool; see the file COPYING.  If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
-# obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-])
-
-# serial 57 LT_INIT
-
-
-# LT_PREREQ(VERSION)
-# ------------------
-# Complain and exit if this libtool version is less that VERSION.
-m4_defun([LT_PREREQ],
-[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
-       [m4_default([$3],
-		   [m4_fatal([Libtool version $1 or higher is required],
-		             63)])],
-       [$2])])
-
-
-# _LT_CHECK_BUILDDIR
-# ------------------
-# Complain if the absolute build directory name contains unusual characters
-m4_defun([_LT_CHECK_BUILDDIR],
-[case `pwd` in
-  *\ * | *\	*)
-    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
-esac
-])
-
-
-# LT_INIT([OPTIONS])
-# ------------------
-AC_DEFUN([LT_INIT],
-[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
-AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
-AC_BEFORE([$0], [LT_LANG])dnl
-AC_BEFORE([$0], [LT_OUTPUT])dnl
-AC_BEFORE([$0], [LTDL_INIT])dnl
-m4_require([_LT_CHECK_BUILDDIR])dnl
-
-dnl Autoconf doesn't catch unexpanded LT_ macros by default:
-m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
-m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
-dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
-dnl unless we require an AC_DEFUNed macro:
-AC_REQUIRE([LTOPTIONS_VERSION])dnl
-AC_REQUIRE([LTSUGAR_VERSION])dnl
-AC_REQUIRE([LTVERSION_VERSION])dnl
-AC_REQUIRE([LTOBSOLETE_VERSION])dnl
-m4_require([_LT_PROG_LTMAIN])dnl
-
-_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
-
-dnl Parse OPTIONS
-_LT_SET_OPTIONS([$0], [$1])
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ltmain"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
-
-_LT_SETUP
-
-# Only expand once:
-m4_define([LT_INIT])
-])# LT_INIT
-
-# Old names:
-AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
-AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
-dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
-
-
-# _LT_CC_BASENAME(CC)
-# -------------------
-# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
-m4_defun([_LT_CC_BASENAME],
-[for cc_temp in $1""; do
-  case $cc_temp in
-    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
-    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
-])
-
-
-# _LT_FILEUTILS_DEFAULTS
-# ----------------------
-# It is okay to use these file commands and assume they have been set
-# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
-m4_defun([_LT_FILEUTILS_DEFAULTS],
-[: ${CP="cp -f"}
-: ${MV="mv -f"}
-: ${RM="rm -f"}
-])# _LT_FILEUTILS_DEFAULTS
-
-
-# _LT_SETUP
-# ---------
-m4_defun([_LT_SETUP],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
-AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
-
-_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
-dnl
-_LT_DECL([], [host_alias], [0], [The host system])dnl
-_LT_DECL([], [host], [0])dnl
-_LT_DECL([], [host_os], [0])dnl
-dnl
-_LT_DECL([], [build_alias], [0], [The build system])dnl
-_LT_DECL([], [build], [0])dnl
-_LT_DECL([], [build_os], [0])dnl
-dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([LT_PATH_LD])dnl
-AC_REQUIRE([LT_PATH_NM])dnl
-dnl
-AC_REQUIRE([AC_PROG_LN_S])dnl
-test -z "$LN_S" && LN_S="ln -s"
-_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
-dnl
-AC_REQUIRE([LT_CMD_MAX_LEN])dnl
-_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
-_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
-dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_CHECK_SHELL_FEATURES])dnl
-m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
-m4_require([_LT_CMD_RELOAD])dnl
-m4_require([_LT_CHECK_MAGIC_METHOD])dnl
-m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
-m4_require([_LT_CMD_OLD_ARCHIVE])dnl
-m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
-m4_require([_LT_WITH_SYSROOT])dnl
-
-_LT_CONFIG_LIBTOOL_INIT([
-# See if we are running on zsh, and set the options which allow our
-# commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}" ; then
-   setopt NO_GLOB_SUBST
-fi
-])
-if test -n "${ZSH_VERSION+set}" ; then
-   setopt NO_GLOB_SUBST
-fi
-
-_LT_CHECK_OBJDIR
-
-m4_require([_LT_TAG_COMPILER])dnl
-
-case $host_os in
-aix3*)
-  # AIX sometimes has problems with the GCC collect2 program.  For some
-  # reason, if we set the COLLECT_NAMES environment variable, the problems
-  # vanish in a puff of smoke.
-  if test "X${COLLECT_NAMES+set}" != Xset; then
-    COLLECT_NAMES=
-    export COLLECT_NAMES
-  fi
-  ;;
-esac
-
-# Global variables:
-ofile=libtool
-can_build_shared=yes
-
-# All known linkers require a `.a' archive for static linking (except MSVC,
-# which needs '.lib').
-libext=a
-
-with_gnu_ld="$lt_cv_prog_gnu_ld"
-
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
-
-# Set sane defaults for various variables
-test -z "$CC" && CC=cc
-test -z "$LTCC" && LTCC=$CC
-test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
-test -z "$LD" && LD=ld
-test -z "$ac_objext" && ac_objext=o
-
-_LT_CC_BASENAME([$compiler])
-
-# Only perform the check for file, if the check method requires it
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-case $deplibs_check_method in
-file_magic*)
-  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
-    _LT_PATH_MAGIC
-  fi
-  ;;
-esac
-
-# Use C for the default configuration in the libtool script
-LT_SUPPORTED_TAG([CC])
-_LT_LANG_C_CONFIG
-_LT_LANG_DEFAULT_CONFIG
-_LT_CONFIG_COMMANDS
-])# _LT_SETUP
-
-
-# _LT_PREPARE_SED_QUOTE_VARS
-# --------------------------
-# Define a few sed substitution that help us do robust quoting.
-m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
-[# Backslashify metacharacters that are still active within
-# double-quoted strings.
-sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\([["`\\]]\)/\\\1/g'
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Sed substitution to delay expansion of an escaped single quote.
-delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-])
-
-# _LT_PROG_LTMAIN
-# ---------------
-# Note that this code is called both from `configure', and `config.status'
-# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
-# `config.status' has no value for ac_aux_dir unless we are using Automake,
-# so we pass a copy along to make sure it has a sensible value anyway.
-m4_defun([_LT_PROG_LTMAIN],
-[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
-_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
-ltmain="$ac_aux_dir/ltmain.sh"
-])# _LT_PROG_LTMAIN
-
-
-## ------------------------------------- ##
-## Accumulate code for creating libtool. ##
-## ------------------------------------- ##
-
-# So that we can recreate a full libtool script including additional
-# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
-# in macros and then make a single call at the end using the `libtool'
-# label.
-
-
-# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
-# ----------------------------------------
-# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
-m4_define([_LT_CONFIG_LIBTOOL_INIT],
-[m4_ifval([$1],
-          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
-                     [$1
-])])])
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_INIT])
-
-
-# _LT_CONFIG_LIBTOOL([COMMANDS])
-# ------------------------------
-# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
-m4_define([_LT_CONFIG_LIBTOOL],
-[m4_ifval([$1],
-          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
-                     [$1
-])])])
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
-
-
-# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
-# -----------------------------------------------------
-m4_defun([_LT_CONFIG_SAVE_COMMANDS],
-[_LT_CONFIG_LIBTOOL([$1])
-_LT_CONFIG_LIBTOOL_INIT([$2])
-])
-
-
-# _LT_FORMAT_COMMENT([COMMENT])
-# -----------------------------
-# Add leading comment marks to the start of each line, and a trailing
-# full-stop to the whole comment if one is not present already.
-m4_define([_LT_FORMAT_COMMENT],
-[m4_ifval([$1], [
-m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
-              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
-)])
-
-
-
-## ------------------------ ##
-## FIXME: Eliminate VARNAME ##
-## ------------------------ ##
-
-
-# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
-# -------------------------------------------------------------------
-# CONFIGNAME is the name given to the value in the libtool script.
-# VARNAME is the (base) name used in the configure script.
-# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
-# VARNAME.  Any other value will be used directly.
-m4_define([_LT_DECL],
-[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
-    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
-	[m4_ifval([$1], [$1], [$2])])
-    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
-    m4_ifval([$4],
-	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
-    lt_dict_add_subkey([lt_decl_dict], [$2],
-	[tagged?], [m4_ifval([$5], [yes], [no])])])
-])
-
-
-# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
-# --------------------------------------------------------
-m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
-
-
-# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
-# ------------------------------------------------
-m4_define([lt_decl_tag_varnames],
-[_lt_decl_filter([tagged?], [yes], $@)])
-
-
-# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
-# ---------------------------------------------------------
-m4_define([_lt_decl_filter],
-[m4_case([$#],
-  [0], [m4_fatal([$0: too few arguments: $#])],
-  [1], [m4_fatal([$0: too few arguments: $#: $1])],
-  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
-  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
-  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
-])
-
-
-# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
-# --------------------------------------------------
-m4_define([lt_decl_quote_varnames],
-[_lt_decl_filter([value], [1], $@)])
-
-
-# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
-# ---------------------------------------------------
-m4_define([lt_decl_dquote_varnames],
-[_lt_decl_filter([value], [2], $@)])
-
-
-# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
-# ---------------------------------------------------
-m4_define([lt_decl_varnames_tagged],
-[m4_assert([$# <= 2])dnl
-_$0(m4_quote(m4_default([$1], [[, ]])),
-    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
-    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
-m4_define([_lt_decl_varnames_tagged],
-[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
-
-
-# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
-# ------------------------------------------------
-m4_define([lt_decl_all_varnames],
-[_$0(m4_quote(m4_default([$1], [[, ]])),
-     m4_if([$2], [],
-	   m4_quote(lt_decl_varnames),
-	m4_quote(m4_shift($@))))[]dnl
-])
-m4_define([_lt_decl_all_varnames],
-[lt_join($@, lt_decl_varnames_tagged([$1],
-			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
-])
-
-
-# _LT_CONFIG_STATUS_DECLARE([VARNAME])
-# ------------------------------------
-# Quote a variable value, and forward it to `config.status' so that its
-# declaration there will have the same value as in `configure'.  VARNAME
-# must have a single quote delimited value for this to work.
-m4_define([_LT_CONFIG_STATUS_DECLARE],
-[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
-
-
-# _LT_CONFIG_STATUS_DECLARATIONS
-# ------------------------------
-# We delimit libtool config variables with single quotes, so when
-# we write them to config.status, we have to be sure to quote all
-# embedded single quotes properly.  In configure, this macro expands
-# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
-#
-#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
-m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
-[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
-    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
-
-
-# _LT_LIBTOOL_TAGS
-# ----------------
-# Output comment and list of tags supported by the script
-m4_defun([_LT_LIBTOOL_TAGS],
-[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
-available_tags="_LT_TAGS"dnl
-])
-
-
-# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
-# -----------------------------------
-# Extract the dictionary values for VARNAME (optionally with TAG) and
-# expand to a commented shell variable setting:
-#
-#    # Some comment about what VAR is for.
-#    visible_name=$lt_internal_name
-m4_define([_LT_LIBTOOL_DECLARE],
-[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
-					   [description])))[]dnl
-m4_pushdef([_libtool_name],
-    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
-m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
-    [0], [_libtool_name=[$]$1],
-    [1], [_libtool_name=$lt_[]$1],
-    [2], [_libtool_name=$lt_[]$1],
-    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
-m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
-])
-
-
-# _LT_LIBTOOL_CONFIG_VARS
-# -----------------------
-# Produce commented declarations of non-tagged libtool config variables
-# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
-# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
-# section) are produced by _LT_LIBTOOL_TAG_VARS.
-m4_defun([_LT_LIBTOOL_CONFIG_VARS],
-[m4_foreach([_lt_var],
-    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
-    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
-
-
-# _LT_LIBTOOL_TAG_VARS(TAG)
-# -------------------------
-m4_define([_LT_LIBTOOL_TAG_VARS],
-[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
-    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
-
-
-# _LT_TAGVAR(VARNAME, [TAGNAME])
-# ------------------------------
-m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
-
-
-# _LT_CONFIG_COMMANDS
-# -------------------
-# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
-# variables for single and double quote escaping we saved from calls
-# to _LT_DECL, we can put quote escaped variables declarations
-# into `config.status', and then the shell code to quote escape them in
-# for loops in `config.status'.  Finally, any additional code accumulated
-# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
-m4_defun([_LT_CONFIG_COMMANDS],
-[AC_PROVIDE_IFELSE([LT_OUTPUT],
-	dnl If the libtool generation code has been placed in $CONFIG_LT,
-	dnl instead of duplicating it all over again into config.status,
-	dnl then we will have config.status run $CONFIG_LT later, so it
-	dnl needs to know what name is stored there:
-        [AC_CONFIG_COMMANDS([libtool],
-            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
-    dnl If the libtool generation code is destined for config.status,
-    dnl expand the accumulated commands and init code now:
-    [AC_CONFIG_COMMANDS([libtool],
-        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
-])#_LT_CONFIG_COMMANDS
-
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
-[
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-sed_quote_subst='$sed_quote_subst'
-double_quote_subst='$double_quote_subst'
-delay_variable_subst='$delay_variable_subst'
-_LT_CONFIG_STATUS_DECLARATIONS
-LTCC='$LTCC'
-LTCFLAGS='$LTCFLAGS'
-compiler='$compiler_DEFAULT'
-
-# A function that is used when there is no print builtin or printf.
-func_fallback_echo ()
-{
-  eval 'cat <<_LTECHO_EOF
-\$[]1
-_LTECHO_EOF'
-}
-
-# Quote evaled strings.
-for var in lt_decl_all_varnames([[ \
-]], lt_decl_quote_varnames); do
-    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
-    *[[\\\\\\\`\\"\\\$]]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
-      ;;
-    *)
-      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
-      ;;
-    esac
-done
-
-# Double-quote double-evaled strings.
-for var in lt_decl_all_varnames([[ \
-]], lt_decl_dquote_varnames); do
-    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
-    *[[\\\\\\\`\\"\\\$]]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
-      ;;
-    *)
-      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
-      ;;
-    esac
-done
-
-_LT_OUTPUT_LIBTOOL_INIT
-])
-
-# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
-# ------------------------------------
-# Generate a child script FILE with all initialization necessary to
-# reuse the environment learned by the parent script, and make the
-# file executable.  If COMMENT is supplied, it is inserted after the
-# `#!' sequence but before initialization text begins.  After this
-# macro, additional text can be appended to FILE to form the body of
-# the child script.  The macro ends with non-zero status if the
-# file could not be fully written (such as if the disk is full).
-m4_ifdef([AS_INIT_GENERATED],
-[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
-[m4_defun([_LT_GENERATED_FILE_INIT],
-[m4_require([AS_PREPARE])]dnl
-[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
-[lt_write_fail=0
-cat >$1 <<_ASEOF || lt_write_fail=1
-#! $SHELL
-# Generated by $as_me.
-$2
-SHELL=\${CONFIG_SHELL-$SHELL}
-export SHELL
-_ASEOF
-cat >>$1 <<\_ASEOF || lt_write_fail=1
-AS_SHELL_SANITIZE
-_AS_PREPARE
-exec AS_MESSAGE_FD>&1
-_ASEOF
-test $lt_write_fail = 0 && chmod +x $1[]dnl
-m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
-
-# LT_OUTPUT
-# ---------
-# This macro allows early generation of the libtool script (before
-# AC_OUTPUT is called), incase it is used in configure for compilation
-# tests.
-AC_DEFUN([LT_OUTPUT],
-[: ${CONFIG_LT=./config.lt}
-AC_MSG_NOTICE([creating $CONFIG_LT])
-_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
-[# Run this file to recreate a libtool stub with the current configuration.])
-
-cat >>"$CONFIG_LT" <<\_LTEOF
-lt_cl_silent=false
-exec AS_MESSAGE_LOG_FD>>config.log
-{
-  echo
-  AS_BOX([Running $as_me.])
-} >&AS_MESSAGE_LOG_FD
-
-lt_cl_help="\
-\`$as_me' creates a local libtool stub from the current configuration,
-for use in further configure time tests before the real libtool is
-generated.
-
-Usage: $[0] [[OPTIONS]]
-
-  -h, --help      print this help, then exit
-  -V, --version   print version number, then exit
-  -q, --quiet     do not print progress messages
-  -d, --debug     don't remove temporary files
-
-Report bugs to <bug-libtool@gnu.org>."
-
-lt_cl_version="\
-m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
-m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
-configured by $[0], generated by m4_PACKAGE_STRING.
-
-Copyright (C) 2011 Free Software Foundation, Inc.
-This config.lt script is free software; the Free Software Foundation
-gives unlimited permision to copy, distribute and modify it."
-
-while test $[#] != 0
-do
-  case $[1] in
-    --version | --v* | -V )
-      echo "$lt_cl_version"; exit 0 ;;
-    --help | --h* | -h )
-      echo "$lt_cl_help"; exit 0 ;;
-    --debug | --d* | -d )
-      debug=: ;;
-    --quiet | --q* | --silent | --s* | -q )
-      lt_cl_silent=: ;;
-
-    -*) AC_MSG_ERROR([unrecognized option: $[1]
-Try \`$[0] --help' for more information.]) ;;
-
-    *) AC_MSG_ERROR([unrecognized argument: $[1]
-Try \`$[0] --help' for more information.]) ;;
-  esac
-  shift
-done
-
-if $lt_cl_silent; then
-  exec AS_MESSAGE_FD>/dev/null
-fi
-_LTEOF
-
-cat >>"$CONFIG_LT" <<_LTEOF
-_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
-_LTEOF
-
-cat >>"$CONFIG_LT" <<\_LTEOF
-AC_MSG_NOTICE([creating $ofile])
-_LT_OUTPUT_LIBTOOL_COMMANDS
-AS_EXIT(0)
-_LTEOF
-chmod +x "$CONFIG_LT"
-
-# configure is writing to config.log, but config.lt does its own redirection,
-# appending to config.log, which fails on DOS, as config.log is still kept
-# open by configure.  Here we exec the FD to /dev/null, effectively closing
-# config.log, so it can be properly (re)opened and appended to by config.lt.
-lt_cl_success=:
-test "$silent" = yes &&
-  lt_config_lt_args="$lt_config_lt_args --quiet"
-exec AS_MESSAGE_LOG_FD>/dev/null
-$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
-exec AS_MESSAGE_LOG_FD>>config.log
-$lt_cl_success || AS_EXIT(1)
-])# LT_OUTPUT
-
-
-# _LT_CONFIG(TAG)
-# ---------------
-# If TAG is the built-in tag, create an initial libtool script with a
-# default configuration from the untagged config vars.  Otherwise add code
-# to config.status for appending the configuration named by TAG from the
-# matching tagged config vars.
-m4_defun([_LT_CONFIG],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-_LT_CONFIG_SAVE_COMMANDS([
-  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
-  m4_if(_LT_TAG, [C], [
-    # See if we are running on zsh, and set the options which allow our
-    # commands through without removal of \ escapes.
-    if test -n "${ZSH_VERSION+set}" ; then
-      setopt NO_GLOB_SUBST
-    fi
-
-    cfgfile="${ofile}T"
-    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
-    $RM "$cfgfile"
-
-    cat <<_LT_EOF >> "$cfgfile"
-#! $SHELL
-
-# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-_LT_COPYING
-_LT_LIBTOOL_TAGS
-
-# ### BEGIN LIBTOOL CONFIG
-_LT_LIBTOOL_CONFIG_VARS
-_LT_LIBTOOL_TAG_VARS
-# ### END LIBTOOL CONFIG
-
-_LT_EOF
-
-  case $host_os in
-  aix3*)
-    cat <<\_LT_EOF >> "$cfgfile"
-# AIX sometimes has problems with the GCC collect2 program.  For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
-  COLLECT_NAMES=
-  export COLLECT_NAMES
-fi
-_LT_EOF
-    ;;
-  esac
-
-  _LT_PROG_LTMAIN
-
-  # We use sed instead of cat because bash on DJGPP gets confused if
-  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
-  # text mode, it properly converts lines to CR/LF.  This bash problem
-  # is reportedly fixed, but why not run on old versions too?
-  sed '$q' "$ltmain" >> "$cfgfile" \
-     || (rm -f "$cfgfile"; exit 1)
-
-  _LT_PROG_REPLACE_SHELLFNS
-
-   mv -f "$cfgfile" "$ofile" ||
-    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
-  chmod +x "$ofile"
-],
-[cat <<_LT_EOF >> "$ofile"
-
-dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
-dnl in a comment (ie after a #).
-# ### BEGIN LIBTOOL TAG CONFIG: $1
-_LT_LIBTOOL_TAG_VARS(_LT_TAG)
-# ### END LIBTOOL TAG CONFIG: $1
-_LT_EOF
-])dnl /m4_if
-],
-[m4_if([$1], [], [
-    PACKAGE='$PACKAGE'
-    VERSION='$VERSION'
-    TIMESTAMP='$TIMESTAMP'
-    RM='$RM'
-    ofile='$ofile'], [])
-])dnl /_LT_CONFIG_SAVE_COMMANDS
-])# _LT_CONFIG
-
-
-# LT_SUPPORTED_TAG(TAG)
-# ---------------------
-# Trace this macro to discover what tags are supported by the libtool
-# --tag option, using:
-#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
-AC_DEFUN([LT_SUPPORTED_TAG], [])
-
-
-# C support is built-in for now
-m4_define([_LT_LANG_C_enabled], [])
-m4_define([_LT_TAGS], [])
-
-
-# LT_LANG(LANG)
-# -------------
-# Enable libtool support for the given language if not already enabled.
-AC_DEFUN([LT_LANG],
-[AC_BEFORE([$0], [LT_OUTPUT])dnl
-m4_case([$1],
-  [C],			[_LT_LANG(C)],
-  [C++],		[_LT_LANG(CXX)],
-  [Go],			[_LT_LANG(GO)],
-  [Java],		[_LT_LANG(GCJ)],
-  [Fortran 77],		[_LT_LANG(F77)],
-  [Fortran],		[_LT_LANG(FC)],
-  [Windows Resource],	[_LT_LANG(RC)],
-  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
-    [_LT_LANG($1)],
-    [m4_fatal([$0: unsupported language: "$1"])])])dnl
-])# LT_LANG
-
-
-# _LT_LANG(LANGNAME)
-# ------------------
-m4_defun([_LT_LANG],
-[m4_ifdef([_LT_LANG_]$1[_enabled], [],
-  [LT_SUPPORTED_TAG([$1])dnl
-  m4_append([_LT_TAGS], [$1 ])dnl
-  m4_define([_LT_LANG_]$1[_enabled], [])dnl
-  _LT_LANG_$1_CONFIG($1)])dnl
-])# _LT_LANG
-
-
-m4_ifndef([AC_PROG_GO], [
-############################################################
-# NOTE: This macro has been submitted for inclusion into   #
-#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
-#  a released version of Autoconf we should remove this    #
-#  macro and use it instead.                               #
-############################################################
-m4_defun([AC_PROG_GO],
-[AC_LANG_PUSH(Go)dnl
-AC_ARG_VAR([GOC],     [Go compiler command])dnl
-AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
-_AC_ARG_VAR_LDFLAGS()dnl
-AC_CHECK_TOOL(GOC, gccgo)
-if test -z "$GOC"; then
-  if test -n "$ac_tool_prefix"; then
-    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
-  fi
-fi
-if test -z "$GOC"; then
-  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
-fi
-])#m4_defun
-])#m4_ifndef
-
-
-# _LT_LANG_DEFAULT_CONFIG
-# -----------------------
-m4_defun([_LT_LANG_DEFAULT_CONFIG],
-[AC_PROVIDE_IFELSE([AC_PROG_CXX],
-  [LT_LANG(CXX)],
-  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
-
-AC_PROVIDE_IFELSE([AC_PROG_F77],
-  [LT_LANG(F77)],
-  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
-
-AC_PROVIDE_IFELSE([AC_PROG_FC],
-  [LT_LANG(FC)],
-  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
-
-dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
-dnl pulling things in needlessly.
-AC_PROVIDE_IFELSE([AC_PROG_GCJ],
-  [LT_LANG(GCJ)],
-  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
-    [LT_LANG(GCJ)],
-    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
-      [LT_LANG(GCJ)],
-      [m4_ifdef([AC_PROG_GCJ],
-	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
-       m4_ifdef([A][M_PROG_GCJ],
-	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
-       m4_ifdef([LT_PROG_GCJ],
-	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
-
-AC_PROVIDE_IFELSE([AC_PROG_GO],
-  [LT_LANG(GO)],
-  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
-
-AC_PROVIDE_IFELSE([LT_PROG_RC],
-  [LT_LANG(RC)],
-  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
-])# _LT_LANG_DEFAULT_CONFIG
-
-# Obsolete macros:
-AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
-AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
-AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
-AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
-AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
-dnl AC_DEFUN([AC_LIBTOOL_F77], [])
-dnl AC_DEFUN([AC_LIBTOOL_FC], [])
-dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
-dnl AC_DEFUN([AC_LIBTOOL_RC], [])
-
-
-# _LT_TAG_COMPILER
-# ----------------
-m4_defun([_LT_TAG_COMPILER],
-[AC_REQUIRE([AC_PROG_CC])dnl
-
-_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
-_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
-_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
-_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-])# _LT_TAG_COMPILER
-
-
-# _LT_COMPILER_BOILERPLATE
-# ------------------------
-# Check for compiler boilerplate output or warnings with
-# the simple compiler test code.
-m4_defun([_LT_COMPILER_BOILERPLATE],
-[m4_require([_LT_DECL_SED])dnl
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$RM conftest*
-])# _LT_COMPILER_BOILERPLATE
-
-
-# _LT_LINKER_BOILERPLATE
-# ----------------------
Loading full blame...