diff --git a/asterisk/AUTHORS.md b/asterisk/AUTHORS.md new file mode 100644 index 00000000..1e7f641b --- /dev/null +++ b/asterisk/AUTHORS.md @@ -0,0 +1,121 @@ +This is the official list of AllStar authors for copyright/atttribution purposes. + +This file is distinct from the CONTRIBUTORS files. +See the latter for an explanation. + +Names should be added to this file under the respective file/module as (note email is optional here. If it +is not listed then it should be included in the header of the corresponding file.) + +> Stacy Olivas, KG7QIN - Updated app_rpt.c to version 0.340. See CHANGESLOG.md for information on changes + +---- + +AllStar is based upon the Asterisk Open Source PBX software by Digium. + +ASL 1.01 and later are based upon Asterisk 1.4.23 which has the following license/copyright: + +``` + /* + * Asterisk -- An open source telephony toolkit. + * + * Copyright (C) 1999 - 2005, Digium, Inc. + * + * Mark Spencer + * + * See http://www.asterisk.org for more information about + * the Asterisk project. Please do not directly contact + * any of the maintainers of this project for assistance; + * the project provides a web site, mailing lists and IRC + * channels for your use. + * + * This program is free software, distributed under the terms of + * the GNU General Public License Version 2. See the LICENSE file + * at the top of the source tree. + */ +``` + +Note: AllStarLink, Inc was assigned Jim Dixon, WB6NIL's copyright by his remaining heir. + +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + +Here is an inevitably incomplete list of AUTHORS for the various pieces of AllStar software +that have submitted patches or code that has been included in the listed modules. + +By virtue of the GNU General Public License (GPL) they hold copyrights to the code +that has been added to the modules listed unless otherwise indicated. + +In many case the individuals listed have made too numerous of contributions to list here. +Refer to the change log on github to find a detailed listing of their contributions. + +Additionally, you may refer to the file CHANGES for a list of changes that have been made +between each version of app_rpt.c released. + +---- + +#### app_rpt.c: + + - Jim Dixon, WB6NIL - Original author + - Steve Rodgers, WA6ZFT - Major contributor to program development + - Steve Heinke, W9SH - Major contributor to program development + - Steve Zingman, N4IRS - Major fixes/updates to software for DIAL and ASL 1.01 release + - Michael Zingman, N4IRR - Major fixes/updates to software for DIAL and ASL 1.01 release + - Adam Paulm KC1KCC - Ported ducking code over from XIPAR release of app_rpt.c + - Stacy Olivas, KG7QIN - bumped version to 0.340. See CHANGELOG.md for complete list for changes. + +#### app_gps.c: + + - Jim Dixon, WB6NIL - Original author + +#### chan_beagle.c: + + - Jim Dixon, WB6NIL - Original author + - Steve Zingman, N4IRS - Major fixes/updates to software for DIAL and ASL 1.01 release + - Michael Zingman, N4IRR - Major fixes/updates to software for DIAL and ASL 1.01 release + +#### chan_echolink.c: + + - Scott Lawson, KI4LKF - Original author + +#### chan_pi.c: + + - Jim Dixon, WB6NIL - Original author + - Steve Zingman, N4IRS - Fixes/updates to software for DIAL and ASL 1.01 release + - Michael Zingman, N4IRR - Fixes/updates to software for DIAL and ASL 1.01 release + +#### chan_simpleusb.c: + + - Jim Dixon, WB6NIL - Original author + - Steve Zingman, N4IRS - Fixes/updates to software for DIAL and ASL 1.01 release + - Michael Zingman, N4IRR - Fixes/updates to software for DIAL and ASL 1.01 release + - Stacy Olivas, KG7QIN - CM119B fixes, options to override detected (force) chip type + +#### chan_tlb.c: + + - Scott Lawson, KI4LKF - Original author (copyright) + - Jim Dixon, Wb6NIL - Author credits in source + +#### chan_usbradio.c: + + - Jim Dixon, WB6NIL - Original author + - Steve Henke, W9SH - Major contributions and included xpmr routines from XELATEC, LLC's Xipar release. + - Steve Zingman, N4IRS - Fixes/updates to software for DIAL and ASL 1.01 release + - Michael Zingman, N4IRR - Fixes/updates to software for DIAL and ASL 1.01 release + - Stacy Olivas, KG7QIN - CM119B fixes + +#### chan_usrp.c: + + - Max Parke, KA1RBI - Original author (copyright) + - Jim Dixon, WB6NIL - Author credits in source + - Michael Zingman, N4IRR - Added text support + +#### chan_voter.c: + + - Jim Dixon, WB6NIL - Original author + - Steve Zingman, N4IRS - Fixes/updates to software for DIAL and ASL 1.01 release + - Michael Zingman, N4IRR - Fixes/updates to software for DIAL and ASL 1.01 release + +#### asl-menu + + - Nathan Hardman, N8THN - Original author + + diff --git a/asterisk/CHANGELOG.md b/asterisk/CHANGELOG.md new file mode 100644 index 00000000..27812c79 --- /dev/null +++ b/asterisk/CHANGELOG.md @@ -0,0 +1,230 @@ +# CHANGELOG.md + +The following file will serve as a record to explain the changes that have been made to the app_rpt and related +programs for the AllStar software. + +Released versions will correspond to ASL releases (e.g, ASL 1.02, etc.) and be lised below their respective sections. + +Any changes/updates that hapen after a release will be listed under the Unreleased section. Once a new release is made and those changes are merged in, they will be moved under the corresponding release header. + +## Unreleased + +No unrelesaed changes at this time. + +##### Housekeeping +##### Internal code additions/modifications +##### Config file additions/modifications + + +## Released + +### ASL 1.02 - 05/11/2020 + +#### app_rpt - v0.340 - 05/11/2020 + +##### Housekeeping + +Cleaned up compile time warnings for app_rpt.c These warnings have been around for a very long time and needed to be fixed. + + +##### Asterisk CLI additions/modifications + +1. Added rpt utils command with the following functions: + + a. sayip - will use a version of LOCALPLAY that says the local IP address for the interface specified (if found). By default will play on all nodes if no is specified. Use 0 to turn off audio playback and just print IP address only. + + b. pubip - like sayip but will query a remote site (default: ifconfig.me/ip) to find out public IP address. By default will play on all nodes if no is specified. Use 0 to turn off audio playback and just print IP address only. + +2. Added rpt globals command with the following functions: + + a. show - shows the settings from [globals] from rpt.conf stanza + + b. set - allows setting of items from [globals] from rpt.conf stanza + + * maxlinks - change between 32 and 256. If conslock > 0 cannot be set. + * notchfilter - 0 = off/ 1=on + * mdcencode - 0=off/ 1=on + * mdcdecode - 0=off/ 1=on + * localchannels - 0=off/ 1=on. If conslock >0 cannot be set. + * fakeserial - 0=off/ 1=on + * noremotemdc - 0=off/ 1=on + * nocdrpost - 0=off/ 1=on. If conslost >0 cannot be set. + * mdcsay - 0=off/ 1=on + * linkclip - 0=off/ 1=on + * zoption - 0=off/ 1=on + * alttune - 0=off/ 1=on + * linkdtmf - 0=off/ 1=on + * setic706ctcss - 0=off/ 1=on + * dtmftimeout - 3 to 100 + + c. list - displays a listing of variables that can be manipulated using set + + +##### Internal code additions/modifications + +1. Added libcurl support. Basic routines from func_curl.c for this feature. + +2. Curl user agent will include app_rpt vX.Y if version # present in tdesc var. It will also include the Linux version from /proc/version + asterisk-libcurl-agent/1.0 (app_rpt v0.340)(Linux version 4.9.0-8-amd64) or + asterisk-libcurl-agent/1.0 (-)(Linux version 4.9.0-8-amd64) if version isn’t present in tdesc. + +3. Added ALPHANUM_LOCAL to rpt telemetry state machine as a function. ARB_ALPHA says (plays) alpha numeric strings over both local and remote audio on nodes (as well as sending telemetry data). ALPHANUM_LOCAL will say (play) whatever is passed just locally on nodes similar to what LOCALPLAY does without passing any telemetry. Used by rpt utils [sayip|pubip] functions. + +4. Replaced conditional compilation of certain code with run time configurable ability to change or turn on/off options/code in app_rpt. Configured via [globals] section in rpt.conf and using rpt globals on CLI. + + a. maxlinks - change between 32 and 256. Changes number of linked nodes enumerated/reported in telemetry status. If conslock > 0 cannot be changed (set) via CLI. + + b. notchfilter - 0 = off/ 1=on. Turns notch filter on/off. + + c. mdcencode - 0=off/ 1=on. Turns mdeencode on/off. + + d. mdcdecode - 0=off/ 1=on. Turns mdedecode on/off. + + e. localchannels - 0=off/ 1=on. If conslock >0 cannot be changed (set) via CLI. Turns the local channel type on/off. + + f. fakeserial - 0=off/ 1=on. Turns fakeserial (prints to console) on/off. + + + g. noremotemdc - 0=off/ 1=on. Turns on/off remotemdc code. + + h. nocdrpost - 0=off/ 1=on. If conslock >0 cannot be changed (set) via CLI.. Turns CDR posting on/off. + + i. mdcsay - 0=off/ 1=on. Turns mdcsay on/off. + + j. linkclip - 0=off/ 1=on. Turns linkclip on/off. + + k. zoption - 0=off/ 1=on. Enabled/disabled Z option in app_rpt. + + l. alttune - 0=off/ 1=on. Turns “alternate tune” function on/off. + + m. linkdtmf - 0=off/ 1=on. Turns linkdtmf on/off. + + n. setic706ctcss - 0=off/ 1=on. Turns CTCSS code for IC706 on/off. + + o. dtmftimeout - 3 to ????. Changes DTMF timeout. + +5. Changed how statpost reporting works. + + a. Can be globally disabled for all nodes (statpost=0 in globals) + + b. Can be set to use ASL stat server only (statpost=1 in globals - default) + + c. Can be use to use custom statpost server URL (statpost=2 and statpost_url is set in globals) + + d. Can be diabled for a single node (statpost_override=0 in node stanza) + + e. Can be disabled globally (statpost=0 in globals) and enabled per node with statpost_override=1, statpost_custom=1, and statpost_url set in each node’s stanza. + + f. By default does not report nodes under 2000 (private nodes) unless three conditions are met (statpost_url for node, statpost_override=128, statpost_custom=2 -- this is a per node setting in the node stanzas) + +6. Porting of DVSWITCH telemetry ducking port done by N4IRR and KC1KCC from the now defunct XiPAR release. (https://github.com/AllStarLink/Asterisk/pull/53) + +7. Added three additional status commands for IP address reporting using DTMF tones over the air. + + a. status,20 = Say remote (public) IP (global) + + b. status,21 = Say remote (public) IP (local only) + + c. status,22 = Say local network interface IP (local only) + +8. Replaced dependency on WGET in statpost with libcurl. This eliminates the need to constantly fork a new copy of wget for each and every stats update. + +9. Fixed old issue with how PLAYBACK and LOCALPLAY work. Per the app_rpt.c code, LOCALPLAY is supposed to play audio locally while PLAYBACK plays it globally. This was swapped, and use of LOCALPLAY ended up playing back audio globally. LOCALPLAY is once again only for playing audio locally, while PLAYBACK plays it globally. + +10. Set alignment of structures used in app_rpt.c to improve performance and memory utilization. + + +##### Config file additions/modifications + +* /etc/asterisk/rpt.conf additions/changes/modifications + +1. Added [globals] stanza. + +2. Added the following config items to the [globals] stanza: + + a. conslock - console lock for updating . 0=off (default), 1=lock maxlinks, nocdrpost, and localchannels, 2=lock all + + b. maxlinks - changes MAXSTATLINKS. Default is 32. Max is 256. + + c. notchfilter - 0 = off/ 1=on. Turns notch filter on/off. Default=0 + + d. mdcencode - 0=off/ 1=on. Turns mdeencode on/off. Default=0 + + e. mdcdecode - 0=off/ 1=on. Turns mdedecode on/off. Default=0 + + f. localchannels - 0=off/ 1=on. If conslock >0 cannot be set. Turns the local channel type on/off. Default=1 + + g. fakeserial - 0=off/ 1=on. Turns fakeserial (prints to console) on/off. Default=0 + + h. noremotemdc - 0=off/ 1=on. Turns on/off remotemdc code. Don't notify MDC1200 on remote bases. Default=1 + + i. nocdrpost - 0=off/ 1=on. If conslost >0 cannot be set.. Turns CDR posting on/off. Default=1 + + j. mdcsay - 0=off/ 1=on. Turns mdcsay on/off. MDC say when doing CT off - only works when MDC decode is enabled. Default=0 + + k. linkclip - 0=off/ 1=on. Turns linkclip on/off. Code that causes clipping of first syllable on link. Default=0 + + l. zoption - 0=off/ 1=on. Enabled/disabled Z option in app_rpt. Default=0 + + m. alttune - 0=off/ 1=on. Turns “alternate tune” function on/off. Default=0 + + n. linkdtmf - 0=off/ 1=on. Turns linkdtmf on/off. Extra link DTMF code. Default=0 + + o. setic706ctcss - 0=off/ 1=on. Turns CTCSS code for IC706 on/off. Set IC706 CTCSS TX/RX Frequencies. Default=0 + + p. dtmftimeout - 3 to ????. Changes DTMF timeout. Default=3 + + q. remoteip_url - URL for fetching remote IP in rpt utils pubip (default: http://ifconfig.me/ip) + + r. statpost_url - Global statpost URL (default http://stats.allstarlink.org/uhandler.php) + + s. statpost - Global control us turning update of stats via statpost_url on/off. 0=off, 1=Use AllStarLink (uses default and ignores statpost_url change), 2=use custom (statpost_url must be set) + +3. The following are changes to the individual node stanza configs: + + a. Removed statpost_program. Deprecated and removed due to use of libcurl now for stats reporting and [globals] section config options. + + b. Individual node reporting can be disabled by setting statpost_override=0. + + c. When global statpost reporting is disabled, individual node reporting can be enabled by setting statpost_override=1. + + d. Changed individual node use of statpost_url. All nodes will use the statpost_url defined in the [globals] section uless statpost_custom is set to 1. Then the individual nodes can specify their own unique statport_url for use. + + e. By default, nodes below 2000 (private nodes) will no longer be able to send updates to the statpost_url. This behavior can be overridden on a per node basis by setting statpost_custom=2,statpost_override=128, and specifying a statpost_url. + + +#### chan_simpleusb.c - 05/11/2020 + +##### Housekeeping + +Removed exta mutex unlock from code. + + +##### Internal code additions/modifications + +Fixed audio support for CM119B chips. + + +##### Config file additions/modifications + +1. Added ctype option for device selection of audio. 0=auto; 1=C108; 2=C108AH; 3=N1KDO; 4=C119/C119A; 5=C119B. + +2. Added forceinit option to force USB device to attemp initilization. 0=off, 1=on. Must be used with ctype! + + +#### chan_usbradio.c - 05/11/2020 + +##### Housekeeping + +N/A + + +##### Internal code additions/modifications + +Fixed support for audio with CM119B. + + +##### Config file additions/modifications + +N/A + diff --git a/asterisk/CONTRIBUTORS.md b/asterisk/CONTRIBUTORS.md new file mode 100644 index 00000000..b76879b1 --- /dev/null +++ b/asterisk/CONTRIBUTORS.md @@ -0,0 +1,11 @@ +AllStar Contributors (sorted alphabetically) +============================================ +#### The following is a list of known contributors to the app_rpt programs that make up the AllStar software. + +#### This list is very likley incomplete. +---- +See AUTHORS for listing of known authors/copyright holders +---- + +**[Full contributors list][https://github.com/AllStarLink/Asterisk/graphs/contributors]** + diff --git a/asterisk/apps/app_rpt.c b/asterisk/apps/app_rpt.c index a1a6db49..5e7d7134 100644 --- a/asterisk/apps/app_rpt.c +++ b/asterisk/apps/app_rpt.c @@ -315,6 +315,8 @@ /*** MODULEINFO tonezone curl + blkid + ssl yes ***/ @@ -608,6 +610,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision 200511") #include #include #include +#include +#include +#include #include "asterisk/utils.h" #include "asterisk/lock.h" @@ -1519,11 +1524,15 @@ struct sysinfo_pvt { char vers[200]; char cvers[40]; char myip[50]; + char sysid[66]; + char ssysid[26]; } __attribute__((aligned)); static struct sysinfo_pvt sysinfo = { .vers = "Unknown", - .cvers = "Unknown" + .cvers = "Unknown", + .sysid = "00000000000000000000000000000000000000000000000000000000000000000", + .ssysid = "000000000000-000000000000", }; /* Declarations for everyting else */ @@ -2033,7 +2042,7 @@ AST_THREADSTORAGE_CUSTOM(curl_instance, curl_instance_init, curl_instance_cleanu static int curl_internal(struct MemoryStruct *chunk, char *url, char *post) { const char crl_agnt[] = "asterisk-libcurl-agent/1.0"; - char curl_agent_string[50]=""; + char curl_agent_string[150]=""; int ret, vmajor, vminor; char *skzy; CURL **curl; @@ -2047,10 +2056,10 @@ static int curl_internal(struct MemoryStruct *chunk, char *url, char *post) return -1; skzy = strstr(tdesc, "version"); - sprintf(curl_agent_string, "%s (-; Linux %s)",crl_agnt,sysinfo.cvers); + sprintf(curl_agent_string, "%s (-; Linux %s)(ID:%s)",crl_agnt,sysinfo.cvers,sysinfo.ssysid); if(skzy) if(sscanf(skzy, "version %d.%d", &vmajor, &vminor) == 2) - sprintf(curl_agent_string, "%s (app_rpt v%d.%d; Linux %s)",crl_agnt,vmajor,vminor,sysinfo.cvers); + sprintf(curl_agent_string, "%s (app_rpt v%d.%d; Linux %s)(ID:%s)",crl_agnt,vmajor,vminor,sysinfo.cvers,sysinfo.ssysid); curl_easy_setopt(*curl, CURLOPT_NOSIGNAL, 1); @@ -5835,6 +5844,7 @@ time_t now; unsigned int seq; struct MemoryStruct chunk = { NULL, 0 }; + switch(rpt_globals.statpost) { case 0: // Globally we are disabled, how about on a per node basis? switch(myrpt->p.statpost_override) { @@ -5858,6 +5868,7 @@ struct MemoryStruct chunk = { NULL, 0 }; ast_copy_string(astr,ASL_STATPOST_URL,299); success=1; break; + } break; case 32: // Node's statpost_override was never set, log that to the console and don't report @@ -7080,23 +7091,78 @@ static const char *public_ip( char *ip) static void get_sys_info (void) { + + int i = 0; + char tmp1[200]; + char tmp2[200]; + char buf[65]=""; + const char *devname = NULL, *uuid = NULL; + unsigned char hash[SHA256_DIGEST_LENGTH]; + SHA256_CTX sha256; + + struct mntent *e; + blkid_probe mp; FILE *fp; - char tmp[200]; - char myip[50]=""; + fp = fopen("/proc/version", "r"); - if(!fp) return; - if((!fgets(tmp,sizeof(tmp)-1, fp))) - { + if(fp) { + if((fgets(tmp1,sizeof(tmp1)-1, fp))) { + strncpy(sysinfo.vers,tmp1,sizeof(sysinfo.vers)-1); + if(sscanf(tmp1,"Linux version %s", sysinfo.cvers) !=1) + strcpy(sysinfo.cvers,"Unknown"); + } fclose(fp); - return; + } else { + strcpy(sysinfo.vers, "Unknown"); + strcpy(sysinfo.cvers, "Unknown"); } - strncpy(sysinfo.vers,tmp,sizeof(sysinfo.vers)-1); - if(sscanf(tmp,"Linux version %s", sysinfo.cvers) !=1) - { - strcpy(sysinfo.cvers,"Unknown"); + + public_ip(buf); + strncpy(sysinfo.myip,buf,20); + + fp = fopen("/etc/machine-id", "r"); + if(fp) { + if((!fgets(tmp1,sizeof(tmp1)-1, fp))) { + strcpy(tmp1,"---------------------------------"); + } + fclose(fp); + } else { + strcpy(tmp1,"---------------------------------"); } - public_ip(myip); - strncpy(sysinfo.myip,myip,20); + + FILE *fstab = setmntent("/etc/mtab", "r"); + + while ((e = getmntent(fstab))) { + if(strcmp("/", e->mnt_dir) == 0) { + devname = e->mnt_fsname; + break; + } + } + endmntent(fstab); + + mp = blkid_new_probe_from_filename(devname); + if(mp) { + blkid_do_probe(mp); + blkid_probe_lookup_value(mp, "UUID", &uuid, NULL); + } else { + uuid = ast_strdup("00000000-0000-0000-0000-000000000000"); + } + + strcpy(tmp2,eatwhite(tmp1)); + strcpy(tmp1,eatwhite(ast_strdup(uuid))); + + SHA256_Init(&sha256); + SHA256_Update(&sha256, tmp2, strlen(tmp1)); + SHA256_Final(hash, &sha256); + + for(i = 0; i < SHA256_DIGEST_LENGTH; i++) { + sprintf(buf+(i*2), "%02x", hash[i]); + } + + buf[64] = 0; + strncpy(sysinfo.sysid, buf, 65); + sprintf(sysinfo.ssysid, "%.12s-%s", buf, &(buf[52])); + blkid_free_probe(mp); return; } @@ -7256,6 +7322,8 @@ static void rpt_show_globals(int fd, int i) " Statpost : %d\n" " Statpost URL : %s\n" " Remote IP URL : %s\n" + "\n" + " System ID : %s\n" " ----------------------------\n\n\n", rpt_globals.conslock, MAX_STAT_LINKS, @@ -7275,7 +7343,8 @@ static void rpt_show_globals(int fd, int i) DTMF_TIMEOUT, rpt_globals.statpost, rpt_globals.statpost_url, - rpt_globals.remoteip_url + rpt_globals.remoteip_url, + sysinfo.ssysid ); break; case 1: @@ -7514,6 +7583,18 @@ static int rpt_do_globals(int fd, int argc, char *argv[]) i = 1; rpt_globals.statpost=i; ast_log(LOG_NOTICE, "Global statpost: %d\n", rpt_globals.statpost); + switch (i) { + case 1: + ast_log(LOG_NOTICE,"Using ASL statpost URL: %s\n", ASL_STATPOST_URL); + break; + case 2: + ast_log(LOG_NOTICE,"Using custom statpost URL: %s\n", rpt_globals.statpost_url); + break; + default: + rpt_globals.statpost=0; + ast_log(LOG_NOTICE,"Statpost disabled\n"); + break; + } return RESULT_SUCCESS; } @@ -11399,7 +11480,8 @@ struct sched_param rpttele_sched; case REMIP_LOCAL: if (wait_interval(myrpt, DLY_TELEM, mychannel) == -1) break; res = telem_lookup(myrpt, mychannel, myrpt->name, "remip"); - if(strlen(sysinfo.myip)>0) { + strncpy(sysinfo.myip,myip,20); + if(strlen(myip)>0) { ast_log(LOG_NOTICE, "[*] Public IP address is %s\n\n", sysinfo.myip); saynode(myrpt,mychannel,myrpt->name); sayfile(mychannel, "system"); @@ -23288,6 +23370,7 @@ static void cfg_globals_init(struct ast_config *cfg) if(p) rpt_globals.statpost_url = ast_strdup(p); else { rpt_globals.statpost=1; + strcpy(rpt_globals.statpost_url,ASL_STATPOST_URL); ast_log(LOG_ERROR,"Global statpost is set to 2, global statposr_url is missing or blank. Defaulting global statpost to 1 (AllStarLink)\n\n"); } } @@ -23438,6 +23521,8 @@ struct sched_param rptmaster_sched; ast_verbose("\n>>>---> Initializing %s\n\n", tdesc); + get_sys_info(); + /* * If there are daq devices present, open and initialize them */ @@ -23448,7 +23533,6 @@ struct sched_param rptmaster_sched; */ cfg_globals_init(cfg); - get_sys_info(); while((this = ast_category_browse(cfg,this)) != NULL) { diff --git a/asterisk/acinclude.m4 b/asterisk/autoconf/acinclude.m4 similarity index 99% rename from asterisk/acinclude.m4 rename to asterisk/autoconf/acinclude.m4 index 555be179..df6f0134 100644 --- a/asterisk/acinclude.m4 +++ b/asterisk/autoconf/acinclude.m4 @@ -769,7 +769,8 @@ m4_ifndef([AST_PROG_EGREP], [AC_DEFUN([AST_PROG_EGREP], AC_SUBST([EGREP]) ])]) # AST_PROG_EGREP -# AST_PROG_SED + +AST_PROG_SED # ----------- # Check for a fully functional sed program that truncates # as few characters as possible. Prefer GNU sed if found. @@ -783,7 +784,7 @@ AC_DEFUN([AST_PROG_SED], done echo "$ac_script" | sed 99q >conftest.sed $as_unset ac_script || ac_script= - _AC_PATH_PROG_FEATURE_CHECK(SED, [sed gsed], + ifdef([_AC_PATH_PROGS_FEATURE_CHECK], [_AC_PATH_PROGS_FEATURE_CHECK], [_AC_PATH_PROG_FEATURE_CHECK])(SED, [sed gsed], [_AC_FEATURE_CHECK_LENGTH([ac_path_SED], [ac_cv_path_SED], ["$ac_path_SED" -f conftest.sed])])]) SED="$ac_cv_path_SED" diff --git a/asterisk/autoconf/aclocal.m4 b/asterisk/autoconf/aclocal.m4 new file mode 100644 index 00000000..56e944be --- /dev/null +++ b/asterisk/autoconf/aclocal.m4 @@ -0,0 +1,15 @@ +# generated automatically by aclocal 1.15 -*- Autoconf -*- + +# Copyright (C) 1996-2014 Free Software Foundation, Inc. + +# 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) +m4_include([acinclude.m4]) diff --git a/asterisk/build_tools/menuselect-deps.in b/asterisk/build_tools/menuselect-deps.in index 2613ea90..15baadd2 100644 --- a/asterisk/build_tools/menuselect-deps.in +++ b/asterisk/build_tools/menuselect-deps.in @@ -1,5 +1,6 @@ ASOUND=@PBX_ALSA@ CURL=@PBX_CURL@ +BLKID=@PBX_BLKID@ DAHDI=@PBX_DAHDI@ DAHDI_TRANSCODE=@PBX_DAHDI_TRANSCODE@ FREETDS=@PBX_FREETDS@ diff --git a/asterisk/configure.ac b/asterisk/configure.ac index 0d9d0b15..10f455ff 100644 --- a/asterisk/configure.ac +++ b/asterisk/configure.ac @@ -215,6 +215,7 @@ AST_EXT_LIB_SETUP([VORBIS], [Vorbis], [vorbis]) AST_EXT_LIB_SETUP([VPB], [Voicetronix API], [vpb]) AST_EXT_LIB_SETUP([ZLIB], [zlib], [z]) AST_EXT_LIB_SETUP([ZAPTEL], [Zaptel], [zaptel]) +AST_EXT_LIB_SETUP([BLKID], [Blkid], [blkid]) # check for basic system features and functionality before # checking for package libraries @@ -223,7 +224,7 @@ AC_FUNC_ALLOCA AC_HEADER_DIRENT AC_HEADER_STDC AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h libintl.h limits.h locale.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h strings.h sys/file.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h termios.h unistd.h utime.h arpa/nameser.h]) +AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h libintl.h limits.h locale.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h strings.h sys/file.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h termios.h unistd.h utime.h arpa/nameser.h float.h mntent.h sys/vfs.h]) AC_SYS_LARGEFILE @@ -265,7 +266,7 @@ AC_FUNC_STRNLEN AC_FUNC_STRTOD AC_FUNC_UTIME_NULL AC_FUNC_VPRINTF -AC_CHECK_FUNCS([asprintf atexit bzero dup2 endpwent floor ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday inet_ntoa isascii localtime_r memchr memmove memset mkdir munmap pow putenv re_comp regcomp rint select setenv socket sqrt strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strtol strtoq unsetenv utime vasprintf]) +AC_CHECK_FUNCS([asprintf atexit bzero dup2 endpwent floor ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday inet_ntoa isascii localtime_r memchr memmove memset mkdir mkfifo munmap pow putenv re_comp regcomp rint select setenv socket sqrt strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strtol strpbrk strtoul strtoq unsetenv utime vasprintf]) # some systems already have gethostbyname_r so we don't need to build ours in main/utils.c AC_SEARCH_LIBS(gethostbyname_r, [socket nsl]) @@ -1319,6 +1320,12 @@ AC_SUBST(PBX_SPEEX_PREPROCESS) AST_EXT_LIB_CHECK([SQLITE], [sqlite], [sqlite_exec], [sqlite.h]) +AST_EXT_LIB_CHECK([BLKID], [blkid], [blkid_new_probe_from_filename], [blkid/blkid.h]) +if test "${PBX_BLKID}" = 1; then + PBX_BLKID=1 + AC_DEFINE([HAVE_BLKID], 1, [Define if your system has the blkid libraries.]) +fi + AST_EXT_LIB_CHECK([OPENSSL], [ssl], [SSL_connect], [openssl/ssl.h], [-lcrypto]) if test "$PBX_OPENSSL" = "1"; then diff --git a/asterisk/makeopts.in b/asterisk/makeopts.in index eb54b59e..f19d90c7 100644 --- a/asterisk/makeopts.in +++ b/asterisk/makeopts.in @@ -70,6 +70,9 @@ ASOUND_LIB=@ALSA_LIB@ CURL_INCLUDE=@CURL_INCLUDE@ CURL_LIB=@CURL_LIB@ +BLKID_INCLUDE=@BLKID_INCLUDE@ +BLKID_LIB=@BLKID_LIB@ + CURSES_INCLUDE=@CURSES_INCLUDE@ CURSES_LIB=@CURSES_LIB@ CURSES_DIR=@CURSES_DIR@